-
Notifications
You must be signed in to change notification settings - Fork 88
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
Create targetNamespace if it does not exist #43
Comments
There is a limitation in the default create-namespace functionality I outlined in the rfe here: helm/helm#8570 We could also add a wrapper on our side when a helm create-namespace is defined in the spec to optionally include annotations and labels and trigger the namespace creation before executing the helm release. |
i would suggest implementing in two steps:
As i see it it can still be useful for us without labels or annotation. |
any progress? |
any updates on this? |
Maybe something is already born? |
any update? this is needed! |
to better explain the need:
Thus please add this options quick |
We prefer to leave the target namespace creation to the user, as there are issues if it is managed by helm - as discussed above. If you're using a manifest with a HelmChart resource in it, it is quite easy to ensure that the manifest also includes the namespace.
Which chart are you talking about? If you're using a Rancher chart, management of required namespaces should be managed by Rancher itself. |
Really have difficulty in understanding why ... this is a pain in the gitops operations. I'm using rancher-monitoring-crd chart and it does not manage any namespace creation and BTW in a chart that should install CRDs I would not expect that it even needs a namespace at all, but having looked into it it makes use of a Job that obviously needs a namespace to work. Also this is something that on the Rancher side should be documented a bit more also with these namespace details since is part of the RKE2 deployment. |
You still haven't mentioned which chart you're referring to. I assume you're talking about the Rancher Monitoring charts? Those are designed to be deployed by Rancher itself, not directly via additionalManifest on the downstream cluster, which is why it expects that the cattle-monitoring-system NS has already been created by Rancher. |
Yes as I wrote we use rancher-monitoring-crd from https://charts.rancher.io. The thing you say is most strange and utterly new since we discussed monitoring deployment with rancher support and this never came out. What differs from an operation done by fleet and one done by the additionaManifest? A chart is a chart, the operation behind it is a helm operation. |
Fleet and the very basic Helm controller that is built in to K3s/RKE2 (this project) function very differently. Rancher expects that charts in the catalog are going to be deployed by Fleet. If you're going to use Rancher, you should deploy Rancher's things the Rancher way, which means using Fleet and not this Helm controller. I'm a K3s/RKE2 dev; I've pinged some folks internally to see if they can suggest a way to get Rancher's charts installed using Fleet without having to use the UI. |
Helm v2 defaults to creating the namespace if it doesn't exist when installing a chart.
Helm v3 on the other hand does not do this as it's seems to be praxis in the k8s eco system not to error out on missing namespace. However It seems as though helm v3 added a --create-namespace flag that could be used to create the namespace. It's available since 3.2.0 if I understood it correctly.
Would you accept a PR that uses that flag as the default?
The text was updated successfully, but these errors were encountered: