Skip to content
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

Small improvements #1580

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"fmt"
"os"
"sigs.k8s.io/controller-runtime/pkg/cache"

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

// Create a new Cmd to provide shared dependencies and start components
mgr, err := manager.New(cfg, manager.Options{
Namespace: watchNamespace,
Cache: cache.Options{
Namespaces: []string{watchNamespace},
},
})
if err != nil {
log.Sugar().Fatalf("Unable to create manager: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The MongoDB Community Kubernetes Operator is a [Custom Resource Definition](http

## Cluster Configuration

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:
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:

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.
1. Writes the Automation configuration as a [Secret](https://kubernetes.io/docs/concepts/configuration/secret/) and mounts it to each pod.
Expand Down
6 changes: 4 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,15 @@ to be able to run properly. Create a json file with the following content:
"version_upgrade_hook_image": "community-operator-version-upgrade-post-start-hook",
"agent_image": "mongodb-agent-ubi-dev",
"readiness_probe_image": "mongodb-kubernetes-readiness",
"s3_bucket": ""
"s3_bucket": "",
"mdb_local_operator": "",
"kubeconfig": "",
}
```

#### Config Options

1. `namespace` is the namespace that will be used by scripts/tooling. All the resources will be deployed here.
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.
2. `repo_url` the repository that should be used to push/pull all images.
3. `operator_image` will be used as the name of the operator deployment, and the name of the operator image when build.
4. `e2e_image` the name of e2e test image that will be built.
Expand Down