Add additional annotations to existing helm chart

5/19/2019

I want to add some annotations to the metadata block of a service within an existing helm chart (I have to add an annotation for Prometheus so that the service is auto discovered). The chart (it is the neo4j chart) does not offer me a configuration that I can use to set annotations. I also looked into the yaml files and noticed that there is no variable I can use to insert something in the metadata block. The only solution I can see is that I have to fork the chart, insert the annotation data to the correct place and create my own chart out of it. Is that really the only solution or is there some trick I am missing that allows me to modify the helm chart without creating a new one?

-- Matthew Darton
kubernetes
kubernetes-helm

1 Answer

5/19/2019

In Helm 2, you are correct. Either you would have to fork the chart or pass it through another tool after rendering like Kustomize. Helm 3 has some planned features to improve this in the future.

-- coderanger
Source: StackOverflow