default-backend-poddisruptionbudget.yaml 864 B

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