Closed gtudan closed 4 hours ago
@gtudan This happens because the annotations are passed into the chart in this way. https://github.com/oauth2-proxy/manifests/blob/main/helm/oauth2-proxy/templates/ingress.yaml#L19-L21
However, this is Helm's normal functioning. I'd like to point you to the PR where the behavior you suggested was proposed, analyzed, and finally rejected for various concerns. https://github.com/helm/helm/pull/6876#pullrequestreview-482774751
@pierluigilenoci Thanks for your quick response! I totally understand and am aware that this is a restriction by Helm. But there are ways around this: Some charts (i.e. most Bitnami charts) process the input of such fields through helms tpl
function, instead of toYaml
to resolve any string templates within a parameter.
Helm mentions this "work-around" in their FAQ.
I think this could be an option - would you be open for a PR?
I noticed that this is already done in a couple of places: https://github.com/oauth2-proxy/manifests/blob/main/helm/oauth2-proxy/ci/tpl-values.yaml
I'll create a PR for the annotations
@gtudan, these are the values files used in the CI for testing.
I have a use case where I need to include helm templates in an annotation. Example:
This does not work as of now - the "{{ .Release.Name }}"-part is not interpreted and written as is to the rendered manifest.