Skip to content
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

fix(scaledobject): reconcile hpa on label or annotations change #5482

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chubchubsancho
Copy link

Provide a description of what has been changed

HPA need to be reconcile on scaledObject annotations or labels update

Checklist

  • Tests have been added
  • Changelog has been updated and is aligned with our changelog requirements
  • Commits are signed with Developer Certificate of Origin (DCO - learn more)

Fixes #

#5468

@chubchubsancho chubchubsancho requested a review from a team as a code owner February 5, 2024 08:52
@chubchubsancho chubchubsancho force-pushed the fix/scaledobject/reconcile_on_annotations_change branch 2 times, most recently from ee89f8b to 9c3703e Compare February 5, 2024 09:08
Signed-off-by: Grégory SANCHEZ <gregory.sanchez@icloud.com>
@chubchubsancho chubchubsancho force-pushed the fix/scaledobject/reconcile_on_annotations_change branch from 9c3703e to 731512f Compare February 5, 2024 09:32
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Jean-Yves CAMIER <jycamier@gmail.com>
Signed-off-by: Grégory SANCHEZ <gregory.sanchez@icloud.com>
Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! only a small nit inline.
Although it's okey, I want to know @zroubalik's thoughts because maybe we weren't checking annotations and labels for any reason I'm missing

@@ -132,6 +132,8 @@ func (r *ScaledObjectReconciler) SetupWithManager(mgr ctrl.Manager, options cont
kedacontrollerutil.PausedReplicasPredicate{},
kedacontrollerutil.ScaleObjectReadyConditionPredicate{},
predicate.GenerationChangedPredicate{},
predicate.LabelChangedPredicate{},
predicate.AnnotationChangedPredicate{},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this predicate we don't need

kedacontrollerutil.PausedPredicate{},
kedacontrollerutil.PausedReplicasPredicate{},

as both are allowing changes on annotations.

Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason for not reconciling on labels/annotations was to limit the number of reconciliations in total and subsequent re-creation of scale loops. I am not sure we should change the behavior this way. Maybe adding specific fields for annotations/labels in spec.advanced.hpconfig.. ? Not sure though

@tomkerkhove
Copy link
Member

@chubchubsancho Any update on this PR?

@chubchubsancho
Copy link
Author

@chubchubsancho Any update on this PR?

@tomkerkhove sorry i have not so much time past week to rework on this PR. I need to take a look at @zroubalik approach.

@zroubalik
Copy link
Member

@chubchubsancho Any update on this PR?

@tomkerkhove sorry i have not so much time past week to rework on this PR. I need to take a look at @zroubalik approach.

no worries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants