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

extraEnvVars valueFrom #43

Open
Spritekin opened this issue Apr 11, 2024 · 0 comments
Open

extraEnvVars valueFrom #43

Spritekin opened this issue Apr 11, 2024 · 0 comments

Comments

@Spritekin
Copy link

Spritekin commented Apr 11, 2024

Right now the deployments.yaml file process the extraEnvVars like this:

            {{- range .Values.extraEnvVars }}
            - name: {{ .name }}
              value: {{ .value | quote }}
            {{- end }}

So it only contemplates a hardcoded value.
I would like to load the values from a secret like this:

    extraEnvVars:
      - name: OAUTH_CLIENT_ID
        valueFrom:
          secretKeyRef:
            name: vouch-okta
            key: OAUTH_CLIENT_ID
      - name: OAUTH_CLIENT_SECRET
        valueFrom:
          secretKeyRef:
            name: vouch-okta
            key: OAUTH_CLIENT_SECRET

However if I do this the deployment ends like this

        - name: OAUTH_CLIENT_ID
        - name: OAUTH_CLIENT_SECRET

With no values, because there is no .value in the structure.

So maybe in the deployment.yaml code the env vars should be handled as (indent 12 referencial only I haven't really counted):

            {{- if .Values.extraEnvVars }}
            {{- toYaml .Values.extraEnvVars | indent 12 }}
            {{- end }}

handling it that way allows the user setting the env vars in any way they need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant