We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently the job template generation only allows to create simple key value pairs even though Kubernetes supports https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/ more. Example:
"env": { "PREFECT_HOME": "/home/prefect", "PREFECT_DEBUG_MODE": "false", "PREFECT_LOCAL_STORAGE_PATH": "/home/prefect/storage", "DD_AGENT_HOST": { "valueFrom": { "fieldRef": {"apiVersion": "v1", "fieldPath": "status.hostIP"} } } }
Results:
env: ... - name: PREFECT_DEBUG_MODE value: 'False' - name: PREFECT_HOME value: /home/prefect - name: DD_AGENT_HOST value: '{''valueFrom'': {''fieldRef'': {''fieldPath'': ''status.hostIP'', ''apiVersion'': ''v1''}}}' - name: PREFECT_LOCAL_STORAGE_PATH value: /home/prefect/storage
Looking at the Prefect 2 code
class BaseJobConfiguration(BaseModel): ... async def from_template_and_values ( ... if isinstance(base_config.get("env"), dict) and ( deployment_env := variables.get("env") ): base_config["env"] = {**base_config.get("env", {}), **deployment_env}
or Prefect 3 code it is simply not supported yet.
async def from_template_and_values ( ... if isinstance(job_config.get("env"), dict) and ( hardcoded_env := variables.get("env") ): job_config["env"] = hardcoded_env | job_config.get("env")
Template:
Result:
env: ... - name: PREFECT_DEBUG_MODE value: 'False' - name: PREFECT_HOME value: /home/prefect - name: DD_AGENT_HOST valueFrom: fieldRef: apiVersion: v1 fieldPath: status.hostIP - name: PREFECT_LOCAL_STORAGE_PATH value: /home/prefect/storage
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the current behavior
Currently the job template generation only allows to create simple key value pairs even though Kubernetes supports https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/ more.
Example:
Results:
Looking at the Prefect 2 code
or Prefect 3 code it is simply not supported yet.
Describe the proposed behavior
Example Use
Template:
Result:
Additional context
No response
The text was updated successfully, but these errors were encountered: