-
Notifications
You must be signed in to change notification settings - Fork 3
Feature: support rbg scaling adapter #11
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
base: main
Are you sure you want to change the base?
Feature: support rbg scaling adapter #11
Conversation
@Syspretor Please fix the conflict issue. |
a990249
to
b933822
Compare
internal/controller/workloads/rolebaegroupscalingadaptor_controller.go
Outdated
Show resolved
Hide resolved
internal/controller/workloads/rolebaegroupscalingadaptor_controller.go
Outdated
Show resolved
Hide resolved
internal/controller/workloads/rolebaegroupscalingadaptor_controller.go
Outdated
Show resolved
Hide resolved
de801f2
to
53abcd5
Compare
setupLog.Error(err, "unable to create controller", "controller", "RoleBasedGroupScalingAdapter") | ||
os.Exit(1) | ||
} | ||
if err = rbgScalingAdapterReconciler.SetupWithManager(mgr, options); err != nil { |
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 suggest integrating the CheckCrdExists logic directly into the SetupWithManager method.
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.
All the existence validations are currently placed within the main program. Perhaps we can keep the current logic for now and later propose a PR to comprehensively revise the validation of CRDs.
5085a60
to
817527f
Compare
817527f
to
2c30b60
Compare
b.ensureObjectMetaApplyConfigurationExists() | ||
for i := range values { | ||
if values[i] == nil { | ||
panic("nil value passed to WithOwnerReferences") |
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 suggest returning error rather than panic.
limitations under the License. | ||
*/ | ||
|
||
package workloads |
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.
typo: rolebaegroupscalingadapter_controller.go -> rolebasedgroupscalingadapter_controller.go
I suggest adding Scaling Cool-Down Mechanism in next PR. |
if err := r.client.Get(ctx, types.NamespacedName{Name: req.Name, Namespace: req.Namespace}, rbgScalingAdapter); err != nil { | ||
return ctrl.Result{}, client.IgnoreNotFound(err) | ||
} | ||
if rbgScalingAdapter.DeletionTimestamp != nil { |
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.
Add TODO, this adapter's lifecycle is binding to RBG object to make it easy to management.
No description provided.