https://pulumi.com logo
#kubernetes
Title
# kubernetes
w

worried-city-86458

09/27/2021, 9:32 PM
Re helm releases, was there also a change in behavior from helm charts re specifying a namespace? For example, installing the fluent bit chart via helm chart resource, all k8s resources were created in the specified namespace (
kube-system
). However, installing the fluent bit chart via helm release resource, all k8s resources were created in the
default
namespace. Since the fluent bit chart does not use
{{ .Release.Namespace }}
in the chart to control the namespace, I presume the helm chart resource was manipulating the namespace directly? This area is a bit of a mess it seems - see https://github.com/helm/helm/issues/5465#issuecomment-692133971 From a chart user's pov, I just want to override the namespace as before, so based on the following from the above comment:
After deliberating over the use cases described earlier, I am certain they can be solved in different manners than the proposal described earlier; either by the tooling they're using (flux and spinnaker allow you to specify the namespace), by injecting the metadata yourself through the templates, or by using the post-renderer introduced in Helm 3.1.
Is it reasonable that pulumi should be like flux and spinnaker and allow us to override the namespace?
g

gorgeous-egg-16927

09/27/2021, 9:55 PM
Yeah, we added logic to set the namespace on all resources for our helm.Chart implementation. As you note, the upstream behavior only sets that if the
{{.Release.Namespace}}
template exists on the resource. Can you open an issue to discuss further? I’m not sure if we’ll want to deviate from upstream behavior on the helm.Release. Furthermore, that was implemented in Chart using transformations, so I’m not 100% sure it’ll be possible in its current form.
Although perhaps the post-renderer would be an option there.
👍 1
s

sparse-park-68967

09/27/2021, 10:01 PM
w

worried-city-86458

09/27/2021, 10:28 PM
Definitely still useful to be able to manipulate charts and it's interesting that flux and spinnaker provide an escape hatch for namespaces; not sure how they do it without digging.
s

sparse-park-68967

09/27/2021, 10:55 PM
Agreed. This is definitely towards the top of the priority list with helm release we would like to address. I will explore how flux/spinnaker handle this
❤️ 1
6 Views