New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding 1->n and n->1 scaling for Queue scaler #47
Conversation
Excited to see this! |
Once #41 is merged, will you need to update based on the cool-down period work? |
btw, I can't build this PR. I thought the CI error was a test error, but looking at it again, the CI is also failing to build. The error is
I tried running |
also there is a |
newhpa := &v2beta1.HorizontalPodAutoscaler{Spec: *newHpaSpec, ObjectMeta: *hpaObjectSpec} | ||
newhpa, err = h.kubeClient.AutoscalingV2beta1().HorizontalPodAutoscalers(scaledObjectNamespace).Create(newhpa) | ||
if errors.IsAlreadyExists(err) { | ||
log.Warnf("HPA with namespace %s and name %s already exists", scaledObjectNamespace, hpaName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we need to have an "upgrade" mechanism once people update kore's version, so that we can change the HPA scaling logic on kore updates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possibly- I can see us updating the max replicas when the scaled object overrides it for example.
I did not. Removed. |
Yes, removed. |
removed |
This is now removed. |
@@ -39,9 +43,100 @@ func NewScaleHandler(koreClient clientset.Interface, kubeClient kubernetes.Inter | |||
|
|||
// WatchScaledObjectWithContext enqueues the ScaledObject into the work queue | |||
func (h *ScaleHandler) WatchScaledObjectWithContext(ctx context.Context, scaledObject *kore_v1alpha1.ScaledObject) { | |||
h.createHPAForNewScaledObject(ctx, scaledObject) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be called asynchronously as well i think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also keep in mind that this is called on every scaledobject update. That can be frequent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be called asynchronously but I don't think it should.
The WatchScaledObjectWithContext itself is executed on a separate goroutine from the get go, no?
@@ -39,9 +43,100 @@ func NewScaleHandler(koreClient clientset.Interface, kubeClient kubernetes.Inter | |||
|
|||
// WatchScaledObjectWithContext enqueues the ScaledObject into the work queue | |||
func (h *ScaleHandler) WatchScaledObjectWithContext(ctx context.Context, scaledObject *kore_v1alpha1.ScaledObject) { | |||
h.createHPAForNewScaledObject(ctx, scaledObject) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be called asynchronously but I don't think it should.
The WatchScaledObjectWithContext itself is executed on a separate goroutine from the get go, no?
Review submitted. |
Please resolve conflicts. |
…work # Conflicts: # .circleci/config.yml # pkg/scalers/azure_queue.go # pkg/scalers/azure_queue_scaler.go
LGTM |
Adding 1->n and n->1 scaling for Queue scaler Former-commit-id: 5e4e37e
Adding 1->n and n->1 scaling for Queue scaler Former-commit-id: 0e2b157
Adding HPA scaling for Queues.
Changes include