AaryanCdry opened a new pull request, #70864: URL: https://github.com/apache/airflow/pull/70864
## Summary This PR extracts the `AIRFLOW__API_AUTH__JWT_SECRET` environment variable block from the inline definition in `standard_airflow_environment` to a standalone `jwt_secret_environment` helper template in `chart/templates/_helpers.yaml`. ## Motivation PR [#63204](https://github.com/apache/airflow/pull/63204) added the JWT secret env var directly inside `standard_airflow_environment`. While this works, it means the JWT env var is inherited by every deployment template that includes the standard helper, making it impossible to include or exclude it per component. Extracting it to a dedicated helper: - Improves template readability by separating the JWT concern - Enables future per-component opt-in/opt-out of the JWT env var - Follows the existing pattern where each secret has its own named helper ## Changes ```diff - {{- if and (semverCompare ">=3.0.0" .Values.airflowVersion) .Values.enableBuiltInSecretEnvVars.AIRFLOW__API_AUTH__JWT_SECRET }} - - name: AIRFLOW__API_AUTH__JWT_SECRET - valueFrom: - secretKeyRef: - name: {{ template "jwt_secret" . }} - key: jwt-secret - {{- end }} + {{- include "jwt_secret_environment" . }} ``` New helper added after `standard_airflow_environment`: ```yaml {{- define "jwt_secret_environment" }} {{- if and (semverCompare ">=3.0.0" .Values.airflowVersion) .Values.enableBuiltInSecretEnvVars.AIRFLOW__API_AUTH__JWT_SECRET }} - name: AIRFLOW__API_AUTH__JWT_SECRET valueFrom: secretKeyRef: name: {{ template "jwt_secret" . }} key: jwt-secret {{- end }} {{- end }} ``` ## Behavior No behavior change. All components that previously received the JWT env var continue to receive it through the new helper via `standard_airflow_environment`. Closes #70843 -- 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]
