Chart: Enable templating in extraContainers and extraInitContainers
Currently, the extraContainers and extraInitContainers are passed on an "as-is" basis. What this means in practice is that if you depend on a release-specific resource you have to manually provide the names rather than use templating.
Example: mounting a release-specific ConfigMap into an extraContainer
The following config will not work, since it produces an init container which references {{ .Release.Name }}-stuff-config copied verbatim, rather than the templated value including the actual release name as you would expect.
workers:
extraInitContainers:
- name: init-stuff
image: does/stuff:1.0.0
envFrom:
- configMapRef:
name: "{{ .Release.Name }}-stuff-config"
extraConfigMaps:
'{{ .Release.Name }}-stuff-config':
data: |-
STUFF_ENV_VAR1: one
STUFF_ENV_VAR2: two
This PR enables templating for extraContainers and extraInitContainers fields to fix this issue and improve the reusability of the chart.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.
Rebased on main
IMO would also be nice to add informations about templating to the comments in values file itself (as in done volumes)
I'm personally waiting for this to be merged as I depend on this feature in umbrella chart I'm writing.