appsody / appsody-operator

An Operator for deploying Appsody based applications to Kubernetes. This repo will be archived soon.
Apache License 2.0
18 stars 15 forks source link

HPA(Autoscale) doesn't work, relicas value is reverted by appsody after scaled out. #252

Closed iamnogada closed 4 years ago

iamnogada commented 4 years ago

Bug Report

What did you do?

A clear and concise description of the steps you took (or insert a code snippet).

What did you expect to see?

A clear and concise description of what you expected to happen (or insert a code snippet). If possible, add AppsodyApplication CR.

What did you see instead?

It should increate by hpa when load traffic

A clear and concise description of what you expected to happen (or insert a code snippet).

Environment

Possible solution

Additional context

Add any other context about the problem here.

leochr commented 4 years ago

@iamnogada Thanks for opening the issue. There is an issue opened for this in the upstream project Runtime Component Operator. Once it's fixed, we'll pick it up in Appsody Operator : https://github.com/application-stacks/runtime-component-operator/issues/68

arthurdm commented 4 years ago

thanks @leochr - is there any workaround available for @iamnogada to try?

If it's an easy fix we could consider releasing 0.4.1 in Appsody / Open Liberty directly and push it into the 0.5.0 Runtime stream concurrently.

leochr commented 4 years ago

@arthurdm unfortunately, there isn't a workaround. Code changes at operator is necessary to address the issue. We'll try to address this as soon as possible.

We understand why this happens: The operator watches the sub-resources it creates (Deployment, Service, Route, etc) to ensure that it's in the desired state. When auto scaling is enabled, an HPA sub-resource is created, which tries to control the Deployment. This results in operator incorrectly reverting it back to the original state (using replicas definition).

arthurdm commented 4 years ago

great job fixing this @edavidj / @leochr - I think it can be closed now?

leochr commented 4 years ago

Yes. Closing as complete.