Ei kuvausta

backend-pdb.yaml 1.1KB

12345678910111213141516171819202122
  1. {{- if .Values.backend.pdb.create }}
  2. apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
  3. kind: PodDisruptionBudget
  4. metadata:
  5. name: {{ include "shuffle.backend.name" . }}
  6. namespace: {{ include "common.names.namespace" . | quote }}
  7. labels: {{- include "shuffle.backend.labels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
  8. {{- if .Values.commonAnnotations }}
  9. annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
  10. {{- end }}
  11. spec:
  12. {{- if .Values.backend.pdb.minAvailable }}
  13. minAvailable: {{ .Values.backend.pdb.minAvailable }}
  14. {{- end }}
  15. {{- if or .Values.backend.pdb.maxUnavailable ( not .Values.backend.pdb.minAvailable ) }}
  16. maxUnavailable: {{ .Values.backend.pdb.maxUnavailable | default 1 }}
  17. {{- end }}
  18. {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.backend.podLabels .Values.commonLabels ) "context" . ) }}
  19. selector:
  20. matchLabels: {{- include "shuffle.backend.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
  21. {{- end }}