Merge pull request 'add configDB.cong support with secret' (#1) from patch-addConfigdbSecret into main
Some checks are pending
Build Helm Chart / helm-package (push) Waiting to run
Some checks are pending
Build Helm Chart / helm-package (push) Waiting to run
Reviewed-on: #1
This commit is contained in:
commit
4e3aa84d21
@ -21,5 +21,5 @@ annotations:
|
|||||||
category: Houseautomation
|
category: Houseautomation
|
||||||
licenses: GPL'd
|
licenses: GPL'd
|
||||||
type: application
|
type: application
|
||||||
version: 1.0.1
|
version: 1.0.2
|
||||||
appVersion: "4.0.5-bullseye"
|
appVersion: "4.0.5-bullseye"
|
||||||
|
@ -57,6 +57,9 @@ spec:
|
|||||||
- name: fhem-data
|
- name: fhem-data
|
||||||
mountPath: /opt/fhem
|
mountPath: /opt/fhem
|
||||||
subPath: fhem/
|
subPath: fhem/
|
||||||
|
- name: configdb-volume
|
||||||
|
mountPath: /opt/fhem/configDB.conf
|
||||||
|
subPath: fhem/configDB.conf
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
env:
|
env:
|
||||||
@ -123,9 +126,14 @@ spec:
|
|||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
volumes:
|
volumes:
|
||||||
- name: fhem-data
|
|
||||||
{{- if .Values.persistence.enabled }}
|
{{- if .Values.persistence.enabled }}
|
||||||
|
- name: fhem-data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ include "fhem.fullname" . }}
|
claimName: {{ include "fhem.fullname" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if eq .Values.configtype "configDB" }}
|
||||||
|
- name: configdb-volume
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Release.Name }}-db-config-secret
|
||||||
|
{{- end }}
|
||||||
restartPolicy: {{ .Values.restartPolicy }}
|
restartPolicy: {{ .Values.restartPolicy }}
|
||||||
|
15
templates/secret.yaml
Normal file
15
templates/secret.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{{- if eq .Values.configtype "configDB" }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-db-config-secret
|
||||||
|
labels:
|
||||||
|
app: {{ .Release.Name }}
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
configDB.conf: |
|
||||||
|
{{- $connection := .Values.dbConfig.connection | quote }}
|
||||||
|
{{- $user := .Values.dbConfig.user | quote }}
|
||||||
|
{{- $password := .Values.dbConfig.password | quote }}
|
||||||
|
{{- printf "%%dbconfig= (\n connection => \"%s\",\n user => \"%s\",\n password => \"%s\"\n);" $connection $user $password | b64enc }}
|
||||||
|
{{- end }}
|
@ -64,6 +64,12 @@ timezone: "Europe/Berlin"
|
|||||||
configtype: "fhem.cfg.demo"
|
configtype: "fhem.cfg.demo"
|
||||||
### ENDE Container environment variables
|
### ENDE Container environment variables
|
||||||
|
|
||||||
|
### if configtype configDB set, set the follow connection settings for a secret
|
||||||
|
dbConfig:
|
||||||
|
connection: ""
|
||||||
|
user: ""
|
||||||
|
password: ""
|
||||||
|
|
||||||
serviceAccount:
|
serviceAccount:
|
||||||
# Specifies whether a service account should be created
|
# Specifies whether a service account should be created
|
||||||
create: false
|
create: false
|
||||||
|
Loading…
Reference in New Issue
Block a user