Skip to content

Commit 705481e

Browse files
author
Anton
authored
CLOUDP-85165: additional release instructions (#175)
1 parent 93c4b72 commit 705481e

File tree

3 files changed

+59
-18
lines changed

3 files changed

+59
-18
lines changed

config/manifests/bases/mongodb-atlas-kubernetes.clusterserviceversion.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,4 @@ spec:
5757
maturity: alpha
5858
provider:
5959
name: MongoDB, Inc
60-
url: https://github.com/mongodb/mongodb-atlas-kubernetes
6160
version: 0.0.0

config/samples/atlas_v1_atlasproject.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ metadata:
44
name: my-project
55
spec:
66
name: Test Atlas Operator Project
7-
connectionSecretRef:
8-
name: my-atlas-key
97
projectIpAccessList:
108
- ipAddress: "192.0.2.15"
11-
comment: "IP address for Application Server A"
12-
- ipAddress: "203.0.113.0/24"
13-
comment: "CIDR block for Application Server B - D"
14-
- awsSecurityGroup: "sg-0026348ec11780bd1"
15-
comment: "Access Listed AWS Security Group"
9+
comment: "IP address for Application Server A"

docs/dev/release.md

Lines changed: 58 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,21 @@ The new job "Create Release" will be triggered and the following will be done:
1414
## Edit the Release Notes and publish the release
1515
Follow the format of the previous release notes (two main sections: "Features" and "Bug Fixes"). Publish the release.
1616

17+
## Synchronize configuration changes with the Helm Charts
18+
19+
Create a PR to https://github.com/mongodb/helm-charts to update two Helm charts:
20+
* [atlas-operator-crds](https://github.com/mongodb/helm-charts/tree/main/charts/atlas-operator-crds)
21+
* [atlas-operator](https://github.com/mongodb/helm-charts/tree/main/charts/atlas-operator)
22+
* `Chart.yaml` - update the `AppVersion` to the new Operator version and increment the minor digit for `version`
23+
* any changes to `templates` configuration
24+
25+
Merge the PR - the chart will get released automatically.
26+
1727
## Create the Pull Request to publish the bundle to operatorhub.io
1828

19-
All bundles/package manifests for Operators for operatorhub.io reside in `https://github.com/operator-framework/community-operators/tree/master/upstream-community-operators`
29+
All bundles/package manifests for Operators for operatorhub.io reside in:
30+
* `https://github.com/operator-framework/community-operators/tree/master/upstream-community-operators` - for public Operators from operatorhub.io
31+
* `https://github.com/operator-framework/community-operators/tree/master/community-operators` - for Operators from "internal" operatorhub that are synchronized with Openshift clusters
2032

2133
### Fork/Update the community operators repository
2234
**(First time) Fork the repository**
@@ -41,22 +53,58 @@ git checkout master
4153
git merge upstream/master
4254
```
4355

44-
### Create a Pull Request with a new bundle
56+
### Create a Pull Request to `community-operators` with a new bundle
57+
58+
This is necessary for the Operator to appear on "operators" tab in Openshift clusters
4559

4660
```
4761
version=0.5.0
48-
mkdir <community-operators-repo>/upstream-community-operators/mongodb-atlas-kubernetes/${version}
49-
cp bundle.Dockerfile bundle/manifests bundle/metadata <community-operators-repo>/upstream-community-operators/mongodb-atlas-kubernetes/${version}
50-
cd <community-operators-repo>
51-
git checkout -b "mongodb-atlas-operator-${version}"
62+
mkdir <community-operators-repo>/community-operators/mongodb-atlas-kubernetes/${version}
63+
cp bundle.Dockerfile bundle/manifests bundle/metadata <community-operators-repo>/community-operators/mongodb-atlas-kubernetes/${version}
64+
cd <community-operators-repo>/community-operators/mongodb-atlas-kubernetes/${version}
65+
66+
# replace the move instructions in the docker file
67+
sed -i .bak 's/COPY bundle\/manifests/COPY manifests/' bundle.Dockerfile
68+
sed -i .bak 's/COPY bundle\/metadata/COPY metadata/' bundle.Dockerfile
69+
sed -i .bak '/COPY bundle\/tests\/scorecard \/tests\/scorecard\//d' bundle.Dockerfile
70+
rm bundle.Dockerfile.bak
71+
72+
# commit
73+
git checkout -b "mongodb-atlas-operator-community-${version}"
5274
git commit -m "MongoDB Atlas Operator ${version}" --signoff *
53-
git push origin mongodb-atlas-operator-${version}
75+
git push origin mongodb-atlas-operator-community-${version}
76+
```
77+
78+
*(This should be automated in the future by the correct layout of kustomize configs)*
79+
Remove the following lines for `Deployment` from the CSV file and leave the `securityContext` empty:
80+
5481
```
82+
runAsNonRoot: true
83+
runAsUser: 2000
84+
```
85+
86+
Create the PR to the main repository and wait until CI jobs get green.
5587

56-
(note, that it's required that the PR consists of only one commit - you may need to do
88+
(note, that it's required that the PR consists of only one commit - you may need to do
5789
`git rebase -i HEAD~2; git push origin +master` if you need to squash multiple commits into one and perform force push)
5890

91+
See https://github.com/operator-framework/community-operators/pull/3343 as an example
92+
93+
### Create a Pull Request to `upstream-community-operators` with a new bundle
94+
95+
This is necessary for the Operator to appear on [operatorhub.io] site.
96+
For this PR the sources are copied from the `community-operators` folder instead of the one where the `mongodb-atlas-kubernetes` resides.
97+
98+
```
99+
# cd <community-operators-repo>
100+
cp -r community-operators/mongodb-atlas-kubernetes/${version} upstream-community-operators/mongodb-atlas-kubernetes
101+
git add upstream-community-operators/mongodb-atlas-kubernetes/${version}
102+
git checkout -b "mongodb-atlas-operator-community-${version}"
103+
git commit -m "[community] MongoDB Atlas Operator ${version}" --signoff upstream-community-operators/mongodb-atlas-kubernetes/${version}
104+
git push origin mongodb-atlas-operator-community-${version}
105+
git push
106+
```
107+
59108
Create the PR to the main repository and wait until CI jobs get green.
60109
After the PR is approved and merged - it will soon get available on https://operatorhub.io
61-
62-
Example PR: https://github.com/operator-framework/community-operators/pull/3281
110+
Example PR: https://github.com/operator-framework/community-operators/pull/3281

0 commit comments

Comments
 (0)