
* feat: add namespace overrides * add value in readme * fix: readme description * fix: description in value * fix: set max length and trim last "-"
26 lines
1.2 KiB
YAML
26 lines
1.2 KiB
YAML
{{- 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)) }}
|
|
apiVersion: {{ ternary "policy/v1" "policy/v1beta1" (semverCompare ">=1.21.0-0" .Capabilities.KubeVersion.Version) }}
|
|
kind: PodDisruptionBudget
|
|
metadata:
|
|
labels:
|
|
{{- include "ingress-nginx.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: controller
|
|
{{- with .Values.controller.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
name: {{ include "ingress-nginx.controller.fullname" . }}
|
|
namespace: {{ include "ingress-nginx.namespace" . }}
|
|
{{- if .Values.controller.annotations }}
|
|
annotations: {{ toYaml .Values.controller.annotations | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
{{- include "ingress-nginx.selectorLabels" . | nindent 6 }}
|
|
app.kubernetes.io/component: controller
|
|
{{- if and .Values.controller.minAvailable (not (hasKey .Values.controller "maxUnavailable")) }}
|
|
minAvailable: {{ .Values.controller.minAvailable }}
|
|
{{- else if .Values.controller.maxUnavailable }}
|
|
maxUnavailable: {{ .Values.controller.maxUnavailable }}
|
|
{{- end }}
|
|
{{- end }}
|