Can it make sense for us to define a namespace in yamlfiles? Hmm... Eh... It would allow our values.yaml to name the namespace...
I realized that possibility by watching this video but I figure there will be a one or multiple issues with this... But what would they be?
What's the advantage over defining it on the helm command line?
You need to provide it on the commandline to helm commands regardless. If you look at the kubernetes API reference, you'll see almost all calls have the {namespace} in the URL itself. So helm does need to know about the namespace your objects are going to be in in the commandline.
Hence there are no advantages.
It also has a disadvantage, which is that regular helm tooling won't work. For example, if you do a helm install on a namespace that doesn't exist, Helm will create it for you & order things appropriately, since it knows about namespaces. Lots of tools that wrap helm also rely on the standardized `--namespace`` flag to helm commands, and this would break their assumption. Finally, there might be RBAC issues - maybe the tiller SA only has rights to create objects in a namespace, but not a namespace itself (this is fairly common). I'm sure there are other reasons :)
Thank you for thinking about it, @consideRatio. I hope this explanation was useful (and correct!!! :D)
@manics @yuvipanda Thanks for helping me process this!!!
Most helpful comment
You need to provide it on the commandline to helm commands regardless. If you look at the kubernetes API reference, you'll see almost all calls have the
{namespace}in the URL itself. So helm does need to know about the namespace your objects are going to be in in the commandline.Hence there are no advantages.
It also has a disadvantage, which is that regular helm tooling won't work. For example, if you do a helm install on a namespace that doesn't exist, Helm will create it for you & order things appropriately, since it knows about namespaces. Lots of tools that wrap helm also rely on the standardized `--namespace`` flag to helm commands, and this would break their assumption. Finally, there might be RBAC issues - maybe the tiller SA only has rights to create objects in a namespace, but not a namespace itself (this is fairly common). I'm sure there are other reasons :)
Thank you for thinking about it, @consideRatio. I hope this explanation was useful (and correct!!! :D)