Initial commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{{ if and (eq (include "etcdEnabled" .) "true") (and .Values.etcd.localpvScConfig.enabled .Values.etcd.persistence.enabled) }}
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
annotations:
|
||||
cas.openebs.io/config: |
|
||||
- name: StorageType
|
||||
value: "hostpath"
|
||||
- name: BasePath
|
||||
value: {{ tpl (.Values.etcd.localpvScConfig.basePath | quote) . }}
|
||||
openebs.io/cas-type: local
|
||||
name: {{ (tpl (.Values.etcd.localpvScConfig.name) .) | required (print "StorageClass name for etcd localpv storage cannot be empty") }}
|
||||
provisioner: openebs.io/local
|
||||
reclaimPolicy: {{ .Values.etcd.localpvScConfig.reclaimPolicy }}
|
||||
volumeBindingMode: {{ .Values.etcd.localpvScConfig.volumeBindingMode }}
|
||||
{{ end }}
|
||||
22
charts/mayastor/templates/etcd/storage/localpv.yaml
Normal file
22
charts/mayastor/templates/etcd/storage/localpv.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
{{ if and (eq (include "etcdEnabled" .) "true") (and .Values.etcd.persistence.enabled (eq .Values.etcd.persistence.storageClass "manual")) }}
|
||||
{{- range $index, $end := until (.Values.etcd.replicaCount | int) }}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: etcd-volume-{{ $index }}
|
||||
labels:
|
||||
statefulset.kubernetes.io/pod-name: {{ print $.Release.Name }}-etcd-{{ $index }}
|
||||
spec:
|
||||
storageClassName: manual
|
||||
# You must also delete the hostpath on the node
|
||||
persistentVolumeReclaimPolicy: {{ $.Values.etcd.persistentVolumeClaimRetentionPolicy.whenDeleted }}
|
||||
capacity:
|
||||
storage: {{ $.Values.etcd.persistence.size | quote }}
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
hostPath:
|
||||
path: "/var/local/{{ $.Release.Name }}/etcd/pod-{{ $index }}"
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user