Hey guys! I setup my k8s dagster configuration lik...
# deployment-kubernetes
c
Hey guys! I setup my k8s dagster configuration like this:
Copy code
dagster-user-deployments:
  deployments:
    - name: ...
      image:
        repository: ...
        tag: ...
        pullPolicy: Always
      dagsterApiGrpcArgs:
        - "--python-file"
        - "..."
      port: 3030
      env:
        GCP_PROJECT: 'asdf'
        GCP_DATASET: 'asdf'

runLauncher:
  type: K8sRunLauncher
  config:
    k8sRunLauncher:
      imagePullPolicy: "Always"
      jobNamespace: ~
      loadInclusterConfig: true
      kubeconfigFile: ~
      envVars:
        - GCP_PROJECT
        - GCP_DATASET
However, what I found was that on the k8s pod on execution, the GCP_PROJECT variable isn't being shared. How do I resolve this?
d
Hi Charles - for envVars to work, GCP_PROJECT needs to also be available on the machine that launches the run (so either dagit or the daemon) - it doesn't copy over the environment from your user code deployment
using envSecrets or envConfigMaps for this may work closer to the way that you expect
(since for those it just needs the names of the secrets or configmaps - doesn't need to pull anything out of the environment)
c
Oooohhhhh I see. So this is something that will be globally configured on all pipelines if I set it on daemon?
thanks for the clarification - from reading the runLauncher helm description I thought it was from the repository