Hi Wei Li, After give a better look in the example https://github.com/integr8ly/keycloak-operator/blob/master/cmd/keycloak-operator/main.go#L66 I checked that the watches/client fetches instead of being implemented in each kind of controller as suggested in the operator-sdk docs and its getting started is implemented is all implemented in the main.go. Note that the MSS-OPERATOR is justing fetching in the specific namespaces at the same way. See here exactly in the same way. The following line is NOT the watch. It is a default setup of the manager as defined in its docs.
mgr, err := manager.New(cfg, manager.Options{Namespace: ""})
The only thing that we need here regards this point is changed to passing the namespace of the operator instead of "" since we do not need cache all since the requirement was changed at is namespace-scoped operator now c/c David Ffrench Laura Fitzgerald |