Skip to content

Commit b57b325

Browse files
github-actions[bot]leo-rifabritsius
committed
Release 0.6.0 (#293)
Co-authored-by: Svetlana <[email protected]> Co-authored-by: Anton <[email protected]>
1 parent d663cf8 commit b57b325

12 files changed

+115
-58
lines changed

.github/workflows/release-post-merge.yml

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@ name: Create Release.
77
on:
88
pull_request:
99
types: [closed]
10+
workflow_dispatch:
11+
inputs:
12+
version:
13+
description: "Release version (Be sure `Release-branch` is successful):"
14+
required: true
1015

1116
jobs:
1217
create-release:
1318
name: Create Release
14-
if: (github.event.pull_request.merged == true) && (startsWith(github.event.pull_request.head.ref, 'release'))
19+
if: (github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release')) || github.event.inputs.version != ''
1520
runs-on: ubuntu-latest
1621
env:
1722
DOCKER_RELEASE_REPO: mongodb/mongodb-atlas-kubernetes-operator
@@ -26,9 +31,14 @@ jobs:
2631
id: tag
2732
env:
2833
BRANCH: ${{ github.event.pull_request.head.ref }}
34+
VERSION: ${{ github.event.inputs.version }}
2935
run: |
30-
echo "BRANCH:$BRANCH"
31-
version=$(echo $BRANCH | awk -F '/' '{print $2}')
36+
version=$VERSION
37+
if [[ "$version" == "" ]]; then
38+
version=$(echo $BRANCH | awk -F '/' '{print $2}')
39+
fi
40+
41+
echo "VERSION:$version"
3242
tag="v${version}"
3343
echo "::set-output name=version::$version"
3444
echo "::set-output name=tag::$tag"
@@ -64,30 +74,13 @@ jobs:
6474
labels: version=${{ steps.tag.outputs.version }}
6575
build_args: VERSION=${{ steps.tag.outputs.tag }}
6676

67-
- name: Wait image in RedHhat registry
68-
env:
69-
IMAGE: ${{ env.REDHAT_RELEASE_REGISTRY }}/${{ env.REDHAT_OPERATOR_REPO }}:${{ steps.tag.outputs.version }}
70-
TIMEOUT: 60
71-
run: |
72-
./scripts/github-actions/await_image_push.sh "$IMAGE" "$TIMEOUT"
73-
74-
- name: Push Atlas Operator Bundle to RedHat Connect
75-
uses: docker/build-push-action@v1
76-
with:
77-
username: unused
78-
password: ${{ secrets.REDHAT_REGISTRY_BUNDLES_PASSWORD }}
79-
repository: ${{ env.REDHAT_BUNDLE_REPO }}
80-
registry: ${{ env.REDHAT_RELEASE_REGISTRY}}
81-
tags: ${{ steps.tag.outputs.version }}
82-
dockerfile: bundle.Dockerfile
83-
8477
- name: Push Atlas Operator to Quay Registry
8578
uses: docker/build-push-action@v1
8679
with:
8780
username: ${{ env.QUAY_ROBOT_NAME }}
8881
password: ${{ secrets.QUAY_PASSWORD }}
8982
repository: ${{ env.QUAY_OPERATOR_REPO }}
90-
registry: ${{ env.DOCKER_REGISTRY }}
83+
registry: ${{ env.QUAY_RELEASE_REGISTRY }}
9184
tags: ${{ steps.tag.outputs.version }}
9285
build_args: VERSION=${{ steps.tag.outputs.tag }}
9386

@@ -118,3 +111,21 @@ jobs:
118111
asset_path: ./atlas-operator-all-in-one-${{ steps.tag.outputs.version }}.tar.gz
119112
asset_name: atlas-operator-all-in-one-${{ steps.tag.outputs.version }}.tar.gz
120113
asset_content_type: application/tgz
114+
115+
- name: Wait image in RedHhat registry
116+
env:
117+
IMAGE: ${{ env.REDHAT_RELEASE_REGISTRY }}/${{ env.REDHAT_OPERATOR_REPO }}:${{ steps.tag.outputs.version }}
118+
TIMEOUT: 60
119+
run: |
120+
chmod +x ./scripts/github-actions/await_image_push.sh
121+
./scripts/github-actions/await_image_push.sh "$IMAGE" "$TIMEOUT"
122+
123+
- name: Push Atlas Operator Bundle to RedHat Connect
124+
uses: docker/build-push-action@v1
125+
with:
126+
username: unused
127+
password: ${{ secrets.REDHAT_REGISTRY_BUNDLES_PASSWORD }}
128+
repository: ${{ env.REDHAT_BUNDLE_REPO }}
129+
registry: ${{ env.REDHAT_RELEASE_REGISTRY}}
130+
tags: ${{ steps.tag.outputs.version }}
131+
dockerfile: bundle.Dockerfile

bundle.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
FROM scratch
2+
LABEL com.redhat.openshift.versions="v4.5-v4.7"
3+
LABEL com.redhat.delivery.backport=true
4+
LABEL com.redhat.delivery.operator.bundle=true
25

36
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
47
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
@@ -11,9 +14,6 @@ LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
1114
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3
1215
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/
1316
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
14-
LABEL com.redhat.openshift.versions="v4.5,v4.6,v4.7"
15-
LABEL com.redhat.delivery.backport=true
16-
LABEL com.redhat.delivery.operator.bundle=true
1717

1818
COPY bundle/manifests /manifests/
1919
COPY bundle/metadata /metadata/

bundle/manifests/atlas.mongodb.com_atlasclusters.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,12 @@ spec:
128128
name:
129129
description: Name is the name of the Kubernetes Resource
130130
type: string
131+
namespace:
132+
description: Namespace is the namespace of the Kubernetes Resource
133+
type: string
131134
required:
132135
- name
136+
- namespace
133137
type: object
134138
providerBackupEnabled:
135139
description: Applicable only for M10+ clusters. Flag that indicates if the cluster uses Cloud Backups for backups.

bundle/manifests/atlas.mongodb.com_atlasdatabaseusers.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,12 @@ spec:
7575
name:
7676
description: Name is the name of the Kubernetes Resource
7777
type: string
78+
namespace:
79+
description: Namespace is the namespace of the Kubernetes Resource
80+
type: string
7881
required:
7982
- name
83+
- namespace
8084
type: object
8185
roles:
8286
description: Roles is an array of this user's roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database.

bundle/manifests/mongodb-atlas-kubernetes.clusterserviceversion.yaml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ metadata:
6767
description: The MongoDB Atlas Kubernetes Operator enables easy management of Clusters in MongoDB Atlas
6868
operators.operatorframework.io/builder: operator-sdk-v1.4.2
6969
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
70-
name: mongodb-atlas-kubernetes.v0.5.0
70+
name: mongodb-atlas-kubernetes.v0.6.0
7171
namespace: placeholder
7272
spec:
7373
apiservicedefinitions: {}
@@ -196,7 +196,7 @@ spec:
196196
valueFrom:
197197
secretKeyRef:
198198
name: test-atlas-operator-project-test-cluster-theuser
199-
key: connectionString.standardSrv
199+
key: connectionStringStandardSrv
200200
201201
```
202202
displayName: MongoDB Atlas Operator
@@ -207,6 +207,13 @@ spec:
207207
spec:
208208
clusterPermissions:
209209
- rules:
210+
- apiGroups:
211+
- ""
212+
resources:
213+
- events
214+
verbs:
215+
- create
216+
- patch
210217
- apiGroups:
211218
- ""
212219
resources:
@@ -310,22 +317,11 @@ spec:
310317
app.kubernetes.io/name: mongodb-atlas-kubernetes-operator
311318
spec:
312319
containers:
313-
- args:
314-
- --secure-listen-address=0.0.0.0:8443
315-
- --upstream=http://127.0.0.1:8080/
316-
- --logtostderr=true
317-
- --v=10
318-
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
319-
name: kube-rbac-proxy
320-
ports:
321-
- containerPort: 8443
322-
name: https
323-
resources: {}
324320
- args:
325321
- --atlas-domain=https://cloud.mongodb.com
322+
- --leader-elect
326323
- --health-probe-bind-address=:8081
327324
- --metrics-bind-address=127.0.0.1:8080
328-
- --leader-elect
329325
command:
330326
- /manager
331327
env:
@@ -337,7 +333,7 @@ spec:
337333
valueFrom:
338334
fieldRef:
339335
fieldPath: metadata.namespace
340-
image: mongodb/mongodb-atlas-kubernetes-operator:0.5.0
336+
image: registry.connect.redhat.com/mongodb/mongodb-atlas-kubernetes-operator:0.6.0
341337
imagePullPolicy: Always
342338
livenessProbe:
343339
httpGet:
@@ -361,9 +357,6 @@ spec:
361357
memory: 50Mi
362358
securityContext:
363359
allowPrivilegeEscalation: false
364-
securityContext:
365-
runAsNonRoot: true
366-
runAsUser: 2000
367360
serviceAccountName: mongodb-atlas-operator
368361
terminationGracePeriodSeconds: 10
369362
permissions:
@@ -415,4 +408,5 @@ spec:
415408
maturity: beta
416409
provider:
417410
name: MongoDB, Inc
418-
version: 0.5.0
411+
version: 0.6.0
412+
replaces: mongodb-atlas-kubernetes.v0.5.0

deploy/all-in-one.yaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,12 @@ spec:
172172
name:
173173
description: Name is the name of the Kubernetes Resource
174174
type: string
175+
namespace:
176+
description: Namespace is the namespace of the Kubernetes Resource
177+
type: string
175178
required:
176179
- name
180+
- namespace
177181
type: object
178182
providerBackupEnabled:
179183
description: Applicable only for M10+ clusters. Flag that indicates
@@ -569,8 +573,12 @@ spec:
569573
name:
570574
description: Name is the name of the Kubernetes Resource
571575
type: string
576+
namespace:
577+
description: Namespace is the namespace of the Kubernetes Resource
578+
type: string
572579
required:
573580
- name
581+
- namespace
574582
type: object
575583
roles:
576584
description: Roles is an array of this user's roles and the databases
@@ -923,6 +931,13 @@ metadata:
923931
app.kubernetes.io/name: mongodb-atlas-kubernetes-operator
924932
name: mongodb-atlas-manager-role
925933
rules:
934+
- apiGroups:
935+
- ""
936+
resources:
937+
- events
938+
verbs:
939+
- create
940+
- patch
926941
- apiGroups:
927942
- ""
928943
resources:
@@ -1115,9 +1130,9 @@ spec:
11151130
containers:
11161131
- args:
11171132
- --atlas-domain=https://cloud.mongodb.com
1133+
- --leader-elect
11181134
- --health-probe-bind-address=:8081
11191135
- --metrics-bind-address=127.0.0.1:8080
1120-
- --leader-elect
11211136
command:
11221137
- /manager
11231138
env:
@@ -1129,7 +1144,7 @@ spec:
11291144
valueFrom:
11301145
fieldRef:
11311146
fieldPath: metadata.namespace
1132-
image: mongodb/mongodb-atlas-kubernetes-operator:0.5.0
1147+
image: mongodb/mongodb-atlas-kubernetes-operator:0.6.0
11331148
imagePullPolicy: Always
11341149
livenessProbe:
11351150
httpGet:
@@ -1153,8 +1168,5 @@ spec:
11531168
memory: 50Mi
11541169
securityContext:
11551170
allowPrivilegeEscalation: false
1156-
securityContext:
1157-
runAsNonRoot: true
1158-
runAsUser: 2000
11591171
serviceAccountName: mongodb-atlas-operator
11601172
terminationGracePeriodSeconds: 10

deploy/clusterwide/clusterwide-config.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ metadata:
5959
app.kubernetes.io/name: mongodb-atlas-kubernetes-operator
6060
name: mongodb-atlas-manager-role
6161
rules:
62+
- apiGroups:
63+
- ""
64+
resources:
65+
- events
66+
verbs:
67+
- create
68+
- patch
6269
- apiGroups:
6370
- ""
6471
resources:
@@ -251,9 +258,9 @@ spec:
251258
containers:
252259
- args:
253260
- --atlas-domain=https://cloud.mongodb.com
261+
- --leader-elect
254262
- --health-probe-bind-address=:8081
255263
- --metrics-bind-address=127.0.0.1:8080
256-
- --leader-elect
257264
command:
258265
- /manager
259266
env:
@@ -265,7 +272,7 @@ spec:
265272
valueFrom:
266273
fieldRef:
267274
fieldPath: metadata.namespace
268-
image: mongodb/mongodb-atlas-kubernetes-operator:0.5.0
275+
image: mongodb/mongodb-atlas-kubernetes-operator:0.6.0
269276
imagePullPolicy: Always
270277
livenessProbe:
271278
httpGet:
@@ -289,8 +296,5 @@ spec:
289296
memory: 50Mi
290297
securityContext:
291298
allowPrivilegeEscalation: false
292-
securityContext:
293-
runAsNonRoot: true
294-
runAsUser: 2000
295299
serviceAccountName: mongodb-atlas-operator
296300
terminationGracePeriodSeconds: 10

deploy/clusterwide/crds.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,12 @@ spec:
159159
name:
160160
description: Name is the name of the Kubernetes Resource
161161
type: string
162+
namespace:
163+
description: Namespace is the namespace of the Kubernetes Resource
164+
type: string
162165
required:
163166
- name
167+
- namespace
164168
type: object
165169
providerBackupEnabled:
166170
description: Applicable only for M10+ clusters. Flag that indicates
@@ -552,8 +556,12 @@ spec:
552556
name:
553557
description: Name is the name of the Kubernetes Resource
554558
type: string
559+
namespace:
560+
description: Namespace is the namespace of the Kubernetes Resource
561+
type: string
555562
required:
556563
- name
564+
- namespace
557565
type: object
558566
roles:
559567
description: Roles is an array of this user's roles and the databases

deploy/crds/atlas.mongodb.com_atlasclusters.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,12 @@ spec:
161161
name:
162162
description: Name is the name of the Kubernetes Resource
163163
type: string
164+
namespace:
165+
description: Namespace is the namespace of the Kubernetes Resource
166+
type: string
164167
required:
165168
- name
169+
- namespace
166170
type: object
167171
providerBackupEnabled:
168172
description: Applicable only for M10+ clusters. Flag that indicates

deploy/crds/atlas.mongodb.com_atlasdatabaseusers.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,12 @@ spec:
8686
name:
8787
description: Name is the name of the Kubernetes Resource
8888
type: string
89+
namespace:
90+
description: Namespace is the namespace of the Kubernetes Resource
91+
type: string
8992
required:
9093
- name
94+
- namespace
9195
type: object
9296
roles:
9397
description: Roles is an array of this user's roles and the databases

0 commit comments

Comments
 (0)