X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=it%2Fotf.git;a=blobdiff_plain;f=otf-helm%2Fotf%2Fcharts%2Fdatabases%2Fmongodb%2Ftemplates%2Fpoddisruptionbudget-secondary-rs.yaml;fp=otf-helm%2Fotf%2Fcharts%2Fdatabases%2Fmongodb%2Ftemplates%2Fpoddisruptionbudget-secondary-rs.yaml;h=6cadc60ab01491328840cac068b602effc851e2e;hp=0000000000000000000000000000000000000000;hb=321c6b595a3f05db9e4327c16af85c16752f9ec2;hpb=29cd8447ada8036b91ad2ca75a3c1c3fe0d8ba55 diff --git a/otf-helm/otf/charts/databases/mongodb/templates/poddisruptionbudget-secondary-rs.yaml b/otf-helm/otf/charts/databases/mongodb/templates/poddisruptionbudget-secondary-rs.yaml new file mode 100644 index 0000000..6cadc60 --- /dev/null +++ b/otf-helm/otf/charts/databases/mongodb/templates/poddisruptionbudget-secondary-rs.yaml @@ -0,0 +1,28 @@ +{{- if and .Values.replicaSet.enabled .Values.replicaSet.pdb.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + labels: + app: {{ template "mongodb.name" . }} + chart: {{ template "mongodb.chart" . }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "mongodb.fullname" . }}-secondary + namespace: {{.Values.namespace }} +spec: + {{- if .Values.replicaSet.pdb.minAvailable }} + {{- if .Values.replicaSet.pdb.minAvailable.secondary }} + minAvailable: {{ .Values.replicaSet.pdb.minAvailable.secondary }} + {{- end }} + {{- end }} + {{- if .Values.replicaSet.pdb.maxUnavailable }} + {{- if .Values.replicaSet.pdb.maxUnavailable.secondary }} + maxUnavailable: {{ .Values.replicaSet.pdb.maxUnavailable.secondary }} + {{- end }} + {{- end }} + selector: + matchLabels: + app: {{ template "mongodb.name" . }} + release: {{ .Release.Name }} + component: secondary +{{- end }}