-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
helm upgrade
does not re-create namespace when it is gone
#2013
Comments
Is the namespace explicitly declared in the chart? |
Good point, it is not. This is still slightly inconsistent with the behavior of install though, but that is a good workaround. |
You're right. Just trying to figure out how best to re-create the problem. Thanks! |
Actually, I am wondering if including the namespace in the chart necessarily works: is it guaranteed to be applied first? I guess if it is not, we could still get the issue above. |
The same for me |
Another issue, when I crated namespace object like so:
and executed
Only the second time I run this command, deployment succeeds.. |
My workaround: Add In @technosophos Isn't it weird that even Helm is supposed to work on global level, there are "namespaces" as first-class concept in both cli and
|
Just wanted to say that I also just ran into this. I expected Note that in my situation, the namespace already exists and it still doesnt install in the namespace |
+1 just ran into this just now! |
yeah...why is it not using the specified namespace on upgrade? anybody can explain? |
The easiest way I know how to reproduce the issue is:
|
Likely, it is querying the namespace to prepare diffs, and the namespace doesn't exist. So no resource diffs can be generated. And it dies with an error. On an install, we don't have to perform any queries on a namespace until after the namespace is created. |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
/remove-lifecycle stale |
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. |
Just experienced the same issue. |
/remove-lifecycle stale |
Same issue here... It makes helm practically unusable if one tries to create namespaces and default resources (like default ingress per NS, default http backends) for "customers". If you add a new NS to the config - the upgrade fails, so does a install. Kinda stalled there... |
Hi, We are still seeing this issue with Helm Thank you. |
re-labeling this as a feature request, since we've never supported re-creating the namespace on a |
Thank you @bacongobbler. Just for clarification, I understand if |
Oh, that is interesting... I thought |
FYI, to be able to reproduce easily the original issue
Note: same error message without the |
@ultimateboy, I tried yours explained here #2013 (comment), but you are missing a |
FYI, I just opened an associated PR #4600, but still need some guidance around this open question: |
Is it recommended practice to add a namespace.yml file like so:
|
any updates about this bug ? |
also seeing this issue |
|
For context, In the It is a feature request; |
In my experience that is not what happens. Today I was using |
any updates on this? |
Closing. Helm 3 no longer creates the namespace as part of |
helm-diff 3.3.1 adds a new option `HELM_DIFF_THREE_WAY_MERGE=true` which enables the use of there-way merge for diff, which is expected to fix helm#2013
When the namespace of a release had been deleted,
upgrade
fails:This is arguably a special situation, but I would expect helm to re-create the "resources that do not already exist" (https://github.com/kubernetes/helm/blob/master/pkg/kube/client.go#L201), including namespaces.
How about calling
ensureNamespace
there inUpdate
, as is done inCreate
? I can try and send a PR for this.The text was updated successfully, but these errors were encountered: