From c9348b5e9800c30817e979c5e5234c355c919d0c Mon Sep 17 00:00:00 2001 From: "Jose R. Gonzalez" Date: Wed, 5 Aug 2020 19:41:45 -0500 Subject: [PATCH] update docs to reflect call to NewManager (#3651) Signed-off-by: Jose R. Gonzalez --- .../content/en/docs/building-operators/golang/tutorial.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/content/en/docs/building-operators/golang/tutorial.md b/website/content/en/docs/building-operators/golang/tutorial.md index 48c6a1c953b..8d963450b11 100644 --- a/website/content/en/docs/building-operators/golang/tutorial.md +++ b/website/content/en/docs/building-operators/golang/tutorial.md @@ -39,18 +39,18 @@ See the [Kubebuilder entrypoint doc][kubebuilder_entrypoint_doc] for more detail The Manager can restrict the namespace that all controllers will watch for resources: ```Go -mgr, err := manager.New(cfg, manager.Options{Namespace: namespace}) +mgr, err := ctrl.NewManager(cfg, manager.Options{Namespace: namespace}) ``` By default this will be the namespace that the operator is running in. To watch all namespaces leave the namespace option empty: ```Go -mgr, err := manager.New(cfg, manager.Options{Namespace: ""}) +mgr, err := ctrl.NewManager(cfg, manager.Options{Namespace: ""}) ``` It is also possible to use the [MultiNamespacedCacheBuilder][multi-namespaced-cache-builder] to watch a specific set of namespaces: ```Go var namespaces []string // List of Namespaces // Create a new Cmd to provide shared dependencies and start components -mgr, err := manager.New(cfg, manager.Options{ +mgr, err := ctrl.NewManager(cfg, manager.Options{ NewCache: cache.MultiNamespacedCacheBuilder(namespaces), }) ```