-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubectl apply set-last-applied does not use manifest's metadata.namespace
#787
Comments
Thanks for the reproduction steps--very useful. Could you add the version of the client and server (run /sig cli |
|
Actually you can use specify But if you want to change this command without specify |
That is correct. This is a simple example but manifest files may contain resources that are deployed to different namespaces. In this case, specifying
Seems easy enough. Happy to open a PR if it's something that would be welcome. |
This will be resolved by server-side apply. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Confirmed this is resolved in kubectl 1.18.0. Using kubectl 1.17.3:
Using kubectl 1.18.0:
|
Closing because this has been fixed. |
@brianpursley: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What happened
Running
kubectl apply set-last-applied
after successfully runningkubectl apply
fails with message:Error from server (NotFound): ...
. The reason for this is that whilekubectl apply
uses the manifests'metadata.namespace
to update the resources,kubectl apply set-last-applied
uses the default namespace for the current context of the kubeconfig.Expected Behavior
kubectl apply set-last-applied
should use the manifests'metadata.namespace
just likekubectl apply
does.Reproduction
test-svc.yaml
The text was updated successfully, but these errors were encountered: