https://dagster.io/ logo
Title
r

Robert Balaban

02/23/2022, 2:03 PM
Is anyone running Dagster on k8s and successfully passing envs to kube Job? I'm trying to pass down AWS creds from helm chart with no success. I see the creds in the pod, but when the job is launched from the UI, the envs aren't set in the kube Job 😔 . Code is for extra info.
resource "helm_release" "dagster" {
  ...

  set {
    name  = "dagster-user-deployments.deployments[0].envSecrets[0].name"
    value = kubernetes_secret.dagster-aws-secret.metadata[0].name
    type  = "string"
  }
}

resource "kubernetes_secret" "dagster-aws-secret" {
  metadata {
    name      = "dagster-aws-secret"
    namespace = var.namespace
  }

  data = {
    AWS_ACCESS_KEY_ID     = var.AWS_ACCESS_KEY_ID
    AWS_SECRET_ACCESS_KEY = var.AWS_SECRET_ACCESS_KEY
  }
}
Cheers! After some poking around, turns out that the creds need to go into
runLauncher
, which makes sense, modifying the terraform file as this:
set {
    name  = "runLauncher.config.k8sRunLauncher.envSecrets[0].name"
    value = kubernetes_secret.dagster-aws-secret.metadata[0].name
    type  = "string"
  }
Seams to do the trick.
d

daniel

02/23/2022, 2:47 PM
Hi Robert - that's exactly right. We're planning to make it in the future so that you only need to set the secrets in one place and have it threaded through in all the right places, but for it'd need to be included in the run launcher as well.