Yes, your jobs executed from a specific worker can have their secret mounts and environment variables configured. The details on how to set environment variables and use secrets with your worker infrastructure isn't explicitly detailed in one place, but typically this configuration is part of the worker setup or deployment process.
In the case of using
Docker workers, you would typically configure environment variables and secrets in the Docker image that your worker uses or pass them at runtime.
Prefect also mentions
environment variables in the context of work pools, which suggests that you can set environment variables when starting a flow run.
However, the specifics of configuring secret mounts will depend on the orchestration platform you are using (Kubernetes, Docker Swarm, etc.) and how Prefect is set up to interact with it.
If you are using Kubernetes, you would typically mount secrets as volumes in your pod specifications and reference those in your Kubernetes-based Prefect Agent or Worker deployment manifest.
For more detailed guidance, you may need to consult the Prefect documentation for the specific type of worker and orchestration platform you are integrating with, or extend your search to GitHub issues if there are particular challenges or edge cases that others have encountered.