You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "XD-DENG (via GitHub)" <gi...@apache.org> on 2026/03/06 22:46:53 UTC

[PR] Chart: Support Helm template expressions in podAnnotations [airflow]

XD-DENG opened a new pull request, #63019:
URL: https://github.com/apache/airflow/pull/63019

   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.:
   
   ```yaml
   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?
   
   - [X] Yes — Claude Code
   
   Generated-by: Claude Code following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Chart: Support Helm template expressions in podAnnotations [airflow]

Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl commented on PR #63019:
URL: https://github.com/apache/airflow/pull/63019#issuecomment-4027272491

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Chart: Support Helm template expressions in podAnnotations [airflow]

Posted by "Miretpl (via GitHub)" <gi...@apache.org>.
Miretpl commented on code in PR #63019:
URL: https://github.com/apache/airflow/pull/63019#discussion_r2900835547


##########
chart/docs/customizing-labels.rst:
##########
@@ -59,3 +59,66 @@ For example, to add specific labels to different components:
    apiServer:
      labels:
        role: ui
+
+Customizing Pod Annotations
+============================
+
+Pod annotations can be customized similarly to labels using ``podAnnotations`` and ``airflowPodAnnotations``.
+
+Global Pod Annotations
+----------------------
+
+Global pod annotations can be set using ``airflowPodAnnotations``. These are applied to all Airflow component pods (scheduler, API server, triggerer, dag processor, workers, and webserver):
+
+.. code-block:: yaml
+   :caption: values.yaml
+
+   airflowPodAnnotations:
+     example.com/team: data-platform
+
+Component-Specific Pod Annotations
+-----------------------------------

Review Comment:
   ```suggestion
   ----------------------------------
   ```



##########
chart/docs/customizing-labels.rst:
##########
@@ -59,3 +59,66 @@ For example, to add specific labels to different components:
    apiServer:
      labels:
        role: ui
+
+Customizing Pod Annotations
+============================
+
+Pod annotations can be customized similarly to labels using ``podAnnotations`` and ``airflowPodAnnotations``.
+
+Global Pod Annotations
+----------------------
+
+Global pod annotations can be set using ``airflowPodAnnotations``. These are applied to all Airflow component pods (scheduler, API server, triggerer, dag processor, workers, and webserver):

Review Comment:
   ```suggestion
   Global pod annotations can be set using ``airflowPodAnnotations``. These are applied to all Airflow component pods (scheduler, api-server/webserver, triggerer, dag-processor and workers):
   ```
   I think it would be more precise as you can deploy `api-server` or `webserver`



##########
chart/docs/customizing-labels.rst:
##########
@@ -59,3 +59,66 @@ For example, to add specific labels to different components:
    apiServer:
      labels:
        role: ui
+
+Customizing Pod Annotations
+============================
+
+Pod annotations can be customized similarly to labels using ``podAnnotations`` and ``airflowPodAnnotations``.
+
+Global Pod Annotations
+----------------------
+
+Global pod annotations can be set using ``airflowPodAnnotations``. These are applied to all Airflow component pods (scheduler, API server, triggerer, dag processor, workers, and webserver):
+
+.. code-block:: yaml
+   :caption: values.yaml
+
+   airflowPodAnnotations:
+     example.com/team: data-platform
+
+Component-Specific Pod Annotations
+-----------------------------------
+
+Each component also supports its own ``podAnnotations``. Component-specific annotations take precedence over global ones:
+
+.. code-block:: yaml
+   :caption: values.yaml
+
+   scheduler:
+     podAnnotations:
+       example.com/component: scheduler
+
+Templated Pod Annotations
+--------------------------

Review Comment:
   ```suggestion
   -------------------------
   ```



##########
chart/docs/customizing-labels.rst:
##########
@@ -59,3 +59,66 @@ For example, to add specific labels to different components:
    apiServer:
      labels:
        role: ui
+
+Customizing Pod Annotations
+============================

Review Comment:
   ```suggestion
   ===========================
   ```



##########
chart/docs/customizing-labels.rst:
##########
@@ -15,8 +15,8 @@
    specific language governing permissions and limitations
    under the License.
 
-Customizing Labels for Pods
-===========================
+Customizing Labels and Annotations for Pods
+=============================================

Review Comment:
   ```suggestion
   Customizing Labels for Pods
   ===========================
   ```
   looking at the hierarchy this section is equal to new `Customizing Pod Annotations`. We could also stay with this and add `Customizing Labels for Pods` and `Customizing Pod Annotations` on `---` hierarchy level to be under `Customizing Labels and Annotations for Pods`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Chart: Support Helm template expressions in podAnnotations [airflow]

Posted by "XD-DENG (via GitHub)" <gi...@apache.org>.
XD-DENG commented on PR #63019:
URL: https://github.com/apache/airflow/pull/63019#issuecomment-4025519601

   Rebased the branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Chart: Support Helm template expressions in podAnnotations [airflow]

Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl merged PR #63019:
URL: https://github.com/apache/airflow/pull/63019


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Chart: Support Helm template expressions in podAnnotations [airflow]

Posted by "XD-DENG (via GitHub)" <gi...@apache.org>.
XD-DENG commented on code in PR #63019:
URL: https://github.com/apache/airflow/pull/63019#discussion_r2906914797


##########
chart/docs/customizing-labels.rst:
##########
@@ -15,8 +15,8 @@
    specific language governing permissions and limitations
    under the License.
 
-Customizing Labels for Pods
-===========================
+Customizing Labels and Annotations for Pods
+=============================================

Review Comment:
   Agreed. Address with commit https://github.com/apache/airflow/pull/63019/commits/74fa0e4962ad018a19941991a229f32cc213bf83
   
   Thanks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Chart: Support Helm template expressions in podAnnotations [airflow]

Posted by "XD-DENG (via GitHub)" <gi...@apache.org>.
XD-DENG commented on PR #63019:
URL: https://github.com/apache/airflow/pull/63019#issuecomment-4027344853

   Thanks @jscheffl 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org