Skip to content

Commit 47377a4

Browse files
author
Tom Jorissen
authored
Merge branch 'main' into tlsauth
2 parents 065b012 + 32ab814 commit 47377a4

41 files changed

Lines changed: 466 additions & 229 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @streamnative/cloud
1+
* @streamnative/cloud @streamnative/cloud-data-plane
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Signed-off-by: streamnativebot [streamnativebot@streamnative.io](mailto:streamnativebot@streamnative.io)
2+
3+
Thanks submitting your Operator. Please check below list before you create your Pull Request.
4+
5+
### New Submissions
6+
* [ ] Are you familiar with our [contribution guidelines](https://github.com/operator-framework/community-operators/blob/master/docs/contributing-via-pr.md)?
7+
* [ ] Have you [packaged and deployed](https://github.com/operator-framework/community-operators/blob/master/docs/testing-operators.md) your Operator for Operator Framework?
8+
* [ ] Have you tested your Operator with all Custom Resource Definitions?
9+
* [ ] Have you tested your Operator in all supported [installation modes](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/design/building-your-csv.md#operator-metadata)?
10+
* [ ] Have you considered whether you want use [semantic versioning order](https://github.com/operator-framework/community-operators/blob/master/docs/operator-ci-yaml.md#semver-mode)?
11+
* [ ] Is your submission [signed](https://github.com/operator-framework/community-operators/blob/master/docs/contributing-prerequisites.md#sign-your-work)?
12+
* [ ] Is operator [icon](https://github.com/operator-framework/community-operators/blob/master/docs/packaging-operator.md#operator-icon) set?
13+
14+
### Updates to existing Operators
15+
* [x] Did you create a `ci.yaml` file according to the [update instructions](https://github.com/operator-framework/community-operators/blob/master/docs/operator-ci-yaml.md)?
16+
* [x] Is your new CSV pointing to the previous version with the `replaces` property if you chose `replaces-mode` via the `updateGraph` property in `ci.yaml`?
17+
* [x] Is your new CSV referenced in the [appropriate channel](https://github.com/operator-framework/community-operators/blob/master/docs/packaging-operator.md#channels) defined in the `package.yaml` or `annotations.yaml` ?
18+
* [x] Have you tested an update to your Operator when deployed via OLM?
19+
* [x] Is your submission [signed](https://github.com/operator-framework/community-operators/blob/master/docs/contributing-prerequisites.md#sign-your-work)?
20+
21+
### Your submission should not
22+
* [x] Modify more than one operator
23+
* [x] Modify an Operator you don't own
24+
* [x] Rename an operator - please remove and add with a different name instead
25+
* [x] Modify any files outside the above mentioned folders
26+
* [x] Contain more than one commit. **Please squash your commits.**
27+
28+
### Operator Description must contain (in order)
29+
1. [x] Description about the managed Application and where to find more information
30+
2. [x] Features and capabilities of your Operator and how to use it
31+
3. [x] Any manual steps about potential pre-requisites for using your Operator
32+
33+
### Operator Metadata should contain
34+
* [x] Human readable name and 1-liner description about your Operator
35+
* [x] Valid [category name](https://github.com/operator-framework/community-operators/blob/master/docs/packaging-operator.md#categories)1
36+
* [x] One of the pre-defined [capability levels](https://github.com/operator-framework/operator-courier/blob/4d1a25d2c8d52f7de6297ec18d8afd6521236aa2/operatorcourier/validate.py#L556)2
37+
* [x] Links to the maintainer, source code and documentation
38+
* [x] Example templates for all Custom Resource Definitions intended to be used
39+
* [x] A quadratic logo
40+
41+
Remember that you can preview your CSV [here](https://operatorhub.io/preview).
42+
43+
--
44+
45+
1 If you feel your Operator does not fit any of the pre-defined categories, file an issue against this repo and explain your need
46+
47+
2 For more information see [here](https://sdk.operatorframework.io/docs/overview/#operator-capability-level)

.github/workflows/e2e_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ jobs:
4040
docker rmi $(docker images -q) -f
4141
df -h
4242
43-
- name: Set up Go 1.19
43+
- name: Set up Go 1.20
4444
uses: actions/setup-go@v3
4545
with:
46-
go-version: 1.19
46+
go-version: '1.20'
4747
id: go
4848

4949
- name: Set up Git token
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# Copyright 2022 StreamNative
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Release Certificated OLM
16+
on:
17+
workflow_dispatch:
18+
inputs:
19+
channel-tag:
20+
description: 'Operator tag(without prefix v)'
21+
required: true
22+
channels:
23+
description: 'OLM channels'
24+
required: true
25+
default: alpha,beta,stable
26+
default_channel:
27+
description: 'OLM Default channel'
28+
required: true
29+
default: alpha
30+
31+
jobs:
32+
operatorhub-prod:
33+
name: Create PR to the redhat
34+
runs-on: ubuntu-latest
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.SNBOT_GITHUB_TOKEN }}
37+
GOPRIVATE: github.com/streamnative
38+
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
39+
steps:
40+
- name: Sync up the prod upstream
41+
run: |
42+
gh repo sync streamnative/community-operators-prod
43+
44+
- name: Sync up the certified upstream
45+
run: |
46+
gh repo sync streamnative/certified-operators
47+
48+
- name: Setup Git token
49+
run: |
50+
git config --global url."https://${ACCESS_TOKEN}:@github.com/".insteadOf "https://github.com/"
51+
52+
- name: Check out code into the Go module directory
53+
uses: actions/checkout@v3
54+
55+
- name: Checkout streamnative community-operators-prod
56+
uses: actions/checkout@v3
57+
with:
58+
repository: streamnative/community-operators-prod
59+
path: community-operators-prod
60+
token: ${{ secrets.SNBOT_GITHUB_TOKEN }}
61+
62+
- name: Checkout streamnative certified-operators
63+
uses: actions/checkout@v3
64+
with:
65+
repository: streamnative/certified-operators
66+
path: certified-operators
67+
token: ${{ secrets.SNBOT_GITHUB_TOKEN }}
68+
69+
- name: Setup operator-sdk
70+
run: |
71+
wget https://github.com/operator-framework/operator-sdk/releases/download/v1.31.0/operator-sdk_linux_amd64 -O operator-sdk
72+
chmod +x operator-sdk
73+
mv operator-sdk /usr/local/bin/
74+
operator-sdk version
75+
76+
- name: Genarate bundle
77+
env:
78+
VERSION: ${{ inputs.channel-tag }}
79+
CHANNELS: ${{ inputs.channels }}
80+
DEFAULT_CHANNEL: ${{ inputs.default_channel }}
81+
IMAGE_TAG_BASE_RELEASE: olm.streamnative.io/streamnativeio/pulsar-resources-operator
82+
run: |
83+
export IMG=$IMAGE_TAG_BASE_RELEASE:v$VERSION
84+
make bundle-redhat
85+
86+
- name: Copy bundle to community-operators-prod and create pr
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.SNBOT_GITHUB_TOKEN }}
89+
VERSION: ${{ inputs.channel-tag }}
90+
OPERATOR_NAME: pulsar-resources-operator
91+
run: |
92+
pushd community-operators-prod
93+
git config --global user.email "streamnativebot@streamnative.io"
94+
git config --global user.name "streamnativebot"
95+
git push -d origin $OPERATOR_NAME-$VERSION || echo 'Skip branch deletion'
96+
git checkout -b $OPERATOR_NAME-$VERSION
97+
# copy bundles
98+
99+
export TARGET_DIR=operators/$OPERATOR_NAME/$VERSION
100+
mkdir -p $TARGET_DIR
101+
cp -rf ../bundle.Dockerfile $TARGET_DIR
102+
cp -rf ../bundle/* $TARGET_DIR
103+
104+
git add .
105+
git commit -s -m "operator $OPERATOR_NAME ($VERSION)"
106+
git push --set-upstream origin $OPERATOR_NAME-$VERSION
107+
gh pr create --title "operator $OPERATOR_NAME ($VERSION)" -F ../.github/openshift/community-operators-prod -R redhat-openshift-ecosystem/community-operators-prod
108+
popd
109+
110+
- name: Copy bundle to certified-operators and create pr
111+
env:
112+
GITHUB_TOKEN: ${{ secrets.SNBOT_GITHUB_TOKEN }}
113+
VERSION: ${{ inputs.channel-tag }}
114+
OPERATOR_NAME: pulsar-resources-operator
115+
run: |
116+
# install operator-manifest-tools
117+
wget -q https://github.com/operator-framework/operator-manifest-tools/releases/download/v0.2.2/operator-manifest-tools_0.2.2_linux_amd64 -O operator-manifest-tools
118+
chmod +x operator-manifest-tools
119+
mv operator-manifest-tools /usr/local/bin
120+
121+
# install skopeo
122+
sudo apt-get -y install skopeo
123+
124+
pushd certified-operators
125+
git push -d origin $OPERATOR_NAME-$VERSION || echo 'Skip branch deletion'
126+
git checkout -b $OPERATOR_NAME-$VERSION
127+
128+
export TARGET_DIR=operators/$OPERATOR_NAME/$VERSION
129+
mkdir -p $TARGET_DIR
130+
cp -rf ../bundle.Dockerfile $TARGET_DIR
131+
cp -rf ../bundle/* $TARGET_DIR
132+
133+
export MANIFEST_DIR=$TARGET_DIR/manifests
134+
operator-manifest-tools pinning pin $MANIFEST_DIR
135+
operator-manifest-tools pinning replace $MANIFEST_DIR replacements.json
136+
rm references.json replacements.json
137+
138+
git add .
139+
git commit -s -m "operator $OPERATOR_NAME ($VERSION)"
140+
git push --set-upstream origin $OPERATOR_NAME-$VERSION
141+
gh pr create --title "operator $OPERATOR_NAME ($VERSION)" --body "Signed-off-by: streamnativebot streamnativebot@streamnative.io" -R redhat-openshift-ecosystem/certified-operators
142+
popd
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Copyright 2022 StreamNative
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Release Community OLM
16+
on:
17+
workflow_dispatch:
18+
inputs:
19+
channel-tag:
20+
description: 'Operator tag(without prefix v)'
21+
required: true
22+
channels:
23+
description: 'OLM channels'
24+
required: true
25+
default: alpha,beta,stable
26+
default_channel:
27+
description: 'OLM Default channel'
28+
required: true
29+
default: alpha
30+
31+
jobs:
32+
operatorhub:
33+
name: Create PR to the operatorhub
34+
runs-on: ubuntu-latest
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.SNBOT_GITHUB_TOKEN }}
37+
GOPRIVATE: github.com/streamnative
38+
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
39+
steps:
40+
- name: Sync up the upstream
41+
run: |
42+
gh repo sync streamnative/community-operators
43+
44+
- name: Setup Git token
45+
run: |
46+
git config --global url."https://${ACCESS_TOKEN}:@github.com/".insteadOf "https://github.com/"
47+
48+
- name: Check out code into the Go module directory
49+
uses: actions/checkout@v3
50+
51+
- name: Checkout streamnative community-operators
52+
uses: actions/checkout@v3
53+
with:
54+
repository: streamnative/community-operators
55+
path: community-operators
56+
token: ${{ secrets.SNBOT_GITHUB_TOKEN }}
57+
58+
- name: Setup operator-sdk
59+
run: |
60+
wget https://github.com/operator-framework/operator-sdk/releases/download/v1.31.0/operator-sdk_linux_amd64 -O operator-sdk
61+
chmod +x operator-sdk
62+
mv operator-sdk /usr/local/bin/
63+
operator-sdk version
64+
65+
- name: Genarate bundle
66+
env:
67+
VERSION: ${{ inputs.channel-tag }}
68+
CHANNELS: ${{ inputs.channels }}
69+
DEFAULT_CHANNEL: ${{ inputs.default_channel }}
70+
IMAGE_TAG_BASE_RELEASE: olm.streamnative.io/streamnativeio/pulsar-resources-operator
71+
run: |
72+
export IMG=$IMAGE_TAG_BASE_RELEASE:v$VERSION
73+
make bundle-redhat
74+
75+
- name: Copy bundle to community-operators and create pr
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.SNBOT_GITHUB_TOKEN }}
78+
VERSION: ${{ inputs.channel-tag }}
79+
OPERATOR_NAME: pulsar-resources-operator
80+
run: |
81+
pushd community-operators
82+
git config --global user.email "streamnativebot@streamnative.io"
83+
git config --global user.name "streamnativebot"
84+
git push -d origin $OPERATOR_NAME-$VERSION || echo 'Skip branch deletion'
85+
git checkout -b $OPERATOR_NAME-$VERSION
86+
87+
export TARGET_DIR=operators/$OPERATOR_NAME/$VERSION
88+
mkdir -p $TARGET_DIR
89+
cp -rf ../bundle.Dockerfile $TARGET_DIR
90+
cp -rf ../bundle/* $TARGET_DIR
91+
92+
git add .
93+
git commit -s -m "operator $OPERATOR_NAME ($VERSION)"
94+
git push --set-upstream origin $OPERATOR_NAME-$VERSION
95+
gh pr create --title "operator $OPERATOR_NAME ($VERSION)" -F ../.github/operatorhub/community-operators -R k8s-operatorhub/community-operators
96+
popd

.github/workflows/release-operator.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ jobs:
3535
default_channel: ${{ steps.redhat.outputs.default_channel }}
3636

3737
steps:
38-
- name: Set up Go 1.19
38+
- name: Set up Go 1.20
3939
uses: actions/setup-go@v3
4040
with:
41-
go-version: 1.19
41+
go-version: '1.20'
4242
id: go
4343

4444
- name: Set up Git token

.github/workflows/style.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
3232
GOPRIVATE: github.com/streamnative
3333
steps:
34-
- name: Set up Go 1.19
34+
- name: Set up Go 1.20
3535
uses: actions/setup-go@v3
3636
with:
37-
go-version: 1.19
37+
go-version: '1.20'
3838
id: go
3939

4040
- name: Set up git token

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,8 @@ node_modules/
4848
# chart-releaser
4949
.chart-index/
5050
.chart-packages/
51+
52+
# Generated files while build the operator
53+
config/crd/bases/
54+
config/rbac/role.yaml
55+
config/webhook/manifests.yaml

.golangci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ linters:
1818
- asciicheck
1919
- bodyclose
2020
- deadcode
21-
- depguard
21+
# - depguard
2222
- dogsled
2323
- errcheck
2424
- exportloopref
25-
- gci
25+
# - gci
2626
- goconst
2727
- gocritic
2828
- gocyclo

.licenserc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ header:
2626
- 'NOTICE'
2727
- '.github/CODEOWNERS'
2828
- '.github/operatorhub/'
29+
- '.github/openshift/'
2930
- 'PROJECT'
3031
- '**/go.mod'
3132
- '**/go.sum'

0 commit comments

Comments
 (0)