poddisruptionbudget.yaml 986 B

12345678910111213141516171819202122232425
  1. {{- $replicaCount := int .Values.replicaCount }}
  2. {{- if and .Values.pdb.create (gt $replicaCount 1) }}
  3. apiVersion: policy/v1beta1
  4. kind: PodDisruptionBudget
  5. metadata:
  6. name: {{ template "kafka.fullname" . }}
  7. labels: {{- include "common.labels.standard" . | nindent 4 }}
  8. app.kubernetes.io/component: kafka
  9. {{- if .Values.commonLabels }}
  10. {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
  11. {{- end }}
  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. selector:
  23. matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
  24. app.kubernetes.io/component: kafka
  25. {{- end }}