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:
		@@ -21,5 +21,5 @@ annotations:
 | 
			
		||||
  category: Houseautomation
 | 
			
		||||
  licenses: GPL'd
 | 
			
		||||
type: application
 | 
			
		||||
version: 1.0.1
 | 
			
		||||
version: 1.0.2
 | 
			
		||||
appVersion: "4.0.5-bullseye"
 | 
			
		||||
 
 | 
			
		||||
@@ -57,6 +57,9 @@ spec:
 | 
			
		||||
            - name: fhem-data
 | 
			
		||||
              mountPath: /opt/fhem
 | 
			
		||||
              subPath: fhem/
 | 
			
		||||
            - name: configdb-volume
 | 
			
		||||
              mountPath: /opt/fhem/configDB.conf
 | 
			
		||||
              subPath: fhem/configDB.conf
 | 
			
		||||
          resources:
 | 
			
		||||
            {{- toYaml .Values.resources | nindent 12 }}
 | 
			
		||||
          env:
 | 
			
		||||
@@ -123,9 +126,14 @@ spec:
 | 
			
		||||
        {{- toYaml . | nindent 8 }}
 | 
			
		||||
      {{- end }}
 | 
			
		||||
      volumes:
 | 
			
		||||
        - name: fhem-data
 | 
			
		||||
        {{- if .Values.persistence.enabled }}
 | 
			
		||||
        - name: fhem-data
 | 
			
		||||
          persistentVolumeClaim:
 | 
			
		||||
            claimName: {{ include "fhem.fullname" . }}
 | 
			
		||||
        {{- end }}
 | 
			
		||||
        {{- if eq .Values.configtype "configDB" }}
 | 
			
		||||
        - name: configdb-volume
 | 
			
		||||
          secret:
 | 
			
		||||
            secretName: {{ .Release.Name }}-db-config-secret
 | 
			
		||||
        {{- end }}
 | 
			
		||||
      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"
 | 
			
		||||
### ENDE Container environment variables
 | 
			
		||||
 | 
			
		||||
### if configtype configDB set, set the follow connection settings for a secret
 | 
			
		||||
dbConfig:
 | 
			
		||||
  connection: ""
 | 
			
		||||
  user: ""
 | 
			
		||||
  password: ""
 | 
			
		||||
 | 
			
		||||
serviceAccount:
 | 
			
		||||
  # Specifies whether a service account should be created
 | 
			
		||||
  create: false
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user