feat: add KEDA/HPA managed scaling support#197
Open
m1rl0k wants to merge 1 commit intotemporalio:mainfrom
Open
feat: add KEDA/HPA managed scaling support#197m1rl0k wants to merge 1 commit intotemporalio:mainfrom
m1rl0k wants to merge 1 commit intotemporalio:mainfrom
Conversation
When TemporalWorkerDeployment has annotation 'temporal.io/keda-managed', the controller defers replica scaling to external HPA/KEDA: - Filters out non-zero scale operations (keeps scale-to-zero for sunset) - Preserves existing replicas during deployment updates This allows KEDA to manage worker scaling without fighting the operator.
Author
|
@jlegrone any objections? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added opt-in KEDA/HPA scaling support via
temporal.io/keda-managedannotation on TemporalWorkerDeployment resources.When this annotation is present:
This is a ~17 line change in
internal/controller/genplan.gothat is fully backwards compatible - existing users without the annotation see zero behavior change.Why?
Users running Temporal workers on Kubernetes often want to use KEDA for autoscaling based on Temporal task queue depth metrics. Currently, the operator's replica management conflicts with KEDA's scaling decisions, causing a "fight" between the two controllers.
This change allows the operator to defer scaling responsibility to KEDA while still handling:
Checklist
Closes #N/A (new feature request)
How was this tested:
ScaleDeploymentsandUpdateDeploymentsreplica handling when annotation presentAny docs updates needed?
temporal.io/keda-managedannotation