Closed xuzhenglun closed 2 years ago
Hi @xuzhenglun. Thanks for your PR.
I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
/assign atoato88
/ok-to-test
ping @atoato88
I rebased this PR and CI is passed. Please leave an comment when you are convenient.
/lgtm /approve Thank you to rebase :smile:
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: atoato88, xuzhenglun
The full list of commands accepted by this bot can be found here.
The pull request process is described here
What this PR does / why we need it:
if
metadata.namespace
on Cluster-level resource(such as ClusterRole) is set,kubectl apply
will not report an error and just ignore it. But when I submit via Controller, it failed and report an error likeresource xxx is not found
.After some time I dug, I realize that
namespace
is joined into the URL. So maybe we should check whether the resource is Cluster-level, and ignoremetadata.namespace
if it's positive.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Additional documentation: