poddisruptionbudget.yaml 884 B

123456789101112131415161718192021
  1. {{- $replicaCount := int .Values.replicaCount }}
  2. {{- if gt $replicaCount 1 }}
  3. apiVersion: policy/v1beta1
  4. kind: PodDisruptionBudget
  5. metadata:
  6. name: {{ template "common.names.fullname" . }}
  7. namespace: {{ template "zookeeper.namespace" . }}
  8. labels: {{- include "common.labels.standard" . | nindent 4 }}
  9. app.kubernetes.io/component: zookeeper
  10. {{- if .Values.commonLabels }}
  11. {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
  12. {{- end }}
  13. {{- if .Values.commonAnnotations }}
  14. annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
  15. {{- end }}
  16. spec:
  17. selector:
  18. matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
  19. app.kubernetes.io/component: zookeeper
  20. {{- toYaml .Values.podDisruptionBudget | nindent 2 }}
  21. {{- end }}