controller-poddisruptionbudget.yaml 877 B

12345678910111213141516171819
  1. {{- if or (and .Values.controller.autoscaling.enabled (gt (.Values.controller.autoscaling.minReplicas | int) 1)) (and (not .Values.controller.autoscaling.enabled) (gt (.Values.controller.replicaCount | int) 1)) }}
  2. apiVersion: {{ ternary "policy/v1" "policy/v1beta1" (semverCompare ">=1.21.0-0" .Capabilities.KubeVersion.Version) }}
  3. kind: PodDisruptionBudget
  4. metadata:
  5. labels:
  6. {{- include "ingress-nginx.labels" . | nindent 4 }}
  7. app.kubernetes.io/component: controller
  8. {{- with .Values.controller.labels }}
  9. {{- toYaml . | nindent 4 }}
  10. {{- end }}
  11. name: {{ include "ingress-nginx.controller.fullname" . }}
  12. namespace: {{ .Release.Namespace }}
  13. spec:
  14. selector:
  15. matchLabels:
  16. {{- include "ingress-nginx.selectorLabels" . | nindent 6 }}
  17. app.kubernetes.io/component: controller
  18. minAvailable: {{ .Values.controller.minAvailable }}
  19. {{- end }}