Skip to content

Commit

Permalink
Release 0.6.0 (#293)
Browse files Browse the repository at this point in the history
Co-authored-by: Svetlana <5437289+leo-ri@users.noreply.github.com>
Co-authored-by: Anton <anton_fabritsius@epam.com>
  • Loading branch information
3 people committed Jul 29, 2021
1 parent d663cf8 commit b57b325
Show file tree
Hide file tree
Showing 12 changed files with 115 additions and 58 deletions.
53 changes: 32 additions & 21 deletions .github/workflows/release-post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ name: Create Release.
on:
pull_request:
types: [closed]
workflow_dispatch:
inputs:
version:
description: "Release version (Be sure `Release-branch` is successful):"
required: true

jobs:
create-release:
name: Create Release
if: (github.event.pull_request.merged == true) && (startsWith(github.event.pull_request.head.ref, 'release'))
if: (github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release')) || github.event.inputs.version != ''
runs-on: ubuntu-latest
env:
DOCKER_RELEASE_REPO: mongodb/mongodb-atlas-kubernetes-operator
Expand All @@ -26,9 +31,14 @@ jobs:
id: tag
env:
BRANCH: ${{ github.event.pull_request.head.ref }}
VERSION: ${{ github.event.inputs.version }}
run: |
echo "BRANCH:$BRANCH"
version=$(echo $BRANCH | awk -F '/' '{print $2}')
version=$VERSION
if [[ "$version" == "" ]]; then
version=$(echo $BRANCH | awk -F '/' '{print $2}')
fi
echo "VERSION:$version"
tag="v${version}"
echo "::set-output name=version::$version"
echo "::set-output name=tag::$tag"
Expand Down Expand Up @@ -64,30 +74,13 @@ jobs:
labels: version=${{ steps.tag.outputs.version }}
build_args: VERSION=${{ steps.tag.outputs.tag }}

- name: Wait image in RedHhat registry
env:
IMAGE: ${{ env.REDHAT_RELEASE_REGISTRY }}/${{ env.REDHAT_OPERATOR_REPO }}:${{ steps.tag.outputs.version }}
TIMEOUT: 60
run: |
./scripts/github-actions/await_image_push.sh "$IMAGE" "$TIMEOUT"
- name: Push Atlas Operator Bundle to RedHat Connect
uses: docker/build-push-action@v1
with:
username: unused
password: ${{ secrets.REDHAT_REGISTRY_BUNDLES_PASSWORD }}
repository: ${{ env.REDHAT_BUNDLE_REPO }}
registry: ${{ env.REDHAT_RELEASE_REGISTRY}}
tags: ${{ steps.tag.outputs.version }}
dockerfile: bundle.Dockerfile

- name: Push Atlas Operator to Quay Registry
uses: docker/build-push-action@v1
with:
username: ${{ env.QUAY_ROBOT_NAME }}
password: ${{ secrets.QUAY_PASSWORD }}
repository: ${{ env.QUAY_OPERATOR_REPO }}
registry: ${{ env.DOCKER_REGISTRY }}
registry: ${{ env.QUAY_RELEASE_REGISTRY }}
tags: ${{ steps.tag.outputs.version }}
build_args: VERSION=${{ steps.tag.outputs.tag }}

Expand Down Expand Up @@ -118,3 +111,21 @@ jobs:
asset_path: ./atlas-operator-all-in-one-${{ steps.tag.outputs.version }}.tar.gz
asset_name: atlas-operator-all-in-one-${{ steps.tag.outputs.version }}.tar.gz
asset_content_type: application/tgz

- name: Wait image in RedHhat registry
env:
IMAGE: ${{ env.REDHAT_RELEASE_REGISTRY }}/${{ env.REDHAT_OPERATOR_REPO }}:${{ steps.tag.outputs.version }}
TIMEOUT: 60
run: |
chmod +x ./scripts/github-actions/await_image_push.sh
./scripts/github-actions/await_image_push.sh "$IMAGE" "$TIMEOUT"
- name: Push Atlas Operator Bundle to RedHat Connect
uses: docker/build-push-action@v1
with:
username: unused
password: ${{ secrets.REDHAT_REGISTRY_BUNDLES_PASSWORD }}
repository: ${{ env.REDHAT_BUNDLE_REPO }}
registry: ${{ env.REDHAT_RELEASE_REGISTRY}}
tags: ${{ steps.tag.outputs.version }}
dockerfile: bundle.Dockerfile
6 changes: 3 additions & 3 deletions bundle.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM scratch
LABEL com.redhat.openshift.versions="v4.5-v4.7"
LABEL com.redhat.delivery.backport=true
LABEL com.redhat.delivery.operator.bundle=true

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

COPY bundle/manifests /manifests/
COPY bundle/metadata /metadata/
Expand Down
4 changes: 4 additions & 0 deletions bundle/manifests/atlas.mongodb.com_atlasclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,12 @@ spec:
name:
description: Name is the name of the Kubernetes Resource
type: string
namespace:
description: Namespace is the namespace of the Kubernetes Resource
type: string
required:
- name
- namespace
type: object
providerBackupEnabled:
description: Applicable only for M10+ clusters. Flag that indicates if the cluster uses Cloud Backups for backups.
Expand Down
4 changes: 4 additions & 0 deletions bundle/manifests/atlas.mongodb.com_atlasdatabaseusers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ spec:
name:
description: Name is the name of the Kubernetes Resource
type: string
namespace:
description: Namespace is the namespace of the Kubernetes Resource
type: string
required:
- name
- namespace
type: object
roles:
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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ metadata:
description: The MongoDB Atlas Kubernetes Operator enables easy management of Clusters in MongoDB Atlas
operators.operatorframework.io/builder: operator-sdk-v1.4.2
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
name: mongodb-atlas-kubernetes.v0.5.0
name: mongodb-atlas-kubernetes.v0.6.0
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -196,7 +196,7 @@ spec:
valueFrom:
secretKeyRef:
name: test-atlas-operator-project-test-cluster-theuser
key: connectionString.standardSrv
key: connectionStringStandardSrv
```
displayName: MongoDB Atlas Operator
Expand All @@ -207,6 +207,13 @@ spec:
spec:
clusterPermissions:
- rules:
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -310,22 +317,11 @@ spec:
app.kubernetes.io/name: mongodb-atlas-kubernetes-operator
spec:
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=10
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
resources: {}
- args:
- --atlas-domain=https://cloud.mongodb.com
- --leader-elect
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
command:
- /manager
env:
Expand All @@ -337,7 +333,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: mongodb/mongodb-atlas-kubernetes-operator:0.5.0
image: registry.connect.redhat.com/mongodb/mongodb-atlas-kubernetes-operator:0.6.0
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand All @@ -361,9 +357,6 @@ spec:
memory: 50Mi
securityContext:
allowPrivilegeEscalation: false
securityContext:
runAsNonRoot: true
runAsUser: 2000
serviceAccountName: mongodb-atlas-operator
terminationGracePeriodSeconds: 10
permissions:
Expand Down Expand Up @@ -415,4 +408,5 @@ spec:
maturity: beta
provider:
name: MongoDB, Inc
version: 0.5.0
version: 0.6.0
replaces: mongodb-atlas-kubernetes.v0.5.0
22 changes: 17 additions & 5 deletions deploy/all-in-one.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,12 @@ spec:
name:
description: Name is the name of the Kubernetes Resource
type: string
namespace:
description: Namespace is the namespace of the Kubernetes Resource
type: string
required:
- name
- namespace
type: object
providerBackupEnabled:
description: Applicable only for M10+ clusters. Flag that indicates
Expand Down Expand Up @@ -569,8 +573,12 @@ spec:
name:
description: Name is the name of the Kubernetes Resource
type: string
namespace:
description: Namespace is the namespace of the Kubernetes Resource
type: string
required:
- name
- namespace
type: object
roles:
description: Roles is an array of this user's roles and the databases
Expand Down Expand Up @@ -923,6 +931,13 @@ metadata:
app.kubernetes.io/name: mongodb-atlas-kubernetes-operator
name: mongodb-atlas-manager-role
rules:
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -1115,9 +1130,9 @@ spec:
containers:
- args:
- --atlas-domain=https://cloud.mongodb.com
- --leader-elect
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
command:
- /manager
env:
Expand All @@ -1129,7 +1144,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: mongodb/mongodb-atlas-kubernetes-operator:0.5.0
image: mongodb/mongodb-atlas-kubernetes-operator:0.6.0
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand All @@ -1153,8 +1168,5 @@ spec:
memory: 50Mi
securityContext:
allowPrivilegeEscalation: false
securityContext:
runAsNonRoot: true
runAsUser: 2000
serviceAccountName: mongodb-atlas-operator
terminationGracePeriodSeconds: 10
14 changes: 9 additions & 5 deletions deploy/clusterwide/clusterwide-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ metadata:
app.kubernetes.io/name: mongodb-atlas-kubernetes-operator
name: mongodb-atlas-manager-role
rules:
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -251,9 +258,9 @@ spec:
containers:
- args:
- --atlas-domain=https://cloud.mongodb.com
- --leader-elect
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
command:
- /manager
env:
Expand All @@ -265,7 +272,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: mongodb/mongodb-atlas-kubernetes-operator:0.5.0
image: mongodb/mongodb-atlas-kubernetes-operator:0.6.0
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand All @@ -289,8 +296,5 @@ spec:
memory: 50Mi
securityContext:
allowPrivilegeEscalation: false
securityContext:
runAsNonRoot: true
runAsUser: 2000
serviceAccountName: mongodb-atlas-operator
terminationGracePeriodSeconds: 10
8 changes: 8 additions & 0 deletions deploy/clusterwide/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,12 @@ spec:
name:
description: Name is the name of the Kubernetes Resource
type: string
namespace:
description: Namespace is the namespace of the Kubernetes Resource
type: string
required:
- name
- namespace
type: object
providerBackupEnabled:
description: Applicable only for M10+ clusters. Flag that indicates
Expand Down Expand Up @@ -552,8 +556,12 @@ spec:
name:
description: Name is the name of the Kubernetes Resource
type: string
namespace:
description: Namespace is the namespace of the Kubernetes Resource
type: string
required:
- name
- namespace
type: object
roles:
description: Roles is an array of this user's roles and the databases
Expand Down
4 changes: 4 additions & 0 deletions deploy/crds/atlas.mongodb.com_atlasclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,12 @@ spec:
name:
description: Name is the name of the Kubernetes Resource
type: string
namespace:
description: Namespace is the namespace of the Kubernetes Resource
type: string
required:
- name
- namespace
type: object
providerBackupEnabled:
description: Applicable only for M10+ clusters. Flag that indicates
Expand Down
4 changes: 4 additions & 0 deletions deploy/crds/atlas.mongodb.com_atlasdatabaseusers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,12 @@ spec:
name:
description: Name is the name of the Kubernetes Resource
type: string
namespace:
description: Namespace is the namespace of the Kubernetes Resource
type: string
required:
- name
- namespace
type: object
roles:
description: Roles is an array of this user's roles and the databases
Expand Down
Loading

0 comments on commit b57b325

Please sign in to comment.