Pass env vars from Kubernetes agent to job

is there a way to safely pass environment variables defined on the agent running in Kubernetes to
the Kubernetes Job Infrastructure?

I would love to define for instance DB_PASSWORD on the agent and pass that to each job. I know i can define env vars on the K8sJob Infrastructure level or via Secret, but that does not sound ideal for my use case.

Thanks for any help, cheers

Great question! The right way to do it is by using not environment variables, but Secret blocks