Skip to content

Conversation

@Alien2150
Copy link
Contributor

  • Make it possible to provide extra variables to different base-images
  • This makes it also possible to unset TLS_CERT_* variables if needed

@Alien2150
Copy link
Contributor Author

@masseybradley Here's another one :)

fieldRef:
apiVersion: v1
fieldPath: metadata.name
{{- range $key, $value := .Values.extraEnvVariables }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a fan of the variable name, prefer extraEnvVars (the standard followed by bitnami charts). This should be wrapped in e.g. {{- if .Values.extraEnvVars }} ... {{- end }} otherwise it makes passing extra environment variables a requirement, e.g. a slightly modified snippet from bitnami:

          env:
            # ...
            {{- if .Values.extraEnvVars }}
            {{- toYaml .Values.extraEnvVars | nindent 12 }}
            {{- end }}
          {{- if or .Values.extraEnvVarsCM .Values.extraEnvVarsSecret }}
          envFrom:
            {{- if .Values.extraEnvVarsCM }}
            - configMapRef:
                name: {{ .Values.extraEnvVarsCM }}
            {{- end }}
            {{- if .Values.extraEnvVarsSecret }}
            - secretRef:
                name: {{ .Values.extraEnvVarsSecret }}
            {{- end }}
          {{- end }}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems useful

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the if @masseybradley

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

Successfully merging this pull request may close these issues.

3 participants