From 5e4202dfcc2846b7119ef60440b05d3a7f58ad54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=C3=A4umer?= Date: Wed, 3 Jul 2024 20:29:02 +0200 Subject: [PATCH 1/2] Fixed config.json for local development --- docs/contributing.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/contributing.md b/docs/contributing.md index d1414eb86..6549851e1 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -61,7 +61,9 @@ 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": "", } ``` From 3104a4734ff233ad73ed60addb03ee6feba3dff6 Mon Sep 17 00:00:00 2001 From: Simon Baumer Date: Thu, 4 Jul 2024 09:55:06 +0200 Subject: [PATCH 2/2] removing deprecated namespace option, clarifying docs --- cmd/manager/main.go | 5 ++++- docs/architecture.md | 2 +- docs/contributing.md | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/manager/main.go b/cmd/manager/main.go index 4a1eb6d93..bd4a680e8 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -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" @@ -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) diff --git a/docs/architecture.md b/docs/architecture.md index 5e11baf6e..1717fab48 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -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. diff --git a/docs/contributing.md b/docs/contributing.md index 6549851e1..a26564716 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -69,7 +69,7 @@ to be able to run properly. Create a json file with the following content: #### 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.