Require a name for pvcs

This commit is contained in:
Waqar Ahmed 2020-10-09 05:15:39 +05:00
parent 839cad1608
commit 8bd17a7e55
3 changed files with 11 additions and 4 deletions

View File

@ -251,6 +251,8 @@
group: "Storage"
schema:
type: list
$ref:
- "validations/persistentVolumeClaims"
items:
- variable: persistentVolumeClaim
label: "Persistent Volume Claim Configuration"
@ -268,6 +270,11 @@
schema:
type: int
required: true
- variable: name
label: "Persistent Volume Claim Name"
schema:
type: string
required: true
# Pod Probes
# Liveness Probe

View File

@ -10,9 +10,9 @@ volumes:
path: {{ $hostPathConfiguration.hostPath }}
{{- end }}
{{- range $index, $claim := .Values.persistentVolumeClaims }}
- name: ix-pv-{{ $.Release.Name }}-{{ $index }}
- name: ix-pv-{{ $claim.name }}
persistentVolumeClaim:
claimName: ix-pv-claim-{{ $.Release.Name }}-{{ $index }}
claimName: ix-{{ $claim.name }}
{{- end }}
{{- end }}
{{- end }}
@ -30,7 +30,7 @@ volumeMounts:
{{- end }}
{{- range $index, $claim := .Values.persistentVolumeClaims }}
- mountPath: {{ $claim.mountPath }}
name: ix-pv-{{ $.Release.Name }}-{{ $index }}
name: ix-pv-{{ $claim.name }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -3,7 +3,7 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ix-pv-claim-{{ $.Release.Name }}-{{ $index }}
name: ix-{{ $claim.name }}
spec:
storageClassName: ix-storage-class-{{ $.Release.Name }}
resources: