https://dagster.io/ logo
#dagster-kubernetes
Title
# dagster-kubernetes
t

Ted Conbeer

06/29/2021, 4:52 PM
I'm trying to keep secrets out of my
values.yml
and set the extraManifests value using the
--set-file
option, but I'm hitting an error when installing the chart. Not sure what I'm doing wrong. Details in thread. 👉
1
Values file (
helm-values-local.yml
):
Copy code
global:
  ...

dagster-user-deployments:
  enabled: true
  deployments:
    - ...
      envSecrets:
        - name: local-secret

runLauncher:
  ...

postgresql:
  enabled: true

dagsterDaemon:
  ...

serviceAccount:
  create: true

# We'll use the --set-file option at runtime to add secrets as an extraManifest to this chart
extraManifests: []
file containing the extra manifests (
helm-secrets-local.yml
):
Copy code
- apiVersion: v1
  kind: Secret
  metadata:
    name: local-secret
  type: Opaque
  stringData:
    AWS_ACCESS_KEY_ID: mysecretvalue
helm install command and error:
Copy code
helm upgrade \
        --install dagster dagster/dagster \
        --version $DAGSTER_VERSION \
        --values ./helm-values-local.yml \
        --set-file extraManifests=./secrets/helm-secrets-local.yml
Error: UPGRADE FAILED: template: dagster/templates/extra-manifests.yaml:1:17: executing "dagster/templates/extra-manifests.yaml" at <.Values.extraManifests>: range can't iterate over
- apiVersion: v1
  kind: Secret
  metadata:
    name: local-secret
  type: Opaque
  stringData:
     ...
(I've also tried adding the
extraManifests:
key to the
helm-secrets-local.yml
file, and removing the
-
and outdenting the secret definition, but none of those things work)
n

Noah K

06/29/2021, 5:04 PM
@Ted Conbeer What you probably want is to use a second values file
Copy code
extraManifests:
- whatever
Helm will merge all your
--values
data together
t

Ted Conbeer

06/29/2021, 5:04 PM
got it, didn't realize that. let me try
n

Noah K

06/29/2021, 5:05 PM
--set-file
just sets the value as the whole string, not a parsed version
t

Ted Conbeer

06/29/2021, 5:05 PM
oh, that makes sense
it worked. Thanks, Noah!
n

Noah K

06/29/2021, 5:08 PM
Just remember for security modeling, it all ends up in the saved cluster-side manifest
(though at least those default to using Secrets these days)
t

Ted Conbeer

06/29/2021, 5:09 PM
yep, this is just for a local (dev) cluster
6 Views