[stable/nginx-ingress] make PDB, autoscaling and GitOps play nice with each other (#19073)

When deploying the NGINX ingress controller including autoscler via Flux, you usually don’set the replicaCount.
Flux and the autoscaler interfere with each other as flux would keep changing the number of replicas to the desired values, too. By just not setting the replicaCount, you lose the pod disruption budget. With this change, you can have all three: autoscaler, GitOps deployment and a por disruption budget.

Signed-off-by: Hendrik M Halkow <hendrik@halkow.com>
This commit is contained in:
Hendrik M Halkow
2019-11-25 11:40:08 -08:00
committed by Kubernetes Prow Robot
parent fe6c09b96b
commit 3eedc8f92e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: nginx-ingress
version: 1.25.0
version: 1.25.1
appVersion: 0.26.1
home: https://github.com/kubernetes/ingress-nginx
description: An nginx Ingress controller that uses ConfigMap to store the nginx configuration.
@@ -1,4 +1,4 @@
{{- if gt (.Values.controller.replicaCount | int) 1 }}
{{- if or (and .Values.controller.autoscaling.enabled (gt (.Values.controller.autoscaling.minReplicas | int) 1)) (gt (.Values.controller.replicaCount | int) 1) }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata: