pdb.yaml 672 B

123456789101112131415161718
  1. {{- if and (.Values.pdb.enabled) (.Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget") }}
  2. apiVersion: policy/v1
  3. kind: PodDisruptionBudget
  4. metadata:
  5. name: {{ include "emqx.fullname" . }}-pdb
  6. namespace: {{ .Release.Namespace }}
  7. labels:
  8. app.kubernetes.io/name: {{ include "emqx.name" . }}
  9. helm.sh/chart: {{ include "emqx.chart" . }}
  10. app.kubernetes.io/instance: {{ .Release.Name }}
  11. app.kubernetes.io/managed-by: {{ .Release.Service }}
  12. spec:
  13. maxUnavailable: {{ .Values.pdb.maxUnavailable }}
  14. selector:
  15. matchLabels:
  16. app.kubernetes.io/name: {{ include "emqx.name" . }}
  17. app.kubernetes.io/instance: {{ .Release.Name }}
  18. {{- end }}