helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

podAnnotations is incorrectly passed to deployment

Open lkoniecz opened this issue 1 year ago • 1 comments

Proposal

Add removal of all leading and trailing whitespace, including newlines via {{- -}} here https://github.com/wiremock/helm-charts/blob/master/charts/wiremock/templates/_helpers.tpl#L71 and parse with toYaml

{{- toYaml .Values.podAnnotations | nindent 0 -}}

othewise the tenplate is not rendered when podAnnotation is provided

Reproduction steps

add

podAnnotations:
  aa: bb

to values.yaml, fire

❯ helm template .      
Error: YAML parse error on wiremock/templates/deployment.yaml: error converting YAML to JSON: yaml: line 23: could not find expected ':'

Use --debug flag to render out invalid YAML

References

No response

lkoniecz avatar Mar 12 '25 09:03 lkoniecz

Hi! I have a same issue :(

clementlecorre avatar Apr 08 '25 09:04 clementlecorre

Fixed by https://github.com/wiremock/helm-charts/pull/60

gitkent avatar May 22 '25 12:05 gitkent