thejoeejoee opened a new issue, #67951:
URL: https://github.com/apache/airflow/issues/67951

   ### Description
   
   Several top-level Helm chart values are rendered with plain `toYaml` instead 
of `tpl(toYaml ...)`, which prevents users from using Go template expressions 
(e.g. `{{ include "airflow.fullname" . }}`) in those fields.
   
   The inconsistency is visible in how the chart already handles the 
per-component `extra*` counterparts:
   
   | Field | Current rendering | Supports templating? |
   |---|---|---|
   | `.Values.volumes` | `toYaml` | No |
   | `.Values.volumeMounts` | `toYaml` | No |
   | `.Values.pgbouncer.configSecretName` | `default ... 
.Values.pgbouncer.configSecretName` | No |
   | `scheduler.extraVolumes` | `tpl(toYaml ...)` | Yes |
   | `scheduler.extraVolumeMounts` | `tpl(toYaml ...)` | Yes |
   | `workers.extraVolumes` | `tpl(toYaml ...)` | Yes |
   | ... all other `extra*` fields | `tpl(toYaml ...)` | Yes |
   
   The fix is small and backwards-compatible — wrapping `toYaml` in `tpl` has 
no effect on values that don't contain template expressions.
   
   #### Affected templates (`.Values.volumes`)
   
   Every template that renders `.Values.volumes` uses plain `toYaml`:
   
   - `scheduler/scheduler-deployment.yaml`
   - `triggerer/triggerer-deployment.yaml`
   - `workers/worker-deployment.yaml`
   - `api-server/api-server-deployment.yaml`
   - `dag-processor/dag-processor-deployment.yaml`
   - `flower/flower-deployment.yaml`
   - `pgbouncer/pgbouncer-deployment.yaml`
   - `jobs/create-user-job.yaml`
   - `jobs/migrate-database-job.yaml`
   - `cleanup/cleanup-cronjob.yaml`
   - `database-cleanup/database-cleanup-cronjob.yaml`
   
   Same applies to `.Values.volumeMounts` in all of the above.
   
   ### Use case/motivation
   
   In multi-instance deployments (e.g. one Helm release per environment 
locality sharing a common base `values.yaml`), it is common to reference the 
release-specific fullname in volume definitions — for example, mounting a 
Secret whose name includes the release identity:
   
   ```yaml
   volumes:
     - name: broker-tls
       secret:
         secretName: '{{ include "airflow.fullname" . }}-broker-tls'
   ```
   
   Today this renders literally as `{{ include "airflow.fullname" . 
}}-broker-tls` instead of being evaluated. The workaround is to duplicate the 
volume definition into every per-component `extraVolumes` field (scheduler, 
triggerer, workers, etc.), which defeats the purpose of the global `volumes` 
field.
   
   The same limitation applies to `pgbouncer.configSecretName` — in a 
multi-instance setup, each release needs a distinct secret name derived from 
the release identity, but the field doesn't support templating.
   
   ### Related issues
   
   - #64037 — Helm Refurbish (umbrella for chart 2.0.0)
   - #63179 — Different Volumes/VolumeMount for each Celery Workers Sets 
(related but focused on per-worker-set volumes)
   
   ### Are you willing to submit a PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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]

Reply via email to