Merge pull request #15 from hammady/feature/helm3
Add support for hostPath volumes
This commit is contained in:
commit
30fafc8937
@ -74,11 +74,7 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /home/coder/project
|
mountPath: /home/coder
|
||||||
subPath: project
|
|
||||||
- name: data
|
|
||||||
mountPath: /home/coder/.local/share/code-server
|
|
||||||
subPath: code-server
|
|
||||||
{{- range .Values.extraConfigmapMounts }}
|
{{- range .Values.extraConfigmapMounts }}
|
||||||
- name: {{ .name }}
|
- name: {{ .name }}
|
||||||
mountPath: {{ .mountPath }}
|
mountPath: {{ .mountPath }}
|
||||||
@ -126,19 +122,31 @@ spec:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: data
|
- name: data
|
||||||
{{- if .Values.persistence.enabled }}
|
{{- if .Values.persistence.enabled }}
|
||||||
|
{{- if not .Values.persistence.hostPath }}
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ .Values.persistence.existingClaim | default (include "code-server.fullname" .) }}
|
claimName: {{ .Values.persistence.existingClaim | default (include "code-server.fullname" .) }}
|
||||||
|
{{- else }}
|
||||||
|
hostPath:
|
||||||
|
path: {{ .Values.persistence.hostPath }}
|
||||||
|
type: Directory
|
||||||
|
{{- end -}}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- range .Values.extraSecretMounts }}
|
{{- range .Values.extraSecretMounts }}
|
||||||
- name: {{ .name }}
|
- name: {{ .name }}
|
||||||
secret:
|
secret:
|
||||||
secretName: {{ .secretName }}
|
secretName: {{ .secretName }}
|
||||||
defaultMode: {{ .defaultMode }}
|
defaultMode: {{ .defaultMode }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- range .Values.extraVolumeMounts }}
|
{{- range .Values.extraVolumeMounts }}
|
||||||
- name: {{ .name }}
|
- name: {{ .name }}
|
||||||
persistentVolumeClaim:
|
{{- if .existingClaim }}
|
||||||
claimName: {{ .existingClaim }}
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ .existingClaim }}
|
||||||
|
{{- else }}
|
||||||
|
hostPath:
|
||||||
|
path: {{ .hostPath }}
|
||||||
|
type: Directory
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
{{- if and (and .Values.persistence.enabled (not .Values.persistence.existingClaim)) (not .Values.persistence.hostPath) }}
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -115,6 +115,7 @@ persistence:
|
|||||||
size: 1Gi
|
size: 1Gi
|
||||||
annotations: {}
|
annotations: {}
|
||||||
# existingClaim: ""
|
# existingClaim: ""
|
||||||
|
# hostPath: /data
|
||||||
|
|
||||||
serviceAccount:
|
serviceAccount:
|
||||||
create: true
|
create: true
|
||||||
@ -152,6 +153,7 @@ extraVolumeMounts: []
|
|||||||
# mountPath: /mnt/volume
|
# mountPath: /mnt/volume
|
||||||
# readOnly: true
|
# readOnly: true
|
||||||
# existingClaim: volume-claim
|
# existingClaim: volume-claim
|
||||||
|
# hostPath: ""
|
||||||
|
|
||||||
extraConfigmapMounts: []
|
extraConfigmapMounts: []
|
||||||
# - name: certs-configmap
|
# - name: certs-configmap
|
||||||
|
Reference in New Issue
Block a user