Skip to content

Commit 74f3210

Browse files
authored
Merge branch 'main' into main
2 parents 28aa065 + 5550a4a commit 74f3210

31 files changed

+4230
-1399
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Feature request 🧭
2+
description: Suggest an idea for this project
3+
labels: "feature-request"
4+
body:
5+
- type: textarea
6+
attributes:
7+
label: Proposal
8+
description: "What would you like to have as a feature"
9+
placeholder: "A clear and concise description of what you want to happen."
10+
validations:
11+
required: true
12+
- type: textarea
13+
attributes:
14+
label: Use-Case
15+
description: "How would this help you?"
16+
placeholder: "Tell us more what you'd like to achieve."
17+
validations:
18+
required: false
19+
- type: dropdown
20+
id: interested-in-implementing-the-feature
21+
attributes:
22+
label: Is this a feature you are interested in implementing yourself?
23+
options:
24+
- 'No'
25+
- 'Maybe'
26+
- 'Yes'
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: anything-else
31+
attributes:
32+
label: Anything else?
33+
description: "Let us know if you have anything else to share"
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Report a bug 🐛
2+
description: Create a report to help us improve
3+
labels: "bug"
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
## Self-help
9+
Thank you for considering to open a bug report!
10+
11+
Before you do, however, make sure to check our existing resources to see if it has already been discussed/reported:
12+
- [Reported bugs](https://github.com/percona/percona-server-mongodb-operator/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug)
13+
- [JIRA bugs](https://perconadev.atlassian.net/issues/K8SPSMDB-1028?jql=project%20%3D%20k8spsmdb%20and%20issuetype%20%3D%20Bug%20and%20resolution%20%3D%20Unresolved)
14+
- [Percona Operator for MongoDB forum](https://forums.percona.com/c/mongodb/percona-kubernetes-operator-for-mongodb/29)
15+
- type: textarea
16+
attributes:
17+
label: Report
18+
description: "What bug have you encountered?"
19+
placeholder: "A clear and concise description of what the bug is."
20+
validations:
21+
required: true
22+
- type: textarea
23+
attributes:
24+
label: More about the problem
25+
description: What do you see happening
26+
placeholder: Logs, expected behavior, other
27+
validations:
28+
required: true
29+
- type: textarea
30+
attributes:
31+
label: Steps to reproduce
32+
description: "Tell us how to reproduce the problem"
33+
value: |
34+
1.
35+
2.
36+
3.
37+
validations:
38+
required: true
39+
- type: textarea
40+
attributes:
41+
label: Versions
42+
description: "Tell us which versions do you use"
43+
value: |
44+
1. Kubernetes
45+
2. Operator
46+
3. Database
47+
validations:
48+
required: true
49+
- type: textarea
50+
id: anything-else
51+
attributes:
52+
label: Anything else?
53+
description: "Let us know if you have anything else to share"

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Ask a question about Percona Operator for MongoDB or get support
4+
url: https://forums.percona.com/c/mongodb/percona-kubernetes-operator-for-mongodb/29
5+
about: Ask a question or request support for using Percona Operator for MongoDB
6+
- name: Report vulnerability or security concern
7+
url: https://www.percona.com/security
8+
about: For any security issues or concerns

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ updates:
4242
labels:
4343
- "dependencies"
4444
schedule:
45-
interval: monthly
45+
interval: weekly
4646
day: "monday"
4747
time: "01:00"
4848

.github/workflows/reviewdog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- uses: actions/[email protected]
31-
- uses: actions/setup-go@v4
31+
- uses: actions/setup-go@v5
3232
with:
33-
go-version: '^1.17'
33+
go-version: '^1.21'
3434
- run: go install mvdan.cc/sh/v3/cmd/shfmt@latest
3535
- run: $(go env GOPATH)/bin/shfmt -f . | grep -v 'vendor' | xargs $(go env GOPATH)/bin/shfmt -bn -ci -s -w
3636
- name: suggester / shfmt

.github/workflows/scan.yml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,56 @@
11
name: Scan docker
22
on: [pull_request]
3+
4+
env:
5+
# Use docker.io for Docker Hub if empty
6+
REGISTRY: docker.io
7+
8+
# github.repository as <account>/<repo>
9+
IMAGE_NAME: perconalab/percona-server-mongodb-operator
10+
311
jobs:
412
build:
513
name: Build
614
runs-on: ubuntu-latest
715
steps:
816
- name: Checkout code
917
uses: actions/[email protected]
10-
- name: Build an image from Dockerfile
18+
19+
- name: Set up QEMU
20+
uses: docker/setup-qemu-action@v3
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v3
24+
25+
- name: Build an image from Dockerfile (linux/arm64)
1126
run: |
12-
export IMAGE=perconalab/percona-server-mongodb-operator:${{ github.sha }}
27+
export IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64
1328
export DOCKER_PUSH=0
1429
export DOCKER_SQUASH=0
30+
export DOCKER_DEFAULT_PLATFORM='linux/arm64'
1531
./e2e-tests/build
1632
- name: Run Trivy vulnerability scanner
17-
uses: aquasecurity/trivy-action@0.13.1
33+
uses: aquasecurity/trivy-action@0.16.1
1834
with:
19-
image-ref: 'docker.io/perconalab/percona-server-mongodb-operator:${{ github.sha }}'
35+
image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64'
36+
format: 'table'
37+
exit-code: '1'
38+
ignore-unfixed: true
39+
vuln-type: 'os,library'
40+
severity: 'CRITICAL,HIGH'
41+
42+
- name: Build an image from Dockerfile (linux/amd64)
43+
run: |
44+
export IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-amd64
45+
export DOCKER_PUSH=0
46+
export DOCKER_SQUASH=0
47+
export DOCKER_DEFAULT_PLATFORM='linux/amd64'
48+
./e2e-tests/build
49+
50+
- name: Run Trivy vulnerability scanner image (linux/amd64)
51+
uses: aquasecurity/[email protected]
52+
with:
53+
image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-amd64'
2054
format: 'table'
2155
exit-code: '1'
2256
ignore-unfixed: true

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ jobs:
55
name: Test
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/setup-go@v4
8+
- uses: actions/setup-go@v5
99
with:
10-
go-version: '^1.19'
10+
go-version: '^1.21'
1111
- uses: actions/[email protected]
1212
- name: go test
1313
run: go test -v ./...

Jenkinsfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ EOF
323323
docker login -u '${USER}' -p '${PASS}'
324324
export RELEASE=0
325325
export IMAGE=\$DOCKER_TAG
326+
docker buildx create --use
326327
./e2e-tests/build
327328
docker logout
328329
"
@@ -349,7 +350,7 @@ EOF
349350
-v $WORKSPACE/src/github.com/percona/percona-server-mongodb-operator:/go/src/github.com/percona/percona-server-mongodb-operator \
350351
-w /go/src/github.com/percona/percona-server-mongodb-operator \
351352
-e GOFLAGS='-buildvcs=false' \
352-
golang:1.19 sh -c '
353+
golang:1.21 sh -c '
353354
go install github.com/google/[email protected];
354355
/go/bin/go-licenses csv github.com/percona/percona-server-mongodb-operator/cmd/manager \
355356
| cut -d , -f 3 \
@@ -377,7 +378,7 @@ EOF
377378
-v $WORKSPACE/src/github.com/percona/percona-server-mongodb-operator:/go/src/github.com/percona/percona-server-mongodb-operator \
378379
-w /go/src/github.com/percona/percona-server-mongodb-operator \
379380
-e GOFLAGS='-buildvcs=false' \
380-
golang:1.19 sh -c 'go build -v -o percona-server-mongodb-operator github.com/percona/percona-server-mongodb-operator/cmd/manager'
381+
golang:1.21 sh -c 'go build -v -o percona-server-mongodb-operator github.com/percona/percona-server-mongodb-operator/cmd/manager'
381382
"
382383
'''
383384

build/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.20 AS go_builder
1+
FROM golang:1.21 AS go_builder
22
WORKDIR /go/src/github.com/percona/percona-server-mongodb-operator
33

44
COPY . .
@@ -7,17 +7,16 @@ ARG GIT_COMMIT
77
ARG GIT_BRANCH
88
ARG GO_LDFLAGS
99
ARG GOOS=linux
10-
ARG GOARCH=amd64
1110
ARG CGO_ENABLED=0
1211

1312
RUN go mod download \
1413
&& mkdir -p build/_output/bin \
15-
&& GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \
14+
&& GOOS=$GOOS CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \
1615
go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH" \
1716
-o build/_output/bin/percona-server-mongodb-operator \
1817
cmd/manager/main.go \
1918
&& cp -r build/_output/bin/percona-server-mongodb-operator /usr/local/bin/percona-server-mongodb-operator \
20-
&& GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \
19+
&& GOOS=$GOOS CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \
2120
go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH" \
2221
-o build/_output/bin/mongodb-healthcheck \
2322
cmd/mongodb-healthcheck/main.go \

build/pbm-entry.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ PBM_MONGODB_URI="mongodb://${PBM_AGENT_MONGODB_USERNAME}:${PBM_AGENT_MONGODB_PAS
44

55
MONGO_SSL_DIR=/etc/mongodb-ssl
66
if [[ -f "${MONGO_SSL_DIR}/tls.crt" ]] && [[ -f "${MONGO_SSL_DIR}/tls.key" ]]; then
7-
cat "${MONGO_SSL_DIR}/tls.key" "${MONGO_SSL_DIR}/tls.crt" >/tmp/tls.pem
87
PBM_MONGODB_URI="${PBM_MONGODB_URI}&tls=true&tlsCertificateKeyFile=%2Ftmp%2Ftls.pem&tlsCAFile=${MONGO_SSL_DIR}%2Fca.crt&tlsInsecure=true"
8+
cat "${MONGO_SSL_DIR}/tls.key" "${MONGO_SSL_DIR}/tls.crt" > /tmp/tls.pem
99
fi
1010

1111
export PBM_MONGODB_URI

0 commit comments

Comments
 (0)