Add support for extraSecretEnvironmentVars and plain env: values #108

Closed
pat-s wants to merge 6 commits from extraSecretEnvironmentVars into main
3 changed files with 27 additions and 19 deletions
Showing only changes of commit ae6224fe57 - Show all commits

View file

@ -60,18 +60,3 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Inject extra environment populated by secrets, if populated
*/}}
{{- define "ntfy.extraSecretEnvironmentVars" -}}
{{- if .extraSecretEnvironmentVars -}}
{{- range .extraSecretEnvironmentVars }}
- name: {{ .envName }}
valueFrom:
secretKeyRef:
name: {{ .secretName }}
key: {{ .secretKey }}
{{- end -}}
{{- end -}}
{{- end -}}

View file

@ -46,6 +46,15 @@ spec:
envFrom:
- configMapRef:
name: {{ include "ntfy.fullname" . }}-env
{{- if .Values.envFrom }}
{{- range .envFrom }}
- name: {{ .envName }}
valueFrom:
secretKeyRef:
name: {{ .secretName }}
key: {{ .secretKey }}
{{- end -}}
{{- end -}}
ports:
- name: http
containerPort: {{ .Values.service.http.port }}

View file

@ -14,6 +14,16 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
# - name:
# value:
env: []
# - name:
# valueFrom:
# secretKeyRef:
# name:
# key:
envFrom: []
ntfy:
baseURL: "https://ntfy.example.org"
listen:
@ -141,10 +151,12 @@ serviceAccount:
podLabels: {}
podAnnotations: {}
podSecurityContext: {}
podSecurityContext:
{}
# fsGroup: 2000
securityContext: {}
securityContext:
{}
# capabilities:
# drop:
# - ALL
@ -165,7 +177,8 @@ service:
ingress:
enabled: false
className: ""
annotations: {}
annotations:
{}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
@ -178,7 +191,8 @@ ingress:
# hosts:
# - chart-example.local
resources: {}
resources:
{}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following