pdb.yaml 1.1 KB

1234567891011121314151617181920212223242526
  1. {{- /*
  2. Copyright VMware, Inc.
  3. SPDX-License-Identifier: APACHE-2.0
  4. */}}
  5. {{- if and .Values.pdb.create (eq .Values.mode "distributed") }}
  6. apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
  7. kind: PodDisruptionBudget
  8. metadata:
  9. name: {{ include "common.names.fullname" . }}
  10. namespace: {{ include "common.names.namespace" . | quote }}
  11. labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
  12. {{- if .Values.commonAnnotations }}
  13. annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
  14. {{- end }}
  15. spec:
  16. {{- if .Values.pdb.minAvailable }}
  17. minAvailable: {{ .Values.pdb.minAvailable }}
  18. {{- end }}
  19. {{- if .Values.pdb.maxUnavailable }}
  20. maxUnavailable: {{ .Values.pdb.maxUnavailable }}
  21. {{- end }}
  22. {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
  23. selector:
  24. matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
  25. {{- end }}