pdb.yaml 1.0 KB

12345678910111213141516171819202122232425
  1. {{- if .Values.primary.pdb.create }}
  2. apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
  3. kind: PodDisruptionBudget
  4. metadata:
  5. name: {{ include "mysql.primary.fullname" . }}
  6. namespace: {{ include "common.names.namespace" . | quote }}
  7. labels: {{- include "common.labels.standard" . | nindent 4 }}
  8. app.kubernetes.io/component: primary
  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.primary.pdb.minAvailable }}
  17. minAvailable: {{ .Values.primary.pdb.minAvailable }}
  18. {{- end }}
  19. {{- if .Values.primary.pdb.maxUnavailable }}
  20. maxUnavailable: {{ .Values.primary.pdb.maxUnavailable }}
  21. {{- end }}
  22. selector:
  23. matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }}
  24. app.kubernetes.io/component: primary
  25. {{- end }}