You've already forked homeassistant-charts
							
							fix: add persistent volume claim
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		@@ -48,9 +48,10 @@ spec:
 | 
			
		||||
          {{- toYaml .Values.resources | nindent 12 }}
 | 
			
		||||
        securityContext:
 | 
			
		||||
          {{- toYaml .Values.securityContext | nindent 12 }}
 | 
			
		||||
        {{- with .Values.volumeMounts }}
 | 
			
		||||
        volumeMounts:
 | 
			
		||||
          {{- toYaml . | nindent 8 }}
 | 
			
		||||
        {{- if .Values.persistentStorage.enabled }}
 | 
			
		||||
        volumes:
 | 
			
		||||
        - name: config
 | 
			
		||||
          mountPath: /config
 | 
			
		||||
        {{- end }}
 | 
			
		||||
      {{- with .Values.imagePullSecrets }}
 | 
			
		||||
      imagePullSecrets:
 | 
			
		||||
@@ -69,7 +70,15 @@ spec:
 | 
			
		||||
      tolerations:
 | 
			
		||||
        {{- toYaml . | nindent 8 }}
 | 
			
		||||
      {{- end }}
 | 
			
		||||
      {{- if .Values.persistentStorage.enabled }}
 | 
			
		||||
      volumes:
 | 
			
		||||
      {{- with .Values.volumes }}
 | 
			
		||||
        {{- toYaml . | nindent 6 }}
 | 
			
		||||
      {{- if .Values.persistentStorage.existingClaim }}
 | 
			
		||||
      - name: config
 | 
			
		||||
        persistentVolumeClaim:
 | 
			
		||||
          claimName: {{ .Values.persistentStorage.existingClaim }}
 | 
			
		||||
      {{- else }}
 | 
			
		||||
      - name: config
 | 
			
		||||
        persistentVolumeClaim:
 | 
			
		||||
          claimName: {{ include "homeassistant.fullname" . }}
 | 
			
		||||
      {{- end }}
 | 
			
		||||
      {{- end }}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										24
									
								
								templates/persistentVolumeClaim.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								templates/persistentVolumeClaim.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
{{- if .Values.persistentStorage.enabled }}
 | 
			
		||||
apiVersion: v1
 | 
			
		||||
kind: PersistentVolumeClaim
 | 
			
		||||
metadata:
 | 
			
		||||
  {{- with .Values.persistentStorage.annotations }}
 | 
			
		||||
  annotations:
 | 
			
		||||
    {{- toYaml . | nindent 4 }}
 | 
			
		||||
  {{- end }}
 | 
			
		||||
  name: {{ include "homeassistant.fullname" . }}
 | 
			
		||||
  labels:
 | 
			
		||||
    {{- include "homeassistant.labels" . | nindent 4 }}
 | 
			
		||||
    {{- with .Values.persistentStorage.labels }}
 | 
			
		||||
    {{- toYaml . | nindent 4 }}
 | 
			
		||||
    {{- end }}
 | 
			
		||||
spec:
 | 
			
		||||
  accessModes:
 | 
			
		||||
  - ReadWriteOnce
 | 
			
		||||
  {{- if .Values.persistentStorage.storageClass }}
 | 
			
		||||
  storageClassName: {{ .Values.persistentStorage.storageClass }}
 | 
			
		||||
  {{- end }}
 | 
			
		||||
  resources:
 | 
			
		||||
    requests:
 | 
			
		||||
      storage: {{ required "Require size of persistent volume claim" .Values.persistentStorage.size }}
 | 
			
		||||
{{- end }}
 | 
			
		||||
							
								
								
									
										18
									
								
								values.yaml
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								values.yaml
									
									
									
									
									
								
							@@ -37,6 +37,14 @@ ingress:
 | 
			
		||||
 | 
			
		||||
nodeSelector: {}
 | 
			
		||||
 | 
			
		||||
persistentStorage:
 | 
			
		||||
  enabled: false
 | 
			
		||||
  existingClaim: ""
 | 
			
		||||
  annotations: {}
 | 
			
		||||
  labels: {}
 | 
			
		||||
  storageClass:
 | 
			
		||||
  size: 15Gi
 | 
			
		||||
 | 
			
		||||
podAnnotations: {}
 | 
			
		||||
 | 
			
		||||
podPriorityClassName: ""
 | 
			
		||||
@@ -70,13 +78,3 @@ service:
 | 
			
		||||
  port: 8123
 | 
			
		||||
 | 
			
		||||
tolerations: []
 | 
			
		||||
 | 
			
		||||
volumeMounts: []
 | 
			
		||||
# - name: config
 | 
			
		||||
#   mountPath: /config
 | 
			
		||||
 | 
			
		||||
volumes: []
 | 
			
		||||
# - name: config
 | 
			
		||||
#   hostPath:
 | 
			
		||||
#     path: /etc/homeassistant
 | 
			
		||||
#     type: DirectoryOrCreate
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user