feat(vector): allow templating pod annotations#511
Open
elohmeier wants to merge 2 commits intovectordotdev:developfrom
Open
feat(vector): allow templating pod annotations#511elohmeier wants to merge 2 commits intovectordotdev:developfrom
elohmeier wants to merge 2 commits intovectordotdev:developfrom
Conversation
pront
approved these changes
Oct 27, 2025
Member
pront
left a comment
There was a problem hiding this comment.
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
Author
|
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. |
Author
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.