banzaicloud / istio-operator

An operator that manages Istio deployments on Kubernetes
Apache License 2.0
535 stars 94 forks source link

istiod HPA doesn't work with istio-operator v2.15.3 #878

Closed vitalii-buchyn-exa closed 1 year ago

vitalii-buchyn-exa commented 1 year ago

Describe the bug HPA for istiod doesn't work as expected with istio-operator v2.15.3 We have tried spec.istiod.deployment.replicas.count = 0, 1, min, max, max/2 and without count in spec, istiod deployment replicas count is never set to desiredReplicas, instead, operator resets it to a number that depends on a count value, for example:

IstioControlPlane istiod spec example:

spec:
  istiod:
    replicas:
      count: 30
      min: 30
      max: 160

Here is an events example from istiod deployment showing immediate downscale after upscale (25 is a new count and min spec to increase load and trigger hpa):

  Normal  ScalingReplicaSet  38s (x2 over 6m45s)   deployment-controller  Scaled up replica set istiod-istio2-78bc7b486b to 33
  Normal  ScalingReplicaSet  18s (x3 over 9m10s)   deployment-controller  Scaled down replica set istiod-istio2-78bc7b486b to 25

If we stop istio-operator (e.g. scale its deploymeent to 0), hpa works as expected.

I can see there was a fix https://github.com/banzaicloud/istio-operator/pull/853, and probably there is a misunderstanding from our side how to enable hpa.

Please let me know if any additional info is required. Thank you.

Expected behavior HPA to work as expected - set istiod deployment replicas to desiredReplicas

Screenshots

Additional context helm chart used - 2.0.19 istio-operator version - 2.15.3 pilot version - 1.15.3

We do see this issue for istio operator v2.14.0 as well

LuciferInLove commented 1 year ago

Hello @vitalii-buchyn-exa. I apologize for the long non-answering. Could you please try the HPA on the v2.16.0 version of the operator?

vitalii-buchyn-exa commented 1 year ago

@LuciferInLove will try, thank you

vitalii-buchyn-exa commented 1 year ago

@LuciferInLove hello, with v2.16.0 version istiod hpa works as expected. thank you!

LuciferInLove commented 1 year ago

@vitalii-buchyn-exa, great. Thanks for letting us know.