voyagermesh / voyager

🚀 Secure L7/L4 (HAProxy) Ingress Controller for Kubernetes
https://voyagermesh.com
Apache License 2.0
1.35k stars 134 forks source link

Scaling Ingress annotation doesn't work #1404

Open mkozjak opened 5 years ago

mkozjak commented 5 years ago

On version 10.0.0 I can't seem to get the scaling working as per https://appscode.com/products/voyager/10.0.0/guides/ingress/scaling/#replicas

> cat ingress.yaml | grep replicas
ingress.appscode.com/replicas: "2"

> kubectl apply -f ingress.yaml
ingress.voyager.appscode.com "kube-ingress" configured
certificate.voyager.appscode.com "cons-dev" configured

> kubectl get deploy voyager-kube-ingress
NAME                   DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
voyager-kube-ingress   1         1         1            1           17m

It works if I manually scale it:

> kubectl scale deploy voyager-kube-ingress --replicas=4
deployment.extensions "voyager-kube-ingress" scaled

> kubectl get deploy voyager-kube-ingress
NAME                   DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
voyager-kube-ingress   4         4         4            4           20m
kfoozminus commented 5 years ago

Yes. Voyager doesn't sync with this annotation once after an ingress is created. This is done to prevent conflicts if HPA controls this ingress deployment. For now, if you want to change number of replicas, change it from the deployment (like you mentioned).

kfoozminus commented 5 years ago

@mkozjak we are working on it to change this behavior.

mkozjak commented 5 years ago

Yup, that'll be a great feature for us because we use terraform to track voyager yml changes. That way we could easily set the number of replicas and have that tracked.