KR-Ravindra opened a new pull request, #76286:
URL: https://github.com/apache/airflow/pull/76286
We mount a hostPath volume whose path comes from a Dag param, and
KubernetesPodOperator sends the raw `{{ params.x }}` string to Kubernetes
instead of the rendered path.
### Problem
The nested template walk only renders `name`, `persistent_volume_claim` and
`config_map` on `V1Volume` and `name`/`sub_path` on `V1VolumeMount`, so
`V1HostPathVolumeSource.path` and `V1VolumeMount.mount_path` are never rendered.
### Fix
Add `host_path` to the `V1Volume` fields, render `path` on
`V1HostPathVolumeSource`, and add `mount_path` to `V1VolumeMount`, the same way
https://github.com/apache/airflow/pull/27719 added the existing ones.
### How tested
Extended `test_templates` in `test_pod.py`; it fails on main for both fields
and passes with this change.
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Code following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
Experimented and verified with an AI agent.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]