Merge "[AAI] Add model-loader tracing config"
[oom.git] / kubernetes / common / mongodb / templates / arbiter / pdb.yaml
1 {{- /*
2 Copyright VMware, Inc.
3 SPDX-License-Identifier: APACHE-2.0
4 */}}
5
6 {{- if and (include "mongodb.arbiter.enabled" .) .Values.arbiter.pdb.create }}
7 apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
8 kind: PodDisruptionBudget
9 metadata:
10   name: {{ printf "%s-arbiter" (include "mongodb.fullname" .) }}
11   namespace: {{ include "mongodb.namespace" . | quote }}
12   labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
13     app.kubernetes.io/component: arbiter
14   {{- if .Values.commonAnnotations }}
15   annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
16   {{- end }}
17 spec:
18   {{- if .Values.arbiter.pdb.minAvailable }}
19   minAvailable: {{ .Values.arbiter.pdb.minAvailable }}
20   {{- end }}
21   {{- if .Values.arbiter.pdb.maxUnavailable }}
22   maxUnavailable: {{ .Values.arbiter.pdb.maxUnavailable }}
23   {{- end }}
24   {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.arbiter.podLabels .Values.commonLabels ) "context" . ) }}
25   selector:
26     matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
27       app.kubernetes.io/component: arbiter
28 {{- end }}