-
Notifications
You must be signed in to change notification settings - Fork 11
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
Override namespace
for objects
#220
Comments
Thank you for the quick response! My use case is that we don't install Helm Charts directly into the cluster. We have a deployment pipeline that does a |
Interesting, never looked at the When I did a test just now it turns out Anyhow, now I totally understand what you are after with your request. Flux is also at the top of my list of things to do next since we want to use it at work too so sounds like a total win-win to allow this. It should also be not much work. Some questions aligning on the desired implementation:
Small question I have whether there is any danger to always setting this |
One other caveat I forgot about is the need to seperate non-namespaced objects from namespaced ones to set it only where it belongs: kubernetes-sigs/external-dns#2807 I think I have seen that Kubernetes is not complaining when a namespace is set on a non-namespaced object but better handle this properly from the get go. |
I think I would want to put it here:
@sczech Do you think there is a usecase for individual
It would be not much extra effort to do so and it should cover all bases. |
The second solution is exactly how we have implemented it in our internal charts. We set |
I don't think there is a need for individual fields since a chart should really only be deployed to one namespace at a time. If you want to deploy to another namespace the preferred solution should be to use subcharts. Concerning the |
Ok it is done, new releases with Release 1.27,1 Followed your suggestion so you can use:
to change the namespace in the templates. If not provided, the Hope that works and if you have other problems. feature suggestions or find a bug let me know! |
Looking good! Thank you for the quick implementation 🙏 |
Based on @sczech's request:
Currently the
metadata.namespace
fields of the objects are not touched or touchable by HULL. They are set by Helm on deployment where the-n
or--namespace
parameter sets themetadata.namespace
for all created objects. This is I think standard Helm procedure.In that sense having a global/general setting applied to all objects with a
config.general.namespaceOverride
option would amount to the same as setting a different namespace forhelm install/upgrade
? But maybe you have a different usecase in mind like one sketched below?Overriding the namespace on a per object basis could be useful and implementation is rather easy. I can think of having as suggested a
namespaceOverride
property on thehull.object.base
level where you can overwrite this for any given object.Let's assume a case where you want to have one alternative backup namespace where some of the objects should go to and you want to have a central field to provide that namespace. For this you could then add the
namespaceOverride
to the objects in question and have them reference a shared field likehull.config.specific.backupNamespace
to get the centrally configured namespace. I think that could be your use case?The text was updated successfully, but these errors were encountered: