Remove PVC in favor of ix-volumes as latter support rollbacks

This commit is contained in:
Waqar Ahmed 2020-10-12 21:02:43 +05:00
parent b085048725
commit 10424343cb
4 changed files with 2 additions and 57 deletions

View File

@ -245,37 +245,6 @@
type: boolean type: boolean
default: false default: false
# Persistent Volume Claims
- variable: persistentVolumeClaims
label: "Persistent Volume Claims"
group: "Storage"
schema:
type: list
$ref:
- "validations/persistentVolumeClaims"
items:
- variable: persistentVolumeClaim
label: "Persistent Volume Claim Configuration"
schema:
type: dict
attrs:
- variable: mountPath
label: "Mount Path"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
required: true
- variable: capacity
label: "Volume Capacity"
schema:
type: int
required: true
- variable: name
label: "Persistent Volume Claim Name"
schema:
type: string
required: true
# Volumes # Volumes
- variable: volumes - variable: volumes
label: "Volumes" label: "Volumes"

View File

@ -2,7 +2,7 @@
Volumes Configuration Volumes Configuration
*/}} */}}
{{- define "volumeConfiguration" }} {{- define "volumeConfiguration" }}
{{- if or (or .Values.persistentVolumeClaims .Values.hostPathVolumes) .Values.ixVolumes }} {{- if or .Values.ixVolumes .Values.hostPathVolumes }}
volumes: volumes:
{{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }} {{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }}
- name: ix-host-path-{{ $.Release.Name }}-{{ $index }} - name: ix-host-path-{{ $.Release.Name }}-{{ $index }}
@ -14,11 +14,6 @@ volumes:
hostPath: hostPath:
path: {{ $hostPathConfiguration.hostPath }} path: {{ $hostPathConfiguration.hostPath }}
{{- end }} {{- end }}
{{- range $index, $claim := .Values.persistentVolumeClaims }}
- name: ix-pv-{{ $claim.name }}
persistentVolumeClaim:
claimName: ix-{{ $claim.name }}
{{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
@ -26,7 +21,7 @@ volumes:
Volume Mounts Configuration Volume Mounts Configuration
*/}} */}}
{{- define "volumeMountsConfiguration" }} {{- define "volumeMountsConfiguration" }}
{{- if or .Values.hostPathVolumes .Values.persistentVolumeClaims }} {{- if or .Values.hostPathVolumes .Values.ixVolumes }}
volumeMounts: volumeMounts:
{{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }} {{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }}
- mountPath: {{ $hostPathConfiguration.mountPath }} - mountPath: {{ $hostPathConfiguration.mountPath }}
@ -37,9 +32,5 @@ volumeMounts:
- mountPath: {{ $hostPathConfiguration.mountPath }} - mountPath: {{ $hostPathConfiguration.mountPath }}
name: ix-host-volume-{{ $.Release.Name }}-{{ $index }} name: ix-host-volume-{{ $.Release.Name }}-{{ $index }}
{{- end }} {{- end }}
{{- range $index, $claim := .Values.persistentVolumeClaims }}
- mountPath: {{ $claim.mountPath }}
name: ix-pv-{{ $claim.name }}
{{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -1,14 +0,0 @@
{{- range $index, $claim := .Values.persistentVolumeClaims }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ix-{{ $claim.name }}
spec:
storageClassName: ix-storage-class-{{ $.Release.Name }}
resources:
requests:
storage: {{ $claim.capacity }}
accessModes:
- ReadWriteMany
{{- end }}

View File

@ -16,7 +16,6 @@ externalInterfaces: []
# Storage related configuration # Storage related configuration
hostPathVolumes: [] hostPathVolumes: []
persistentVolumeClaims: []
volumes: [] volumes: []
# Probes # Probes