Skip to content

Conversation

@elohmeier
Copy link

Workload templates now render podAnnotations through tpl, so users can supply templated checksums (e.g. hashing external ConfigMaps) without chart changes. This is useful when no cluster access is available e.g. when using the rendered manifest pattern.

Copy link
Member

@pront pront left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable.

Can this theoretically break someone if they had literal double-brace strings in their annotations?

  podAnnotations:
    example: "This is a {{ literal string }}"  # Would now be interpreted as template

@elohmeier
Copy link
Author

elohmeier commented Nov 3, 2025

I found a way to work around this limitation using:

rollWorkloadExtraObjects: true
dataDir: /vector-data-dir
existingConfigMaps:
  - vector-external-config
extraObjects:
  - apiVersion: v1
    kind: ConfigMap
    metadata:
      name: vector-external-config
      namespace: "{{ .Release.Namespace }}"
    binaryData:
      vector.yaml: '{{ .Files.Get "files/vector.yaml" | b64enc }}'

After further analysis, this workaround does not work - helm won't cross chart file boundaries, so it cannot access files e.g. when Vector is used as a subchart/dependency.

@elohmeier
Copy link
Author

Looks reasonable.

Can this theoretically break someone if they had literal double-brace strings in their annotations?

  podAnnotations:
    example: "This is a {{ literal string }}"  # Would now be interpreted as template

@pront Thanks for your feedback. Yes this would break in that scenario. Given the intended use cases for annotations I think this would still be a reasonable "breaking" change.

@pront pront enabled auto-merge (squash) November 11, 2025 16:41
@pront pront disabled auto-merge November 11, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants