Skip to content

Commit

Permalink
Watch RBAC resources to trigger reconcile
Browse files Browse the repository at this point in the history
This ensures the controller watches service account, role, and role
bindings to reconcile these resources in case any change is made.
  • Loading branch information
kajinamit committed Jul 6, 2023
1 parent 51952f5 commit eec0c84
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controllers/cinder_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ func (r *CinderReconciler) SetupWithManager(mgr ctrl.Manager) error {
Owns(&rabbitmqv1.TransportURL{}).
Owns(&batchv1.Job{}).
Owns(&corev1.Secret{}).
Owns(&corev1.ServiceAccount{}).
Owns(&rbacv1.Role{}).
Owns(&rbacv1.RoleBinding{}).
// Watch for TransportURL Secrets which belong to any TransportURLs created by Cinder CRs
Watches(&source.Kind{Type: &corev1.Secret{}},
handler.EnqueueRequestsFromMapFunc(transportURLSecretFn)).
Expand Down

0 comments on commit eec0c84

Please sign in to comment.