Skip to content

Chart: Support Helm template expressions in podAnnotations#63019

Merged
jscheffl merged 5 commits intoapache:mainfrom
XD-DENG:feat/helm-pod-annotations-tpl
Mar 9, 2026
Merged

Chart: Support Helm template expressions in podAnnotations#63019
jscheffl merged 5 commits intoapache:mainfrom
XD-DENG:feat/helm-pod-annotations-tpl

Conversation

@XD-DENG
Copy link
Member

@XD-DENG XD-DENG commented Mar 6, 2026

Enable tpl evaluation for podAnnotations and airflowPodAnnotations across all chart templates, allowing users to use Helm template expressions such as {{ .Release.Name }} or {{ include ... | sha256sum }} in annotation values.

This is useful for adding checksum annotations that trigger pod restarts when dependent ConfigMaps or Secrets change, e.g.:

extraConfigMaps:
  my-listener-config:
    data: |
      listener.py: ...

scheduler:
  podAnnotations:
    checksum/extra-configmaps: '{{ include (print $.Template.BasePath "/configmaps/extra-configmaps.yaml") . | sha256sum }}'

This follows the same tpl (toYaml ...) . pattern already used ~126 times in this chart for fields like command, args, extraVolumes, extraContainers, and serviceAccount.annotations.

closes: #62698


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code

Generated-by: Claude Code following the guidelines

Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

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

Looks like a reasonable feature to me and tests are green. Good from my side.

@jscheffl jscheffl added this to the Airflow Helm Chart 1.20.0 milestone Mar 7, 2026
Copy link
Contributor

@Miretpl Miretpl left a comment

Choose a reason for hiding this comment

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

Small nits to the doc as I refactored it couple days ago (also we could change the name of the customizing-labels file if we are adding there section about annotations).

XD-DENG added 4 commits March 9, 2026 10:30
Enable tpl evaluation for `podAnnotations` and `airflowPodAnnotations`
across all chart templates, allowing users to use Helm template
expressions such as `{{ .Release.Name }}` or
`{{ include ... | sha256sum }}` in annotation values.

This is useful for adding checksum annotations that trigger pod restarts
when dependent ConfigMaps or Secrets change.

closes: apache#62698
@XD-DENG XD-DENG force-pushed the feat/helm-pod-annotations-tpl branch from 74fa0e4 to 075fed6 Compare March 9, 2026 17:30
@XD-DENG
Copy link
Member Author

XD-DENG commented Mar 9, 2026

Rebased the branch.

@XD-DENG XD-DENG requested a review from Miretpl March 9, 2026 17:39
@jscheffl
Copy link
Contributor

jscheffl commented Mar 9, 2026

CI error is unrelated, is broken on main as well :-( Merging therefore...

@jscheffl jscheffl merged commit faa8ada into apache:main Mar 9, 2026
95 of 96 checks passed
@XD-DENG
Copy link
Member Author

XD-DENG commented Mar 9, 2026

Thanks @jscheffl

@XD-DENG XD-DENG deleted the feat/helm-pod-annotations-tpl branch March 9, 2026 22:32
jason810496 pushed a commit to jason810496/airflow that referenced this pull request Mar 10, 2026
)

* Support Helm template expressions in podAnnotations

Enable tpl evaluation for `podAnnotations` and `airflowPodAnnotations`
across all chart templates, allowing users to use Helm template
expressions such as `{{ .Release.Name }}` or
`{{ include ... | sha256sum }}` in annotation values.

This is useful for adding checksum annotations that trigger pod restarts
when dependent ConfigMaps or Secrets change.

closes: apache#62698

* Rename chart newsfragment to PR number 63019

* Fix doc nits in customizing-labels: trim underlines and clarify api-server/webserver wording

* Address doc structure: add Customizing Pod Labels subsection under umbrella heading
thejoeejoee pushed a commit to thejoeejoee/airflow that referenced this pull request Mar 10, 2026
)

* Support Helm template expressions in podAnnotations

Enable tpl evaluation for `podAnnotations` and `airflowPodAnnotations`
across all chart templates, allowing users to use Helm template
expressions such as `{{ .Release.Name }}` or
`{{ include ... | sha256sum }}` in annotation values.

This is useful for adding checksum annotations that trigger pod restarts
when dependent ConfigMaps or Secrets change.

closes: apache#62698

* Rename chart newsfragment to PR number 63019

* Fix doc nits in customizing-labels: trim underlines and clarify api-server/webserver wording

* Address doc structure: add Customizing Pod Labels subsection under umbrella heading
dominikhei pushed a commit to dominikhei/airflow that referenced this pull request Mar 11, 2026
)

* Support Helm template expressions in podAnnotations

Enable tpl evaluation for `podAnnotations` and `airflowPodAnnotations`
across all chart templates, allowing users to use Helm template
expressions such as `{{ .Release.Name }}` or
`{{ include ... | sha256sum }}` in annotation values.

This is useful for adding checksum annotations that trigger pod restarts
when dependent ConfigMaps or Secrets change.

closes: apache#62698

* Rename chart newsfragment to PR number 63019

* Fix doc nits in customizing-labels: trim underlines and clarify api-server/webserver wording

* Address doc structure: add Customizing Pod Labels subsection under umbrella heading
Pyasma pushed a commit to Pyasma/airflow that referenced this pull request Mar 13, 2026
)

* Support Helm template expressions in podAnnotations

Enable tpl evaluation for `podAnnotations` and `airflowPodAnnotations`
across all chart templates, allowing users to use Helm template
expressions such as `{{ .Release.Name }}` or
`{{ include ... | sha256sum }}` in annotation values.

This is useful for adding checksum annotations that trigger pod restarts
when dependent ConfigMaps or Secrets change.

closes: apache#62698

* Rename chart newsfragment to PR number 63019

* Fix doc nits in customizing-labels: trim underlines and clarify api-server/webserver wording

* Address doc structure: add Customizing Pod Labels subsection under umbrella heading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

helm checksums support in Helm Chart

3 participants