add extraEnv etc., extraVolumes & extraVolumeMounts (#99)

This commit is contained in:
Michael Kötter 2020-10-26 13:25:07 +01:00 committed by GitHub
parent f55c117431
commit 714708050a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 53 additions and 1 deletions

View File

@ -3,7 +3,7 @@ name: zigbee2mqtt
type: application type: application
description: Bridges events and allows you to control your Zigbee devices via MQTT description: Bridges events and allows you to control your Zigbee devices via MQTT
appVersion: 1.15.0 appVersion: 1.15.0
version: 2.0.1 version: 2.1.0
keywords: keywords:
- zigbee - zigbee
- mqtt - mqtt

View File

@ -41,6 +41,22 @@ spec:
- name: DEBUG - name: DEBUG
value: {{ .Values.debug }} value: {{ .Values.debug }}
{{- end }} {{- end }}
{{- range $key, $value := .Values.extraEnv }}
- name: {{ $key | quote }}
value: {{ $value | quote }}
{{- end }}
{{- range $name, $opts := .Values.extraEnvSecrets }}
- name: {{ $name }}
valueFrom:
secretKeyRef:
name: {{ $opts.secret }}
key: {{ $opts.key }}
{{- end }}
envFrom:
{{- range .Values.extraSecretForEnvFrom }}
- secretRef:
name: {{ . }}
{{- end }}
{{- if and .Values.config.frontend .Values.config.experimental }} {{- if and .Values.config.frontend .Values.config.experimental }}
{{- if and .Values.config.frontend.port .Values.config.experimental.new_api }} {{- if and .Values.config.frontend.port .Values.config.experimental.new_api }}
ports: ports:
@ -59,6 +75,7 @@ spec:
mountPath: /data mountPath: /data
- name: sniffer - name: sniffer
mountPath: {{ .Values.config.serial.port }} mountPath: {{ .Values.config.serial.port }}
{{- if .Values.extraVolumeMounts }}{{ toYaml .Values.extraVolumeMounts | trim | nindent 8 }}{{ end }}
volumes: volumes:
- name: zigbee2mqtt - name: zigbee2mqtt
configMap: configMap:
@ -75,6 +92,7 @@ spec:
persistentVolumeClaim: persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim }} claimName: {{ .Values.persistence.existingClaim }}
{{- end }} {{- end }}
{{- if .Values.extraVolumes }}{{ toYaml .Values.extraVolumes | trim | nindent 6 }}{{ end }}
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}

View File

@ -97,6 +97,28 @@ persistence:
accessMode: ReadWriteOnce accessMode: ReadWriteOnce
size: 100Mi size: 100Mi
## Additional zigbee2mqtt container environment variable
## For instance to add a http_proxy
##
extraEnv: {}
## Additional zigbee2mqtt container environment variable from k8s secrets
## For instance to add a password
extraEnvSecrets:
# Example
# This will set ${ZIGBEE2MQTT_CONFIG_MQTT_PASSWORD} to the 'password' key from the 'mqtt' secret
# ZIGBEE2MQTT_CONFIG_MQTT_PASSWORD:
# secret: mqtt
# key: password
## If you'd like to provide your own Kubernetes Secret object instead of passing your values
## individually, pass in the name of a created + populated Secret.
## All secrets will be mounted as environment variables, with each key/value mapping to a
## corresponding environment variable.
##
extraSecretForEnvFrom: []
# - zigbee2mqtt-secrets
imagePullSecrets: [] imagePullSecrets: []
nameOverride: "" nameOverride: ""
fullnameOverride: "" fullnameOverride: ""
@ -141,3 +163,15 @@ nodeSelector: {}
tolerations: [] tolerations: []
affinity: {} affinity: {}
# Any extra volumes to define for the pod
extraVolumes: []
# - name: example-name
# hostPath:
# path: /path/on/host
# type: DirectoryOrCreate
# Any extra volume mounts to define for the containers
extraVolumeMounts: []
# - name: example-name
# mountPath: /path/in/container