|
@@ -20,13 +20,17 @@ spec:
|
|
|
spec:
|
|
|
containers:
|
|
|
- name: {{ .Chart.Name }}
|
|
|
- {{- if .Values.hostPathVolumes }}
|
|
|
+ {{- if or .Values.hostPathVolumes .Values.persistentVolumeClaims }}
|
|
|
volumeMounts:
|
|
|
{{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }}
|
|
|
- mountPath: {{ $hostPathConfiguration.mountPath }}
|
|
|
name: ix-host-path-{{ $.Release.Name }}-{{ $index }}
|
|
|
readOnly: {{ $hostPathConfiguration.readOnly }}
|
|
|
{{- end }}
|
|
|
+ {{- range $index, $claim := .Values.persistentVolumeClaims }}
|
|
|
+ - mountPath: {{ $claim.mountPath }}
|
|
|
+ name: ix-pv-{{ $.Release.Name }}-{{ $index }}
|
|
|
+ {{- end }}
|
|
|
{{- end }}
|
|
|
securityContext:
|
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
@@ -51,11 +55,16 @@ spec:
|
|
|
value: {{ .value | quote }}
|
|
|
{{- end }}
|
|
|
{{- end }}
|
|
|
- {{- if .Values.hostPathVolumes }}
|
|
|
+ {{- if or .Values.persistentVolumeClaims .Values.hostPathVolumes }}
|
|
|
volumes:
|
|
|
{{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }}
|
|
|
- name: ix-host-path-{{ $.Release.Name }}-{{ $index }}
|
|
|
hostPath:
|
|
|
path: {{ $hostPathConfiguration.hostPath }}
|
|
|
{{- end }}
|
|
|
+ {{- range $index, $claim := .Values.persistentVolumeClaims }}
|
|
|
+ - name: ix-pv-{{ $.Release.Name }}-{{ $index }}
|
|
|
+ persistentVolumeClaim:
|
|
|
+ claimName: ix-pv-claim-{{ $.Release.Name }}-{{ $index }}
|
|
|
+ {{- end }}
|
|
|
{{- end }}
|