Skip to content

Commit 3104a47

Browse files
committed
removing deprecated namespace option, clarifying docs
1 parent 5e4202d commit 3104a47

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

cmd/manager/main.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package main
33
import (
44
"fmt"
55
"os"
6+
"sigs.k8s.io/controller-runtime/pkg/cache"
67

78
mdbv1 "github.com/mongodb/mongodb-kubernetes-operator/api/v1"
89
"github.com/mongodb/mongodb-kubernetes-operator/controllers"
@@ -82,7 +83,9 @@ func main() {
8283

8384
// Create a new Cmd to provide shared dependencies and start components
8485
mgr, err := manager.New(cfg, manager.Options{
85-
Namespace: watchNamespace,
86+
Cache: cache.Options{
87+
Namespaces: []string{watchNamespace},
88+
},
8689
})
8790
if err != nil {
8891
log.Sugar().Fatalf("Unable to create manager: %v", err)

docs/architecture.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The MongoDB Community Kubernetes Operator is a [Custom Resource Definition](http
1010

1111
## Cluster Configuration
1212

13-
You create and update MongoDBCommunity resources by defining a MongoDBCommunity resource definition. When you apply the MongoDBCommunity resource definition to your Kubernetes environment, the Operator:
13+
You create and update MongoDBCommunity resources by defining a MongoDBCommunity resource definition in the namespace watched by the operator. When you apply the MongoDBCommunity resource definition to your Kubernetes environment, the Operator:
1414

1515
1. Creates a [StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) that contains one [pod](https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/) for each [replica set](https://www.mongodb.com/docs/manual/replication/) member.
1616
1. Writes the Automation configuration as a [Secret](https://kubernetes.io/docs/concepts/configuration/secret/) and mounts it to each pod.

docs/contributing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ to be able to run properly. Create a json file with the following content:
6969

7070
#### Config Options
7171

72-
1. `namespace` is the namespace that will be used by scripts/tooling. All the resources will be deployed here.
72+
1. `namespace` is the watch namespace of the operator, only in this namespace `MongoDBCommunity` are being reconciled. Additionally, this namespace will be used by scripts/tooling. All the resources will be deployed here.
7373
2. `repo_url` the repository that should be used to push/pull all images.
7474
3. `operator_image` will be used as the name of the operator deployment, and the name of the operator image when build.
7575
4. `e2e_image` the name of e2e test image that will be built.

0 commit comments

Comments
 (0)