-
|
I have an existing secret in the airflow namespace with
When I do the following the extraEnv: |
- name: rds_username
valueFrom:
secretKeyRef:
name: airflow-v3-base-rds-access
key: username
- name: rds_password
valueFrom:
secretKeyRef:
name: airflow-v3-base-rds-access
key: password
- name: rds_address
valueFrom:
secretKeyRef:
name: airflow-v3-base-rds-access
key: endpoint
- name: rds_port
valueFrom:
secretKeyRef:
name: airflow-v3-base-rds-access
key: port
- name: connection
value: "postgresql://${rds_username}:${rds_password@$(rds_endpoint):${rds_port}/airflow?sslmode=disable"I get How can I get airflow to use the existing secret values? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
|
In our bitnami based airflow we were able to use the following env vars. But that looks to only be supported by bitnami
|
Beta Was this translation helpful? Give feedback.
-
|
You could likely use the _CMD version of the connection variable - it should point to a bash script that would combine the variables. |
Beta Was this translation helpful? Give feedback.
-
|
Just make sure your _CMD script does not produce value with \n (use echo -n). Common issue when you are dealing with this . |
Beta Was this translation helpful? Give feedback.
-
|
The answer was to
|
Beta Was this translation helpful? Give feedback.
The answer was to
_CMDvariables_CMDvars to false underenableBuiltInSecretEnvVarsextraConfigMapsto add the scriptvolumesandvolumeMountsto add the script/configmap to the podsextraEnvFromto load the whole existing secret to the env