Skip to content

Commit 603f3b6

Browse files
committed
fix(argocd-image-updater): escape Go template syntax in CRD descriptions
## What Re-escape the `{{ .app.path.path }}` placeholders inside the writeBackTarget description fields of crd-imageupdaters.yaml so Helm emits them literally instead of evaluating them as template expressions. ## Why The v1.2.0 CRD sync removed the prior Helm escape wrapper, leaving upstream's literal `{{ .app.path.path }}` text in the YAML descriptions. Helm parses the entire template through Go templates before YAML, so it tried to evaluate `.app.path.path` against the chart context and failed with a nil-pointer error during chart-test lint with ci/enable-extra-objects-values.yaml. ## Notes - Renovate may overwrite this fix the next time it regenerates this branch; if so the same escape will need to be reapplied. - Uses the backtick raw-string escape `{{`...`}}` so the rendered output matches the upstream CRD verbatim, with no surrounding quotes (versus the prior `{{ quote ... }}` form). - A second occurrence at the per-image override level had the same regression and is fixed identically. Signed-off-by: jmeridth <[email protected]>
1 parent ef8e937 commit 603f3b6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

charts/argocd-image-updater/templates/crd-imageupdaters.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ spec:
358358
description: |-
359359
WriteBackTarget defines the path and type of file to update in the Git repository.
360360
Examples: "helmvalues:./helm/values.yaml", "kustomization:./kustomize/overlays/production".
361-
For ApplicationSet usage, `{{ .app.path.path }}` should be resolved by ApplicationSet
361+
For ApplicationSet usage, `{{`{{ .app.path.path }}`}}` should be resolved by ApplicationSet
362362
before this CR is generated, resulting in a concrete path here.
363363
Required if write-back method is Git and this is not specified at the spec level.
364364
type: string
@@ -476,7 +476,7 @@ spec:
476476
description: |-
477477
WriteBackTarget defines the path and type of file to update in the Git repository.
478478
Examples: "helmvalues:./helm/values.yaml", "kustomization:./kustomize/overlays/production".
479-
For ApplicationSet usage, `{{ .app.path.path }}` should be resolved by ApplicationSet
479+
For ApplicationSet usage, `{{`{{ .app.path.path }}`}}` should be resolved by ApplicationSet
480480
before this CR is generated, resulting in a concrete path here.
481481
Required if write-back method is Git and this is not specified at the spec level.
482482
type: string

0 commit comments

Comments
 (0)