https://prefect.io logo
#prefect-community
Title
# prefect-community
a

alex

07/25/2022, 7:32 PM
Quick question: For prefect 1.0, should the env vars set in the agent's deployment manifests be present in executed flow's job environment? ?
1
m

Mason Menges

07/25/2022, 11:06 PM
Hey @alex Environment variables should be specified in the agent configuration. https://docs.prefect.io/api/latest/agent/kubernetes.html?#kubernetesagent
a

alex

07/26/2022, 1:44 PM
Hey @Mason Menges thanks for the answer. To confirm if I set an env var in my agent's manifest file, it will also be set in the flow run container?
Copy code
containers:
      - args:
        - prefect agent kubernetes start
        command:
        - /bin/bash
        - -c
        env:
        - name: PREFECT__CLOUD__AGENT__AUTH_TOKEN
          value: ''
        - name: PREFECT__CLOUD__API
          value: <https://api.prefect.io>
        - name: MY_CUSTOM_ENV_VAR
          value: 12313123213123213
m

Mason Menges

07/26/2022, 5:11 PM
As far as I'm aware yes that's correct, it should be inferred when the agent submits the job.
5 Views