Files
charts/bitnami/mongodb/templates/poddisruptionbudget-secondary-rs.yaml
benjamin-wright 055679aac7 [bitnami/mongodb] adding local and global namespace overrides for mongodb (#2351)
* update to allow parent charts to override the namespace in the mongodb chart

* correct readme mistake

* add global namespace overrides

* reuse mongodb.namespace template

* add global namespace override to production values.yaml

* first of the review updates

* minor version bump

* remove redundant local namespaceOverride, can just use the global with fewer edge-cases

* typo in .values

* [bitnami/mongodb] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Ben Wright <benjamin.wright@nielsen.com>
Co-authored-by: Bitnami Containers <containers@bitnami.com>
Co-authored-by: Miguel Ángel Cabrera Miñagorri <macabrera@bitnami.com>
2020-04-22 09:49:49 +02:00

29 lines
963 B
YAML

{{- 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: {{ template "mongodb.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 }}