Repository navigation
Closed
Labels
v3.xIssues and Pull Requests related to the major version v3
Description
Output of helm version:
version.BuildInfo{Version:"v3.0.0-alpha.1", GitCommit:"b9a54967f838723fe241172a6b94d18caf8bcdca", GitTreeState:"clean"}
Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.3", GitCommit:"721bfa751924da8d1680787490c54b9179b1fed0", GitTreeState:"clean", BuildDate:"2019-02-01T20:08:12Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.8-eks-7c34c0", GitCommit:"7c34c0d2f2d0f11f397d55a46945193a0e22d8f3", GitTreeState:"clean", BuildDate:"2019-03-01T22:49:39Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}
Cloud Provider/Platform (AKS, GKE, Minikube etc.):
AWS/EKS
centos7:[root@localhost linux-amd64]$ kubectl get ns nginx
Error from server (NotFound): namespaces "nginx" not found
centos7:[root@localhost linux-amd64]$ ./helm install nginx stable/nginx-ingress
Error: create: failed to create: namespaces "nginx" not found
centos7:[root@localhost linux-amd64]$ kubectl create ns nginx
namespace/nginx created
centos7:[root@localhost linux-amd64]$ ./helm install nginx stable/nginx-ingress
NAME: nginx
LAST DEPLOYED: 2019-05-17 15:30:04.283642019 +0100 BST m=+4.727707147
NAMESPACE: nginx
STATUS: deployed
NOTES:
The nginx-ingress controller has been installed.
It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status by running 'kubectl --namespace nginx get services -o wide -w nginx-nginx-ingress-controller'
An example Ingress that makes use of the controller:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
name: example
namespace: foo
spec:
rules:
- host: www.example.com
http:
paths:
- backend:
serviceName: exampleService
servicePort: 80
path: /
# This section is only required if TLS is to be enabled for the Ingress
tls:
- hosts:
- www.example.com
secretName: example-tls
If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided:
apiVersion: v1
kind: Secret
metadata:
name: example-tls
namespace: foo
data:
tls.crt: <base64 encoded cert>
tls.key: <base64 encoded key>
type: kubernetes.io/tls
Reacted by Elouan Keryell-Even, abishek, Alex Watson, Luis Garnica Guilarte, Ayush Mundra, Pablo Reyes and Daniel Grooms
Reacted by Hong, Luis Garnica Guilarte and Ayush Mundra
Metadata
Metadata
Assignees
Labels
v3.xIssues and Pull Requests related to the major version v3
Activity
rpeets commentedon May 26, 2019
run in to the same issue.. but resolved by switching context as mentioned in #5628
at this point i believe its just confusing to have --namespace an option.
jeremy-donson commentedon May 27, 2019
@rpeets - To clarify my understanding of your last comment:
Proper and consistent usage of namespaces across environments is definitely a k8s best practice, no?
#5628
I believe the environment and namespace are crucial means to properly "target" deployments.
And helm seems to be in the cockpit of that
@bacongobbler => Feel free to set me straight here. Thx in advance.
I just went full circle from #5628 and back. :)
These Helm 3.x issues + helm3 hooks are crucial aspects of our emerging workflows,
and we are interested in where this will go.
rpeets commentedon May 27, 2019
@jeremy-donson - I 100% agree with you thats the best practice.
but the error message is confusing, as you can see blow.
Since its not suppose to work, these message is pointing you the wrong direction.
"You must pass '--namespace=kube-system' to perform this operation."
hickeyma commentedon May 27, 2019
I can verify this bug from the v3 master code, and using the scaffold chart as follows:
hickeyma commentedon May 27, 2019
The current code in v3 master does not specify the
--namespaceflag:It is subsequently ignored, and the context set namespace or default namespace is used instead:
@bacongobbler @adamreese Is this how it should work in v3?
bacongobbler commentedon Jun 14, 2019
The change to remove the creation of the namespace during
helm installwas intentional. This was made to mimic the same behaviour askubectl create --namespace foo -f deployment.yaml- namespaces are a global cluster resource and the user installing resources into that namespace may not have the proper administrative rights to install the namespace itself, as that implies you have full administrative rights to the cluster (as opposed to being bound to a role with restricted rights within a particular namespace). Without this change, users must have cluster admin rights to install a chart, and we want to ensure that administrators can ensure users only have a restricted set of roles applied to each install. This is also a big reason why TIller was removed in the first place.Additionally, there have been several asks in the community to allow modifying the namespace
helm installcreates (e.g. #3503), and the UX to support use cases like that would be incredibly painful to achieve. Offloading the namespace creation to a separate tool (perhaps a plugin?) provides users a way to solve these issues without imposing a restrictive user experience around these use cases.Note: I'm just relaying the information I know about this subject and why it was removed. I suggest asking @adamreese more about the justification for the removal.
sudermanjr commentedon Jun 18, 2019
I think delegating namespace creation to a different tool (or the user), is a great idea. More and more cluster-wide policies are being defined using namespace annotations and labels, which falls firmly outside the scope of a deployment tool such as helm.
That being said, the current UX with the namespace flag is troublesome. In my initial cursory testing I am also seeing that the namespace flag is ignored and the current-context namespace is being used during a
helm installcommand.bacongobbler commentedon Jun 18, 2019
That's great feedback, thank you @sudermanjr.
Yeah, we're tracking that discussion in #5628 :)
marckhouzam commentedon Oct 23, 2019
Continuing from #5628.
Thank you @bacongobbler for taking the time to give some historical justification. With this extra information it is easier to understand the maintainers' choice on this matter.
I'm sure no one in the community would have thought that. The discussion was more about making the maintainers aware of users' reality. But it's clear you were well aware but had to make the hard decision. I respect that.
ichekrygin commentedon Oct 24, 2019
Interesting #5628 pre-dates this issue and more importantly is dedicated to the same topic:
However, it seems @bacongobbler thinks otherwise :)
ichekrygin commentedon Oct 24, 2019
@bacongobbler or any Helm3 maintainers/contributor comment on the desirability of having
Helm3as a "one-stop-shop"?For more context: #5628 (comment)
bacongobbler commentedon Oct 24, 2019
@ichekrygin, it is incredibly frustrating having to repeat the same statement over and over. I will repeat myself one more time.
I mentioned several times in that thread that the discussion is different than the one originally raised by the OP. The discussion in the first comment talks about the
--namespaceflag being ignored in earlier versions of Helm 3. Resources were being deployed in the default namespace regardless of what you provided to--namespace.Here's an excerpt from the first comment:
The only similarity with these two tickets is that they both are related to the
--namespaceflag.That's it.
Hope that clears things up.
As I mentioned earlier:
Do you have an alternative solution that does not fall to the same design flaws as indicated earlier?
ichekrygin commentedon Oct 24, 2019
Hi, @bacongobbler. Sorry to see you getting frustrated over this issue. As you observed the topics of both issues are very much related. Moreover, the issue (this issue) you recommend to continue having a conversation is also "Closed" (by you) on Jun 21, while the #5628 was remaining open till Sep 1, but, this IS getting off-topic :).
It is one thing to "reject" or "propose the alternatives" for the above-mentioned community member requests, it is totally another thing is to remove
--namespacecreation support from Helm altogether!I may have some alternative suggestions, but I would love to understand the issue and the motivation behind it first.
Perhaps, a bit more insightful information could be to discuss the impact of preserving
Helm2create--namespacefunctionality in light ofHelm3design/implementation decision to leverage saidnamespacefor the chart release information storage in the form of Kubernetes secret:sh.helm.release.v1.my-chart.v1 helm.sh/release.v1.bacongobbler commentedon Oct 24, 2019
I explained the issue and the motivation for the removal of this feature several times in previous comments. Please read my previous comments more carefully.
ichekrygin commentedon Oct 24, 2019
Digging more into this.
I was hoping that I could simply add a
namespace.yamldefinition into my chart as follow:Ideally nothing should prevent the
namespacecration w/ all the "bells and whistles" that comminutiy members were proposing, as long as it is created in the previously documented orderHowever, as I suspected, the reason why the "target" or
{{ .Release.Namespace }}must exist before invokinginstall(and I suspectupdate) command is directly tied to theHelm3storage implementation, which "relies" on the "target" namespace to store release information.https://github.com/helm/helm/blob/master/pkg/action/install.go#L254
In very high-level understanding Helm3 performers following steps in the following order:
ichekrygin commentedon Oct 24, 2019
@bacongobbler, yes, you did. Unfortunately, for me, those did not fully make sense.
After getting to the bottom of this, I guess the explanation that would make more sense (for me) would be the one you gave earlier (multiple times) plus, "oh, yeah... we are using "target" or
{{ .Release.Namespace }}namespace inHelm3for other reasons as well, like saving release information. Thus, it is problematic maintaining namespace creation via--namepaceflag" or something like that.Either way, thank you for your help.
javajon commentedon Jan 6, 2020
Agree with the change since the uninstall action did not remove the namespace making the uninstall feel dirty. If anyone considers a plugin, or other tool or means, and wants to take responsibility for creating the namespace, then the uninstall would need a delete transaction to counter the namespace create.
ichekrygin commentedon Jan 6, 2020
@javajon The "Cleanup" topic is relevant, yet I think it is of a wider scope specifically when it involves "cluster-level" components.
Two points: