-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: Resync resources in the namespaces on NamespaceCredential changes #1143
feat: Resync resources in the namespaces on NamespaceCredential changes #1143
Conversation
// Setting max concurrent reconciles is a hard requirement for current namespace credentials implementation. | ||
// Following watch ensures that if namespaced credentials change, all objects that use them will be reconciled. | ||
WithOptions(controller.Options{MaxConcurrentReconciles: 1}). | ||
Watches(&v1alpha1.NamespaceCredentials{}, handler.EnqueueRequestsFromMapFunc(func(ctx context.Context, nc client.Object) []reconcile.Request { |
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.
Is there no way to DRY up these EnqueueRequestsFromMapFunc handlers? Maybe generics could help or something?
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 will give it another try as at the first attempt I had problem with interface for list object that client uses to list resources.
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's done now.
Converting to draft to connect secret with namespace credentials, so we will have full event propagation for token changes. Edit: Reminder to merge |
Added logic to recreate service account secret if it gets deleted. |
No description provided.