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
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
- variable: volumes
label: "Volumes"

View File

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