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

dry-motorcycle-32519

07/01/2021, 8:47 AM
Hey Guys Good Morning, I am deploying a helm chart with pulumi and every service name got an extra hash value at the end. How can i disable this auto naming with pulumi ?
b

billowy-army-68599

07/01/2021, 8:57 AM
Morning, this in our faqs: https://www.pulumi.com/docs/troubleshooting/faq/ It’s highly recommended to leave it turned on , but if you need to disable it, set the name property
d

dry-motorcycle-32519

07/01/2021, 9:11 AM
yeah i already saw this but i could not finde any special name field in the Chart object. https://www.pulumi.com/docs/reference/pkg/kubernetes/helm/v3/chart/
b

billowy-army-68599

07/01/2021, 9:24 AM
d

dry-motorcycle-32519

07/01/2021, 9:28 AM
but the prefix is before the name pulumi adds the hash after the name as a suffix ?
b

better-shampoo-48884

07/01/2021, 10:11 AM
yup. this is an issue for me as well - usually helm charts have something like "fullNameOverride" that you can set in values to ensure that they are named cleanly - but not all helm charts have that.
it really (REALLY) would be nice to have a "name" in addition to a "prefix" so that we wouldn't have to be dependent on the individual helm chart to resolve it. Especially in those cases where the pulumi name needs to include things like the clustername or a unique id because the same chart definition will be used against multiple clusters in the same stack
b

billowy-army-68599

07/01/2021, 10:13 AM
you can use transformations in this case, but thanks for the clarification, i wasn't aware you couldn't set the name property
b

better-shampoo-48884

07/01/2021, 10:16 AM
essentially, anything like this:
new k8s.helm.v3.Chart("my-pulumi-name", {...})
will typically result in a deployment which prefixes "my-pulumi-name" onto the deployed resource.. that's the way it is for influxdb, falco, prometheus, and other helm charts.. i.e. `my-pulumi-name-prometheus-alertmanager`pods get created. Adding
{resourcePrefix:"prometheus"}
to the options only makes it become
prometheus-my-pulumi-name-prometheus-alertmanager
b

billowy-army-68599

07/01/2021, 10:18 AM
thanks for the feedback, I've opened this issue https://github.com/pulumi/pulumi-kubernetes/issues/1644
please feel free to comment
b

better-shampoo-48884

07/01/2021, 10:20 AM
Thanks for that, I should have created that myself a while ago come to think of it 🙂
d

dry-motorcycle-32519

07/01/2021, 1:56 PM
Thank you for the answers ! 😄 my problem was solved because i did something else wrong.
13 Views