Skip to content

Commit 591a1b5

Browse files
authored
Merge branch 'main' into CLOUD-901-more
2 parents 2fa22d4 + c912e05 commit 591a1b5

22 files changed

+141
-24
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ release: manifests
127127
-e "s|perconalab/fluentbit:main-logcollector|$(IMAGE_LOGCOLLECTOR)|g" \
128128
pkg/controller/perconaservermongodb/testdata/reconcile-statefulset/*.yaml
129129
$(SED) -i "s|cr.Spec.InitImage = \".*\"|cr.Spec.InitImage = \"${IMAGE_OPERATOR}\"|g" pkg/controller/perconaservermongodb/suite_test.go
130-
131130

132131
# Prepare main branch after release
133132
MAJOR_VER := $(shell grep -oE "crVersion: .*" deploy/cr.yaml|grep -oE "[0-9]+\.[0-9]+\.[0-9]+"|cut -d'.' -f1)

e2e-tests/functions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ SKIP_BACKUPS_TO_AWS_GCP_AZURE=${SKIP_BACKUPS_TO_AWS_GCP_AZURE:-1}
1515
PMM_SERVER_VER=${PMM_SERVER_VER:-"9.9.9"}
1616
IMAGE_PMM_CLIENT=${IMAGE_PMM_CLIENT:-"percona/pmm-client:2.44.1-1"}
1717
IMAGE_PMM_SERVER=${IMAGE_PMM_SERVER:-"perconalab/pmm-server:dev-latest"}
18-
IMAGE_PMM3_CLIENT=${IMAGE_PMM3_CLIENT:-"perconalab/pmm-client:3.4.1"}
19-
IMAGE_PMM3_SERVER=${IMAGE_PMM3_SERVER:-"perconalab/pmm-server:3.4.1"}
18+
IMAGE_PMM3_CLIENT=${IMAGE_PMM3_CLIENT:-"perconalab/pmm-client:3-dev-latest"}
19+
IMAGE_PMM3_SERVER=${IMAGE_PMM3_SERVER:-"perconalab/pmm-server:3-dev-latest"}
2020
CERT_MANAGER_VER="1.19.1"
2121
MINIO_VER="5.4.0"
2222
CHAOS_MESH_VER="2.7.1"

e2e-tests/init-deploy/compare/statefulset_another-name-rs0.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,57 @@ spec:
161161
resources: {}
162162
terminationMessagePath: /dev/termination-log
163163
terminationMessagePolicy: File
164+
- args:
165+
- pbm-agent-entrypoint
166+
command:
167+
- /opt/percona/pbm-entry.sh
168+
env:
169+
- name: PBM_AGENT_MONGODB_USERNAME
170+
valueFrom:
171+
secretKeyRef:
172+
key: MONGODB_BACKUP_USER_ESCAPED
173+
name: internal-another-name-users
174+
optional: false
175+
- name: PBM_AGENT_MONGODB_PASSWORD
176+
valueFrom:
177+
secretKeyRef:
178+
key: MONGODB_BACKUP_PASSWORD_ESCAPED
179+
name: internal-another-name-users
180+
optional: false
181+
- name: PBM_MONGODB_REPLSET
182+
value: rs0
183+
- name: PBM_MONGODB_PORT
184+
value: "27017"
185+
- name: PBM_AGENT_SIDECAR
186+
value: "true"
187+
- name: PBM_AGENT_SIDECAR_SLEEP
188+
value: "5"
189+
- name: POD_NAME
190+
valueFrom:
191+
fieldRef:
192+
apiVersion: v1
193+
fieldPath: metadata.name
194+
- name: PBM_MONGODB_URI
195+
value: mongodb://$(PBM_AGENT_MONGODB_USERNAME):$(PBM_AGENT_MONGODB_PASSWORD)@localhost:$(PBM_MONGODB_PORT)
196+
- name: PBM_AGENT_TLS_ENABLED
197+
value: "false"
198+
imagePullPolicy: Always
199+
name: backup-agent
200+
resources: {}
201+
securityContext:
202+
runAsNonRoot: true
203+
runAsUser: 1001
204+
terminationMessagePath: /dev/termination-log
205+
terminationMessagePolicy: File
206+
volumeMounts:
207+
- mountPath: /etc/mongodb-ssl
208+
name: ssl
209+
readOnly: true
210+
- mountPath: /opt/percona
211+
name: bin
212+
readOnly: true
213+
- mountPath: /data/db
214+
name: mongod-data
164215
- args:
165216
- fluent-bit
166217
command:

e2e-tests/init-deploy/conf/another-name-rs0.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,18 @@ spec:
1111
tls:
1212
mode: disabled
1313
backup:
14-
enabled: false
15-
image: perconalab/percona-server-mongodb-operator:0.4.0-backup
16-
# storages:
17-
# tasks:
14+
enabled: true
15+
image: perconalab/percona-server-mongodb-operator:1.1.0-backup
16+
storages:
17+
gcp-cs-s3:
18+
type: s3
19+
s3:
20+
credentialsSecret: gcp-cs-secret
21+
region: us-east-1
22+
bucket: operator-testing
23+
prefix: psmdb-demand-backup-physical
24+
endpointUrl: https://storage.googleapis.com
25+
insecureSkipTLSVerify: false
1826
replsets:
1927
- name: rs0
2028
terminationGracePeriodSeconds: 300
@@ -70,4 +78,4 @@ spec:
7078
users: some-users
7179
logcollector:
7280
enabled: true
73-
image: perconalab/fluentbit:main-logcollector
81+
image: perconalab/fluentbit:main-logcollector

e2e-tests/init-deploy/run

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ compare_mongo_cmd "find" "myApp:myPass@$cluster-2.$cluster.$namespace"
7676
desc 'check number of connections'
7777
conn_count=$(run_mongo 'db.serverStatus().connections.current' "clusterAdmin:clusterAdmin123456@$cluster.$namespace" | grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|bye')
7878
if [ ${conn_count} -gt ${max_conn} ]; then
79+
echo "error: connection count (${conn_count}) exceeds maximum allowed (${max_conn})"
7980
exit 1
8081
fi
8182

@@ -94,6 +95,7 @@ compare_mongo_cmd "find" "myApp:myPass@$cluster-2.$cluster.$namespace" "-2nd"
9495

9596
desc 'check if possible to create second cluster'
9697
cluster2="another-name-rs0"
98+
apply_s3_storage_secrets
9799
apply_cluster $test_dir/conf/$cluster2.yml
98100
desc 'check if all 3 Pods started'
99101
wait_for_running $cluster2 3
@@ -112,6 +114,15 @@ compare_mongo_cmd "find" "myApp:myPass@$cluster2-0.$cluster2.$namespace" "-3rd"
112114
compare_mongo_cmd "find" "myApp:myPass@$cluster2-1.$cluster2.$namespace" "-3rd"
113115
compare_mongo_cmd "find" "myApp:myPass@$cluster2-2.$cluster2.$namespace" "-3rd"
114116

117+
desc 'check number of connections with backup'
118+
max_conn=50
119+
sleep 300
120+
conn_count=$(run_mongo 'db.serverStatus().connections.current' "clusterAdmin:clusterAdmin123456@$cluster2.$namespace" | egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|bye')
121+
if [ ${conn_count} -gt ${max_conn} ]; then
122+
echo "error: connection count (${conn_count}) exceeds maximum allowed (${max_conn}) with backup enabled"
123+
exit 1
124+
fi
125+
115126
desc 'check if mongod log files exist in pod'
116127
log_files=$(kubectl exec "${cluster2}-0" -c "mongod" -- ls "/data/db/logs" 2>/dev/null)
117128
if ! echo "$log_files" | grep -q 'mongod.log' || ! echo "$log_files" | grep -q 'mongod.full.log'; then

e2e-tests/release_versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
IMAGE_OPERATOR=percona/percona-server-mongodb-operator:1.21.0
1+
IMAGE_OPERATOR=percona/percona-server-mongodb-operator:1.21.1
22
IMAGE_MONGOD80=percona/percona-server-mongodb:8.0.12-4
33
IMAGE_MONGOD70=percona/percona-server-mongodb:7.0.24-13
44
IMAGE_MONGOD60=percona/percona-server-mongodb:6.0.25-20

0 commit comments

Comments
 (0)