Skip to content

Commit 440ab7d

Browse files
author
Nikolas De Giorgis
authored
Release v0.5.1 (#348)
1 parent ccc5337 commit 440ab7d

7 files changed

+39
-20
lines changed

config/manager/manager.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
serviceAccountName: mongodb-kubernetes-operator
1717
containers:
1818
- name: mongodb-kubernetes-operator
19-
image: quay.io/mongodb/mongodb-kubernetes-operator:0.5.0
19+
image: quay.io/mongodb/mongodb-kubernetes-operator:0.5.1
2020
command:
2121
- /usr/local/bin/entrypoint
2222
imagePullPolicy: Always

deploy/openshift/operator_openshift.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
serviceAccountName: mongodb-kubernetes-operator
1616
containers:
1717
- name: mongodb-kubernetes-operator
18-
image: quay.io/mongodb/mongodb-kubernetes-operator:0.5.0
18+
image: quay.io/mongodb/mongodb-kubernetes-operator:0.5.1
1919
command:
2020
- mongodb-kubernetes-operator
2121
imagePullPolicy: Always

docs/build_operator_locally.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ kubectl cluster-info --context kind-kind --kubeconfig $KUBECONFIG
3535
4. Build and deploy the operator:
3636

3737
```sh
38-
python ./scripts/dev/build_and_deploy_operator
38+
python ./scripts/dev/build_and_deploy_operator.py
3939
```
4040

41+
4142
Note: this will build and push the operator at `repo_url/mongodb-kubernetes-operator`, where `repo_url` is extracted from the [dev config file](./contributing.md#developing-locally)
4243

43-
5. Change the [operator yaml file](../deploy/operator.yaml) `image` field to have the image you just built
44+
5. Change the [manager yaml file](../config/manager/manager.yaml) `image` field to have the image you just built
4445

4546
6. You can now deploy your resources following the [docs](../docs/README.md)
4647

docs/contributing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ completion. If the objects complete with a Success status, it means that the
105105
tests were run successfully.
106106

107107
The available tests can be found in the `tests/e2e` directory, at the time of this
108-
writting we have:
108+
writing we have:
109109

110110
```sh
111111
$ ls -l test/e2e

docs/deploy-configure.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Deploy and Configure a MongoDB Resource #
22

3-
The [`/deploy/crds`](../deploy/crds) directory contains example MongoDB resources that you can modify and deploy.
3+
The [`/config/samples`](../config/samples) directory contains example MongoDB resources that you can modify and deploy.
44

55
## Table of Contents
66

@@ -15,10 +15,10 @@ The [`/deploy/crds`](../deploy/crds) directory contains example MongoDB resource
1515

1616
To deploy your first replica set:
1717

18-
1. Replace `<your-password-here>` in deploy/crds/mongodb.com_v1_mongodbcommunity_cr.yaml to the password you wish to use.
18+
1. Replace `<your-password-here>` in [config/samples/mongodb.com_v1_mongodbcommunity_cr.yaml](../config/samples/mongodb.com_v1_mongodbcommunity_cr.yaml) to the password you wish to use.
1919
2. Invoke the following `kubectl` command:
2020
```
21-
kubectl apply -f deploy/crds/mongodb.com_v1_mongodbcommunity_cr.yaml --namespace <my-namespace>
21+
kubectl apply -f config/samples/mongodb.com_v1_mongodbcommunity_cr.yaml --namespace <my-namespace>
2222
```
2323
3. Verify that the MongoDB resource deployed:
2424
```
@@ -130,7 +130,7 @@ To upgrade this resource from `4.0.6` to `4.2.7`:
130130

131131
To deploy the operator on OpenShift you will have to provide the environment variable `MANAGED_SECURITY_CONTEXT` set to `true` for both the `mongodb` and `mongodb-agent` containers, as well as the operator deployment.
132132

133-
See [here](../deploy/crds/mongodb.com_v1_mongodbcommunity_openshift_cr.yaml) for
133+
See [here](/config/samples/mongodb.com_v1_mongodbcommunity_openshift_cr.yaml) for
134134
an example of how to provide the required configuration for a MongoDB
135135
replica set.
136136

docs/install-upgrade.md

+28-10
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ You scope the Operator to a namespace. The Operator watches MongoDB resources in
4242

4343
To configure the Operator to watch resources in other namespaces:
4444

45-
1. In the Operator [resource definition](../deploy/operator/operator.yaml), set the `WATCH_NAMESPACE` environment variable to one of the following values:
45+
1. In the Operator [resource definition](../config/manager/manager.yaml), set the `WATCH_NAMESPACE` environment variable to one of the following values:
4646

4747
- the namespace that you want the Operator to watch, or
4848
- `*` to configure the Operator to watch all namespaces in the cluster.
@@ -77,24 +77,40 @@ To configure the Operator to watch resources in other namespaces:
7777

7878
The MongoDB Community Kubernetes Operator is a [Custom Resource Definition](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) and a controller.
7979

80+
The Operator can be installed using the [Makefile](../Makefile) provided by `operator-sdk`
81+
8082
To install the MongoDB Community Kubernetes Operator:
8183

8284
1. Change to the directory in which you cloned the repository.
8385
2. Install the [Custom Resource Definitions](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
8486

85-
a. Invoke the following `kubectl` command:
87+
a. Invoke the following command:
8688
```
87-
kubectl create -f deploy/crds/mongodb.com_mongodbcommunity_crd.yaml
89+
apply -f config/crd/bases/mongodbcommunity.mongodb.com_mongodbcommunity.yaml
8890
```
8991
b. Verify that the Custom Resource Definitions installed successfully:
9092
```
91-
kubectl get crd/mongodbcommunity.mongodb.com
93+
kubectl get crd/mongodbcommunity.mongodbcommunity.mongodb.com
9294
```
93-
3. Install the Operator.
95+
3. Install the necessary roles and role-bindings:
96+
97+
a. Invoke the following command:
98+
```
99+
kubectl apply -f config/rbac/
100+
```
101+
b. Verify that the resources have been created:
102+
```
103+
kubectl get role mongodb-kubernetes-operator
104+
105+
kubectl get rolebinding mongodb-kubernetes-operator
106+
107+
kubectl get serviceaccount mongodb-kubernetes-operator
108+
```
109+
4. Install the Operator.
94110
95111
a. Invoke the following `kubectl` command to install the Operator in the specified namespace:
96112
```
97-
kubectl create -f deploy/operator/ --namespace <my-namespace>
113+
kubectl create -f config/manager/manager.yaml --namespace <my-namespace>
98114
```
99115
b. Verify that the Operator installed successsfully:
100116
```
@@ -103,10 +119,12 @@ To install the MongoDB Community Kubernetes Operator:
103119
104120
## Upgrade the Operator
105121
106-
To upgrade the MongoDB Community Kubernetes Operator:
122+
To upgrade the MongoDB Community Kubernetes Operator to a specific version:
107123
108-
1. Change to the directory in which you cloned the repository.
109-
2. Invoke the following `kubectl` command to upgrade the [Custom Resource Definitions](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
124+
1. Change the version in the [operator yaml file](../config/manager/manager.yaml)
125+
2. Change to the directory in which you cloned the repository.
126+
3. Checkout the specific tag matching the operator version (e.g. `v0.5.1`)
127+
4. Invoke the following `kubectl` command to upgrade the [Custom Resource Definitions](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
110128
```
111-
kubectl apply -f deploy/crds/mongodb.com_mongodbcommunity_crd.yaml
129+
kubectl apply -f config/crd/bases/mongodbcommunity.mongodb.com_mongodbcommunity.yaml
112130
```

release.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"mongodb-kubernetes-operator": "0.5.0",
2+
"mongodb-kubernetes-operator": "0.5.1",
33
"version-upgrade-hook": "1.0.2",
44
"readiness-probe": "1.0.1",
55
"agent": {

0 commit comments

Comments
 (0)