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
description: Bridges events and allows you to control your Zigbee devices via MQTT
appVersion: 1.15.0
version: 2.0.1
version: 2.1.0
keywords:
- zigbee
- mqtt

View File

@ -41,6 +41,22 @@ spec:
- name: DEBUG
value: {{ .Values.debug }}
{{- 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.port .Values.config.experimental.new_api }}
ports:
@ -59,6 +75,7 @@ spec:
mountPath: /data
- name: sniffer
mountPath: {{ .Values.config.serial.port }}
{{- if .Values.extraVolumeMounts }}{{ toYaml .Values.extraVolumeMounts | trim | nindent 8 }}{{ end }}
volumes:
- name: zigbee2mqtt
configMap:
@ -75,6 +92,7 @@ spec:
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim }}
{{- end }}
{{- if .Values.extraVolumes }}{{ toYaml .Values.extraVolumes | trim | nindent 6 }}{{ end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}

View File

@ -97,6 +97,28 @@ persistence:
accessMode: ReadWriteOnce
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: []
nameOverride: ""
fullnameOverride: ""
@ -141,3 +163,15 @@ nodeSelector: {}
tolerations: []
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