Remove automatic KUBERNETES_ENVIRONMENT_VARIABLES and KUBERNETES_SECRETS prefixes from chart helpers#60750
Conversation
jscheffl
left a comment
There was a problem hiding this comment.
We are planning soonish a version 2.0 with cleanups and reduction of scope. I'd assume we should hold-back this PR for the version 2.0 and put the breaking change there.
Otherwise I think it is a good idea not to expose these ecrets and wonder why this had been in there first place. Maybe it never affected me as I an not using KubernetesExecutor but Celery.
|
@jscheffl I believe the changes in this PR should be reconsidered when we start working on the 2.0 roadmap, so I will close this one for now. I would appreciate it if you could review the new PR (#60750) instead. |
cc386ee to
2caf77c
Compare
KUBERNETES_ENVIRONMENT_VARIABLES prefix from container_extra_envsKUBERNETES_ENVIRONMENT_VARIABLES and KUBERNETES_SECRETS prefixes from chart helpers
…refix from custom_airflow_environment
…es from custom_airflow_environment
2caf77c to
ff6423a
Compare
|
@uplsh580 do not worry about failed docs build. This is broken on main and is in fixing in parallel. Unrelated to this PR. (Fixed in #63630) @jedcunningham okay for you to merge for 1.20? |
Description
Remove the automatic addition of the
AIRFLOW__KUBERNETES_ENVIRONMENT_VARIABLES__andAIRFLOW__KUBERNETES_SECRETS__prefixes from thecontainer_extra_envsandcustom_airflow_environmenthelper functions.Related Issue
Changes
container_extra_envshelper to stop automatically prepending theAIRFLOW__KUBERNETES_ENVIRONMENT_VARIABLES__prefix.custom_airflow_environmenthelper to stop automatically prepending both theAIRFLOW__KUBERNETES_ENVIRONMENT_VARIABLES__prefix (for.Values.env) and theAIRFLOW__KUBERNETES_SECRETS__prefix (for.Values.secret).Motivation
Prevent Unintended Exposure of Sensitive Data
client_secret) that should be securely handled viasecretKeyReffor specific components was being automatically prefixed withAIRFLOW__KUBERNETES_ENVIRONMENT_VARIABLES__.AIRFLOW__API__EXPOSE_CONFIGis set tonon-sensitive-only, creating a security vulnerability. For more details, see the issue description.Avoid Unintended Environment Propagation to Workers
.values.{SOME_COMPONENTS}.env,.values.env,.values.secret) appear to be intended strictly for specific components (e.g.,apiServer,Scheduler).Migration
If you need to pass environment variables or secrets specifically to Kubernetes Executor worker pods:
.values.envfield: