hussein-awala commented on PR #33680:
URL: https://github.com/apache/airflow/pull/33680#issuecomment-1692384365
> Yes my idea was a bit different.
I was after:
k = KubernetesPodOperator(
namespace="default",
image="ubuntu:16.04",
cmds=["bash", "-cx"],
arguments=["echo", "10"],
connection_secrets=['postgres_default'],
task_id="task",
)
That is what I do in my custom KPO operator, where it takes a list of
(connection_id, env_var_prefix) as argument, and it creates a single secret in
runtime and mounts the secret using `deploy_type=env`, for the secrets names, I
use `<env_var_prefix>_LOGIN`, `<env_var_prefix>_PASSWORD`, ... and all these
fields are available in my pod as environment variables. At the end of the
execution this secret is deleted using the cleanup or on_kill method.
--
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]