Fix number of istio-ingressgateway pods
Downscaling of the ingressgateway pods caused premature termination
of requests. In case of long-running git requests, this happened
relatively often.
To mitigate this issue for now, this change pins the number of replicas
to 5, not allowing autoscaling.
In the long term the autoscaling should be enabled again, but being
optimized. This could be done by
- changing the TERMINATION_DRAIN_DURATION_SECONDS option of envoy to
be long enough for requests to finish
- Adapt the resources allowed for a single pod, so that less scaling
events happen
- Adapt autoscaler configuration to scale less frequently
- Analyze what is causing the high CPU load at certain times and
try to reduce the load
Change-Id: I4e59cbb531421caaa18636071d5b605c98ce99fd
diff --git a/istio/gerrit.profile.yaml b/istio/gerrit.profile.yaml
index cf14849..e2e185b 100644
--- a/istio/gerrit.profile.yaml
+++ b/istio/gerrit.profile.yaml
@@ -86,7 +86,7 @@
name: cpu
targetAverageUtilization: 80
type: Resource
- minReplicas: 1
+ minReplicas: 5
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment