banzaicloud / banzai-charts

Curated list of Banzai Cloud Helm charts used by the Pipeline Platform
Apache License 2.0
367 stars 278 forks source link

range can't iterate over config #716

Closed jicowan closed 5 years ago

jicowan commented 5 years ago

Trying to install the helm chart for Dex. I using the following command:

helm install --name dex banzaicloud-stable/dex --set-file config.connectors=./config.yaml --set-file config.staticClients=./client.yaml

Getting the following error:

2019/03/20 14:35:01 warning: cannot overwrite table with non table for connectors (map[])
Error: render error in "dex/templates/deployment.yaml": template: dex/templates/deployment.yaml:27:28: executing "dex/templates/deployment.yaml" at <include (print $.Tem...>: error calling include: template: dex/templates/config.yaml:47:33: executing "dex/templates/config.yaml" at <.Values.config.conne...>: range can't iterate over config:

config.yaml (not real values)

config:
  connectors:
    ldap:
      type: ldap
      name: OpenLDAP
      id: ldap
      config:
        host: 192.168.42.209:389
        # No TLS for this setup.
        insecureNoSSL: true
        # This would normally be a read-only user.
        bindDN: cn=admin,dc=example,dc=org
        bindPW: <pwd>
        usernamePrompt: Email Address
        userSearch:
          baseDN: ou=People,dc=example,dc=org
          filter: "(objectClass=person)"
          username: mail
          # "DN" (case sensitive) is a special attribute name. It indicates that
          # this value should be taken from the entity's DN not an attribute on
          # the entity.
          idAttr: DN
          emailAttr: mail
          nameAttr: cn
        groupSearch:
          baseDN: ou=Groups,dc=example,dc=org
          filter: "(objectClass=groupOfNames)"
          # A user is a member of a group when their DN matches
          # the value of a "member" attribute on the group entity.
          userAttr: DN
          groupAttr: member
          # The group name should be the "cn" value.
          nameAttr: cn

client.yaml (not real values)

config:
  staticClients:
  - id: example-app
    redirectURIs:
    - 'http://127.0.0.1:9000/auth/dex/callback'
    - 'http://localhost:9000/auth/dex/callback'
    name: 'Example App'
    secret: example-secret
jicowan commented 5 years ago

I'm probably missing a '-' somewhere in the YAML.

pbalogh-sa commented 5 years ago

@jicowan , try to use:

helm install --name dex banzaicloud-stable/dex -f ./config.yaml -f ./client.yaml

with these config files this way should work.