Skip to content
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

Make it possible to disable enforced namespace when rendering with kubectl #8233

Closed
bsideup opened this issue Dec 14, 2022 · 5 comments
Closed
Labels
area/namespaces area/render kind/friction Issues causing user pain that do not have a workaround priority/p1 High impact feature/bug.
Milestone

Comments

@bsideup
Copy link

bsideup commented Dec 14, 2022

Expected behavior

A flag that would allow skipping setting the namespace while rendering the manifest.

Actual behavior

The namespace is always set, either to the current namespace from kubectl or the default value.

Information

  • Skaffold version: Latest (2.0.3)
  • Operating system: Any
  • Installed via: skaffold.dev

Context

We want to use Skaffold to render a manifest that will later be installed into multiple namespaces (GitOps style).

Right now, Skaffold will force the namespace to be set at the render stage, making it impossible to use the rendered manifest without some post-processing that would remove the enforced namespace.

@bsideup
Copy link
Author

bsideup commented Dec 14, 2022

Submitted a draft PR to demonstrate one of possible solutions:
#8234

@aaron-prindle
Copy link
Contributor

Related - #8186

@bsideup
Copy link
Author

bsideup commented Dec 15, 2022

@aaron-prindle ohhh, thanks for sharing! I did not expect it to be a regression, but a feature. If previously it wasn't the behavior, I will be more than happy if, by default, Skaffold will not force any namespace unless specified 👍

@bsideup
Copy link
Author

bsideup commented Dec 15, 2022

Update: after reading the linked issue more carefully, I realized that --offline flag does exactly what I needed and skips adding the namespace (in the latest release).

I consider my use case solved, assuming that #8186 will be addressed before the next release, but I will leave the issue open in case the new behavior is desired and the flag will still be needed. Thank you!

@aaron-prindle aaron-prindle added area/namespaces area/render priority/p1 High impact feature/bug. kind/friction Issues causing user pain that do not have a workaround labels Dec 19, 2022
@aaron-prindle aaron-prindle added this to the v2.1.0 milestone Dec 19, 2022
@aaron-prindle
Copy link
Contributor

aaron-prindle commented Jan 12, 2023

Going to close this, tracking changing the default behaviour to be the same as --offline=true (as well as possibly adding a new flag set-namespace as you described to make the functionality more accessible // invert the current UX) in this issue:
#8318

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/namespaces area/render kind/friction Issues causing user pain that do not have a workaround priority/p1 High impact feature/bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants