pashtet04 opened a new pull request, #152:
URL: https://github.com/apache/superset-kubernetes-operator/pull/152

   ## Summary
   
   This PR prevents the Superset operator from resetting 
`Deployment.spec.replicas` when HPA autoscaling is enabled for a component. 
Although the deployment builder already omits `replicas` when `autoscaling` is 
configured, the operator performs full Deployment spec updates during 
reconciliation, and the Kubernetes API server defaults an omitted Deployment 
replica count back to `1`. As a result, the operator can continuously overwrite 
the replica count set by HPA, causing HPA-created pods to be immediately 
terminated. With this change, HPA remains responsible for scaling while the 
operator continues reconciling the rest of the Deployment spec.
   
   Fixes #151
   
   ## Details
   
   - Preserves the existing live `Deployment.spec.replicas` value when 
component `autoscaling` is enabled.
   - Keeps `ForceReplicas` behavior unchanged for singleton-style components.
   - Adds a regression test that simulates HPA scaling a Deployment above the 
CR/default replica value and verifies that a subsequent reconcile does not 
scale it back down.
   - Validated with:
   
   ```console
   go test ./internal/controller
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to