keda
keda copied to clipboard
Refactor SetStatusConditions logic
Signed-off-by: Philipp Böschen [email protected]
A first try at implementing https://github.com/kedacore/keda/issues/2906 - moving the conditions setting logic into the pkg/util
package.
Checklist
- [ ] Commits are signed with Developer Certificate of Origin (DCO - learn more)
- [ ] Tests have been added
- [ ] A PR is opened to update our Helm chart (repo) (if applicable, ie. when deployment manifests are modified)
- [ ] A PR is opened to update the documentation on (repo) (if applicable)
- [ ] Changelog has been updated and is aligned with our changelog requirements
Fixes #2906
hey @catouc , Could you solve the conflict please? I think that CI hasn't been triggered due to that
hey @catouc , Could you solve the conflict please? I think that CI hasn't been triggered due to that
Should be fine now - but I am having issues with functional tests now, I don't think my implementation actually works - which is odd since I'm just passing through to the original setter methods on the Conditions slice :thinking:
[Fail] ScaledObjectController functional tests [It] deploys ScaledObject and creates HPA, when IdleReplicaCount, MinReplicaCount and MaxReplicaCount is defined
/home/pb/Code/oss/keda/controllers/keda/scaledobject_controller_test.go:422
[Fail] ScaledObjectController functional tests [It] doesn't allow MinReplicaCount > MaxReplicaCount
/home/pb/Code/oss/keda/controllers/keda/scaledobject_controller_test.go:512
[Fail] ScaledObjectController functional tests [It] doesn't allow IdleReplicaCount > MinReplicaCount
/home/pb/Code/oss/keda/controllers/keda/scaledobject_controller_test.go:555
[Fail] ScaledObjectController functional tests [It] doesn't allow IdleReplicaCount > MaxReplicaCount, when MinReplicaCount is not explicitly defined
/home/pb/Code/oss/keda/controllers/keda/scaledobject_controller_test.go:598
Any update on this?
Any update on this?
I'll likely not get around to this so if someone wants to actually pick this up instead you're very welcome.
Closing this in favor of: https://github.com/kedacore/keda/pull/4487