Skip to content

Support for dynamic watch lws CRD #12

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

Merged
merged 1 commit into from
Jul 9, 2025

Conversation

zmberg
Copy link
Contributor

@zmberg zmberg commented Jul 4, 2025

No description provided.

@cheyang cheyang requested a review from gujingit July 6, 2025 12:08
role.Workload.Kind == getLwsGVK().Kind && !lwsExist {
watchedWorkload.LoadOrStore(reconciler.LwsCrdName, struct{}{})
runtimeController.Owns(&lwsv1.LeaderWorkerSet{}, builder.WithPredicates(WorkloadPredicate()))
logger.Info("rbc controller watch LeaderWorkerSet CRD")
Copy link
Collaborator

Choose a reason for hiding this comment

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

rbc -> rbgs

@@ -94,6 +104,14 @@ func (r *RoleBasedGroupReconciler) Reconcile(ctx context.Context, req ctrl.Reque
var roleStatuses []workloadsv1alpha1.RoleStatus
var updateStatus bool
for _, role := range sortedRoles {
// first check whether watch lws cr
_, lwsExist := watchedWorkload.Load(reconciler.LwsCrdName)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest encapsulating the logic into a function to enhance reusability and clarity. And it can support Openkruise type in future.

@cheyang cheyang changed the title Support for dynamic watch lwt CRD Support for dynamic watch lws CRD Jul 7, 2025
@zmberg zmberg force-pushed the fix-rbg-start-failed branch from 36cb02b to 5ab548d Compare July 8, 2025 12:19
@zmberg zmberg force-pushed the fix-rbg-start-failed branch from 5ab548d to d580404 Compare July 9, 2025 02:22
@gujingit
Copy link
Collaborator

gujingit commented Jul 9, 2025

/approve
/lgtm

@gujingit gujingit enabled auto-merge July 9, 2025 02:26
@gujingit gujingit merged commit ce6596d into AliyunContainerService:main Jul 9, 2025
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.

3 participants