Skip to content

feat: support tpl evaluation in podAnnotations#709

Open
elimayost wants to merge 1 commit into
fluent:mainfrom
elimayost:feat/template-pod-annotations
Open

feat: support tpl evaluation in podAnnotations#709
elimayost wants to merge 1 commit into
fluent:mainfrom
elimayost:feat/template-pod-annotations

Conversation

@elimayost
Copy link
Copy Markdown

Description

This PR enables tpl evaluation within the podAnnotations loop of the Fluentd DaemonSet.

Why? The current toYaml implementation treats annotation values as static strings. By using tpl, users can pass dynamic template logic into annotations via values.yaml.

Use Case: This is specifically useful when using Fluentd as a subchart. It allows a parent chart to inject dynamic file-based checksums (e.g., checksum/config: '{{ include "parent.configHash" . }}'), solving the issue of triggering rolling restarts when external configurations change.

Changes:

Replaced static toYaml with a range loop and tpl function in daemonset.yaml.

Maintained backward compatibility for existing static annotations.

Copy link
Copy Markdown
Collaborator

@stevehipwell stevehipwell left a comment

Choose a reason for hiding this comment

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

@elimayost please follow the contributing guide; you need to add a changelog entry.

Comment thread charts/fluentd/templates/daemonset.yaml Outdated
@stevehipwell
Copy link
Copy Markdown
Collaborator

@elimayost you also need to sign the DCO.

@elimayost elimayost force-pushed the feat/template-pod-annotations branch from 23d4117 to be97764 Compare April 14, 2026 07:38
@elimayost elimayost requested a review from stevehipwell April 14, 2026 07:51
@elimayost elimayost force-pushed the feat/template-pod-annotations branch from be97764 to 68ccb88 Compare April 15, 2026 07:24
@elimayost
Copy link
Copy Markdown
Author

@stevehipwell How can I make this PR move forward? Apologies if it's obvious, but it is the first time I contribute. fluentd/CHANGELOG didn't exist so I created it.

@stevehipwell
Copy link
Copy Markdown
Collaborator

@elimayost if you rebase your PR you should be able to use the CHANGELOG I added in #720 and the automation tests should also pass.

Signed-off-by: Eli Mayost <eli.mayost@gmail.com>
@elimayost elimayost force-pushed the feat/template-pod-annotations branch from 43894ba to e4e35ba Compare May 15, 2026 11:10
@elimayost
Copy link
Copy Markdown
Author

@stevehipwell Done. Hopefully correctly. Thanks for your support.

Copy link
Copy Markdown
Collaborator

@stevehipwell stevehipwell left a comment

Choose a reason for hiding this comment

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

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.

2 participants