Transferring ownership of an existing HPA didn't work
Report
I followed this docs to migrate from an existing HPA to KEDA. I added some external scalers, advanced.horizontalPodAutoscalerConfig.behavior in ScaledObject and updated minReplicaCount & maxReplicaCount.
However, the existing HPA remained unchanged after applying the new yaml.
Expected Behavior
The ScaledObject takes control of the existing HPA and updates it with new configurations.
Actual Behavior
The existing HPA seemed to be transferred to ScaledObject but its yaml didn't change, and the HPA still scaled the Deployment based on the old configurations.
Steps to Reproduce the Problem
- Delete the old HPA definition from the yaml file
- Migrate the HPA to KEDA following this docs, add some external scalers,
advanced.horizontalPodAutoscalerConfig.behaviorinScaledObjectand updateminReplicaCount&maxReplicaCount. - Apply the new yaml
Logs from KEDA operator
KEDA Version
2.16.0
Kubernetes Version
1.31
Platform
Amazon Web Services
Scaler Details
cpu, memory, aws-sqs-queue, etc.
Anything else?
No response
Did you use an existing ScaledObject rather than a new ScaledObject to handle the existing HPA? The error that you posted in the issue will occur in that situation.
Did you use an existing ScaledObject rather than a new ScaledObject to handle the existing HPA? The error that you posted in the issue will occur in that situation.
Yes, the ScaledObject is the existing one. But I was updating it and making it take over the existing HPA for the first time. If that's not the right way to do things, how should I do? Just make ScaledObject create a new HPA and delete the old one?
Delete the existing ScaledObject and create a new ScaledObject can take over the existing HPA even if the new one has the same name. If using the existing ScaledObject to take over the HPA directly, ScaledObject will delete the old HPA, skip the HPA existing checking and attempt to create a new HPA, resulting in a duplicate HPA creation error.
Any chance we can improve this? Making the existing ScaledObject do the existing HPA check?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Updating
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed due to inactivity.