-
Notifications
You must be signed in to change notification settings - Fork 93
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
reconcile sts/deploy if replica count changed #115
Conversation
func statefulSetIsEquals(obj1, obj2 object) bool { | ||
o1 := obj1.(*appsv1.StatefulSet) | ||
o2 := obj2.(*appsv1.StatefulSet) | ||
return *o1.Spec.Replicas == *o2.Spec.Replicas | ||
} | ||
|
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.
@himanshug in case we add spec here, wonder if this will conflict on scaling sts #97
Regardless are you planning to keep only replicas for now or extend for spec too
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.
for now, I am leaving it at just replica count mismatch ... but we can add more stuff here based on real world needs.
from feature perspective .. #97 and this , are different things ... however both might end up reusing some code for checking equality if that makes sense.
question :-
|
operator would recreate those in 10secs in the worst case. |
Hi, is it possible that this PR broke the HPA functionality? I have a working hpa in a cluster with operator:0.0.4, but the hpa doesn't work in a cluster with operator:0.0.5 because it looks like the operator immediately reconciles the sts size back down when the hpa tries to scale up. |
@connie-ru-wang cc @himanshug |
BTW @connie-ru-wang it would be nice if you can create a separate issue for this, so that it can be tracked. |
@AdheipSingh I've been testing HPA with routers, brokers, historicals. Although for historicals, most likely we will need v2beta2 support for the specific behavior policies that will prevent thrashing. https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-configurable-scaling-behavior Also just opened an issue for this: #160 |
Fixes #108
Description
This PR introduces the mechanism to do comparison of resources generated by druid-operator so as to reconcile them if they were changed directly. currently it only does so for the Deployment/StatefulSet replica counts but could be extended further as needed.
This PR has: