mirror of
https://github.com/wahyd4/charts.git
synced 2026-08-22 19:48:25 +10:00
Support 'existing claims' for snapshotter pvc
This commit is contained in:
@@ -115,6 +115,7 @@ The following tables lists the configurable parameters of the etcd chart and the
|
||||
| `disasterRecovery.cronjob.schedule` | Schedule in Cron format to save snapshots | `*/30 * * * *` |
|
||||
| `disasterRecovery.cronjob.historyLimit` | Number of successful finished jobs to retain | `1` |
|
||||
| `disasterRecovery.cronjob.podAnnotations` | Pod annotations for cronjob pods | `{}` |
|
||||
| `disasterRecovery.pvc.existingClaim` | Provide an existing `PersistentVolumeClaim`, the value is evaluated as a template. | `nil` |
|
||||
| `disasterRecovery.pvc.size` | PVC Storage Request | `2Gi` |
|
||||
| `disasterRecovery.pvc.storageClassName` | Storage Class for snapshots volume | `nfs` |
|
||||
|
||||
@@ -236,6 +237,8 @@ $ helm upgrade my-release bitnami/etcd \
|
||||
--set statefulset.replicaCount=5
|
||||
```
|
||||
|
||||
> **Note**: Scaling the statefulset with `kubectl scale ...` command is highly discouraged. Use `helm upgrade ...` for horizontal scaling so you ensure all the environment variables used to configure the ectd cluster are properly updated.
|
||||
|
||||
## Enable security for etcd
|
||||
|
||||
### Configure RBAC
|
||||
|
||||
@@ -78,6 +78,19 @@ Return the proper etcd data dir
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Disaster Recovery PVC name
|
||||
*/}}
|
||||
{{- define "etcd.disasterRecovery.pvc.name" -}}
|
||||
{{- if .Values.disasterRecovery.pvc.existingClaim -}}
|
||||
{{- with .Values.disasterRecovery.pvc.existingClaim -}}
|
||||
{{ tpl . $ }}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{ template "etcd.fullname" . }}-snapshotter
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper etcdctl authentication options
|
||||
*/}}
|
||||
|
||||
@@ -64,5 +64,5 @@ spec:
|
||||
defaultMode: 0755
|
||||
- name: snapshot-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "etcd.fullname" . }}-snapshotter
|
||||
claimName: {{ template "etcd.disasterRecovery.pvc.name" . }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- if .Values.disasterRecovery.enabled -}}
|
||||
{{- if and .Values.disasterRecovery.enabled (not .Values.disasterRecovery.pvc.existingClaim) -}}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
|
||||
@@ -266,7 +266,7 @@ spec:
|
||||
{{- if .Values.disasterRecovery.enabled }}
|
||||
- name: snapshot-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "etcd.fullname" . }}-snapshotter
|
||||
claimName: {{ template "etcd.disasterRecovery.pvc.name" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.configFileConfigMap }}
|
||||
- name: etcd-config
|
||||
|
||||
@@ -238,6 +238,12 @@ disasterRecovery:
|
||||
##
|
||||
# resources:
|
||||
pvc:
|
||||
## A manually managed Persistent Volume and Claim
|
||||
## If defined, PVC must be created manually before volume will be bound
|
||||
## The value is evaluated as a template, so, for example, the name can depend on .Release or .Chart
|
||||
##
|
||||
# existingClaim:
|
||||
|
||||
## PVC Storage Request
|
||||
##
|
||||
size: 2Gi
|
||||
|
||||
@@ -238,6 +238,12 @@ disasterRecovery:
|
||||
##
|
||||
# resources:
|
||||
pvc:
|
||||
## A manually managed Persistent Volume and Claim
|
||||
## If defined, PVC must be created manually before volume will be bound
|
||||
## The value is evaluated as a template, so, for example, the name can depend on .Release or .Chart
|
||||
##
|
||||
# existingClaim:
|
||||
|
||||
## PVC Storage Request
|
||||
##
|
||||
size: 2Gi
|
||||
|
||||
Reference in New Issue
Block a user