[backups] Added staggered backups
This PS adds staggered backups possibility by adding anti-affinity rules to backups cronjobs that can be followed across several namespaces to decrease load on remote backup destination server making sure that at every moment in time there is only one backup upload is in progress. Change-Id: I320c6ce6370b45c602114189819a4225e479f680
This commit is contained in:
parent
903b1363db
commit
ee5f4f3a78
@ -15,4 +15,4 @@
|
||||
apiVersion: v1
|
||||
description: A chart for a DaemonSet-based etcd deployment.
|
||||
name: etcd
|
||||
version: 0.1.2
|
||||
version: 0.1.3
|
||||
|
@ -74,7 +74,7 @@ spec:
|
||||
jobTemplate:
|
||||
metadata:
|
||||
labels:
|
||||
{{ tuple $envAll $applicationName "etcd-anchor" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||
{{ tuple $envAll $applicationName "etcd-anchor"| include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||
annotations:
|
||||
{{ dict "envAll" $envAll "podName" "etcd-backup" "containerNames" (list "etcd-backup") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
|
||||
spec:
|
||||
@ -83,6 +83,12 @@ spec:
|
||||
{{ dict "envAll" $envAll "application" "etcd-backup" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 10 }}
|
||||
serviceAccountName: {{ .Values.service.name }}-{{ $serviceAccountName }}
|
||||
restartPolicy: OnFailure
|
||||
{{- if .Values.pod.etcd_backup }}
|
||||
{{- if .Values.pod.etcd_backup.affinity }}
|
||||
affinity:
|
||||
{{ index .Values.pod.etcd_backup "affinity" | toYaml | indent 12}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
nodeSelector:
|
||||
{{ .Values.labels.anchor.node_selector_key }}: {{ .Values.labels.anchor.node_selector_value }}
|
||||
containers:
|
||||
|
25
charts/etcd/values_override/staggered-backups.yaml
Normal file
25
charts/etcd/values_override/staggered-backups.yaml
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
pod:
|
||||
labels:
|
||||
etcd-anchor:
|
||||
staggered-backups: enabled
|
||||
etcd_backup:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: status.phase
|
||||
operator: NotIn
|
||||
values:
|
||||
- Running
|
||||
- key: staggered-backups
|
||||
operator: In
|
||||
values:
|
||||
- enabled
|
||||
namespaces:
|
||||
- openstack
|
||||
- kube-system
|
||||
- osh-infra
|
||||
topologyKey: kubernetes.io/os
|
||||
...
|
Loading…
Reference in New Issue
Block a user