Skip to content

[chart/v1-2x-test] Separate JWT secret env var from the standard Airflow environment helper (#70896) - #71129

Open
rohan9446 wants to merge 1 commit into
apache:chart/v1-2x-testfrom
rohan9446:backport-562cc3e-chart/v1-2x-test
Open

[chart/v1-2x-test] Separate JWT secret env var from the standard Airflow environment helper (#70896)#71129
rohan9446 wants to merge 1 commit into
apache:chart/v1-2x-testfrom
rohan9446:backport-562cc3e-chart/v1-2x-test

Conversation

@rohan9446

Copy link
Copy Markdown
Contributor

Manual backport of #70896 to chart/v1-2x-test, as requested by @Miretpl.

The automated backport conflicted because this branch still supports Airflow 2 alongside 3:

  • the AIRFLOW__API_AUTH__JWT_SECRET block is additionally gated on semverCompare ">=3.0.0" .Values.airflowVersion — that gate now lives inside the new jwt_secret_environment helper, so Airflow 2 rendering is unchanged
  • there is no keda_airflow_environment helper on this branch, so the new define sits before custom_airflow_environment instead (the cherry-picked commit message references it — that's carried over from main)
  • the helm tests live under helm-tests/tests/ rather than chart/tests/

Otherwise identical to main: IncludeJwtSecret is gone from standard_airflow_environment and all ten call sites, and the secret is included explicitly in the API server and scheduler containers only.

Tested locally with helm v3.21.3: pytest helm-tests/tests/helm_tests/ → 3454 passed.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude (Cowork) following the guidelines

…low environment helper (apache#70896)

`AIRFLOW__API_AUTH__JWT_SECRET` was rendered from inside
`standard_airflow_environment` behind an `IncludeJwtSecret` flag, so every
component had to opt out of it explicitly with
`(merge (dict "IncludeJwtSecret" false) .)`.

Move the variable into its own `jwt_secret_environment` helper, following the
shape of the existing `keda_airflow_environment` helper, and include it only in
the API server and scheduler containers that need it. Every other caller of
`standard_airflow_environment` passes a plain context again, and the
`IncludeJwtSecret` context mutation is gone.

No behavioural change: the same containers receive the same variable, still
gated on `enableBuiltInSecretEnvVars.AIRFLOW__API_AUTH__JWT_SECRET`, preserving
the least-privilege exposure introduced in apache#63204. Only the position of the
variable within the rendered env list changes, so the ordered assertion in
`test_have_all_variables` is updated to match.

Closes: apache#70843
(cherry picked from commit 562cc3e)

Co-authored-by: rohan9446 <99634410+rohan9446@users.noreply.github.com>
Co-authored-by: rohan9446 <bandaru04052004@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:helm-chart Airflow Helm Chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant