-
Notifications
You must be signed in to change notification settings - Fork 14
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
🐛 enqueue secrets created by vcluster in addition to owned secrets #309
Conversation
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
This seems a bit broader than necessary. Can there be filtering that narrows down the set of Secrets that the KubeFlex controller will react to? |
…by the cp Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
@@ -163,16 +166,38 @@ func (r *ControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl.Request | |||
func (r *ControlPlaneReconciler) SetupWithManager(mgr ctrl.Manager) error { | |||
return ctrl.NewControllerManagedBy(mgr). | |||
For(&tenancyv1alpha1.ControlPlane{}). | |||
Owns(&corev1.Service{}). | |||
Owns(&networkingv1.Ingress{}). | |||
Owns(&appsv1.Deployment{}). | |||
Owns(&appsv1.StatefulSet{}). |
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.
Same problem here too, if I understand https://github.com/kubestellar/kubeflex/blob/v0.7.2/pkg/reconcilers/vcluster/reconciler.go#L100 correctly. If the StatefulSet is missing, this controller will note that in the ControlPlane's status and happily be done, without getting notified when the StatefulSet is created later.
Owns(&corev1.ConfigMap{}). | ||
Owns(&corev1.ServiceAccount{}). | ||
Owns(&corev1.Secret{}). | ||
Watches(&corev1.Secret{}, enqueueSecretsOfInterest()). | ||
Complete(r) |
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.
Also, I see that https://github.com/kubestellar/kubeflex/blob/v0.7.2/pkg/reconcilers/vcluster/reconciler.go#L121 is sensitive to the existence of a PostCreateHook. The usual Kubernetes style is to wait for a referenced object to exist when told to use it.
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.
LGTM
This is progress. Further issues noted in independent comments here.
Summary
enqueue secrets created by vcluster in addition to owned secrets
Fixes #2717