Skip to content
New issue

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

Deployment Env Vars passed in as a list aren't joined with Env Vars set on a work-pool #17406

Open
masonmenges opened this issue Mar 6, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@masonmenges
Copy link
Contributor

Bug summary

Environment Variables set on a Kubernetes work-pool that are passed in as a list are not joined with env variables that are set as job variables on a deployment instead only the environment variables set on the deployment are referenced, they are merged when passing in a dictionary of Variables, This primarily comes up when trying to reference Secret Values as env variables in Kubernetes as this requires passing in the variables as a list for it to be supported.

Workpool Environment variables:

[{"name":"SUPER_SECRET","valueFrom":{"secretKeyRef":{"key":"super-secret","name":"some-new-secret-test"}}},{"name":"some workpool variable","value":"SUPER WORKPOOL VARIABLE"}]

Deployment Environment Variables:

[{"name": "env_var_job_var_new", "value": "job_var1"}]

Environment Variables from the pod:

        - name: PREFECT_DEBUG_MODE
          value: 'False'
        - name: PREFECT_API_URL
          value: 
        - name: PREFECT_API_KEY
          value: 
        - name: PREFECT_API_ENABLE_HTTP2
          value: 'True'
        - name: PREFECT_LOGGING_LEVEL
          value: DEBUG
        - name: PREFECT_SERVER_EPHEMERAL_ENABLED
          value: 'True'
        - name: PREFECT_WORKER_QUERY_SECONDS
          value: '5.0'
        - name: PREFECT_WORKER_PREFETCH_SECONDS
          value: '10.0'
        - name: PREFECT__FLOW_RUN_ID
          value: 324db939-06c6-45be-9b86-cdcd4919fe2c
        - name: env_var_job_var_new
          value: job_var1

Version info

Version:             3.2.11
API version:         0.8.4
Python version:      3.12.4
Git commit:          9481694f
Built:               Wed, Mar 5, 2025 10:00 PM
OS/Arch:             darwin/arm64
Profile:             masonsandbox
Server type:         cloud
Pydantic version:    2.10.6
Integrations:
  prefect-dask:      0.3.2
  prefect-snowflake: 0.28.0
  prefect-slack:     0.3.0
  prefect-gcp:       0.6.2
  prefect-aws:       0.5.0
  prefect-gitlab:    0.3.1
  prefect-dbt:       0.6.4
  prefect-kubernetes: 0.5.8
  prefect-docker:    0.6.1
  prefect-sqlalchemy: 0.5.1
  prefect-shell:     0.3.1

Additional context

No response

@masonmenges masonmenges added the bug Something isn't working label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant