-
Notifications
You must be signed in to change notification settings - Fork 265
Create namespace with Helmrelease #488
Comments
@ferrandinand a HelmRelease is a namespaced object, you can't create the HR object if the namespace doesn't exists. |
Ok I assume that in the way the application works, helm-operator will never be able to install the helmrelease in one namespace(let's say a management namespace) and then the helm installation in a different one. We can close this issue if you think this is not a possible case. |
If I understand: |
Thanks @nicolasscaerou for the clarification.
|
We also do have a use case where we'd like to be able to use option 2: In a shared cluster:
With that we could remove the intermediate step of creating the tenant namespace before applying the HelmRelease |
I feel maintainers are no longer considering this issue as it has wontfix label. |
Creating a namespace on the fly is not something that we are considering. Imagine that namespace needs an annotation or label, like |
I find the helm |
Helm2 has "create namespace" by default, helm3 re-invented this feature starting from 3.2. |
+1 |
So, if I need to create the namespace prior to helm release happens, how it should be done? |
In Flux v2, it's expected that namespaces are created by Kustomizations prior to HelmReleases or other resources being placed in them. They can also be created simultaneously by the same Flux Kustomization; Flux is smart enough to install namespaces before namespaced resources, and custom resource definitions before custom resources that are defined by them. But if your HelmRelease is creating the Custom Resource Definitions and you need to create Custom Resources after that, the best example we have is flux2-multi-tenancy where it is shown how to install Kyverno from HelmRelease and then install some KyvernoPolicies (all as infrastructure that must be loaded and health checked before other cluster stuff gets installed.) https://github.com/fluxcd/flux2-multi-tenancy/blob/main/clusters/production/infrastructure.yaml Please check out this example which covers the topic among other topics https://github.com/fluxcd/flux2-multi-tenancy/#flux2-multi-tenancy |
There is actually Sorry if your issue remains unresolved. The Helm Operator is in maintenance mode, we recommend everybody upgrades to Flux v2 and Helm Controller. A new release of Helm Operator is out this week, 1.4.4. We will continue to support Helm Operator in maintenance mode for an indefinite period of time, and eventually archive this repository. Please be aware that Flux v2 has a vibrant and active developer community who are actively working through minor releases and delivering new features on the way to General Availability for Flux v2. In the mean time, this repo will still be monitored, but support is basically limited to migration issues only. I will have to close many issues today without reading them all in detail because of time constraints. If your issue is very important, you are welcome to reopen it, but due to staleness of all issues at this point a new report is more likely to be in order. Please open another issue if you have unresolved problems that prevent your migration in the appropriate Flux v2 repo. Helm Operator releases will continue as possible for a limited time, as a courtesy for those who still cannot migrate yet, but these are strongly not recommended for ongoing production use as our strict adherence to semver backward compatibility guarantees limit many dependencies and we can only upgrade them so far without breaking compatibility. So there are likely known CVEs that cannot be resolved. We recommend upgrading to Flux v2 which is actively maintained ASAP. I am going to go ahead and close every issue at once today, |
@kingdonb |
Sure absolutely! It's on the HelmReleases API and Helm Releases component pages, you can search for it on the docs site and it should come up there: https://fluxcd.io/flux/components/helm/api/#helm.toolkit.fluxcd.io/v2beta1.Install |
Describe the feature
I would like to be able to create namespaces if it is not already created when defining a HelmRelase CR.
Helm 3.2 allows to create namespaces on the command line following the next convention:
helm install wordpress stable/wordpress --namespace wordpress --create-namespace
A possible helmrelase CR could look like this
The status is managed in the controlller and knows if the flag should be appended to the helm command or not.
Links
helm/helm#7648
The text was updated successfully, but these errors were encountered: