Skip to content

Commit 3f26d14

Browse files
committed
Add mysqld_exporter flags to the upgrade test
Signed-off-by: Sergey Stankevich <stankevich@users.noreply.github.com>
1 parent 04ceaad commit 3f26d14

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

test/endtoend/operator/cluster_upgrade.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ spec:
8585
cpu: 100m
8686
memory: 512Mi
8787
configOverrides: "innodb_fast_shutdown=0"
88+
# Configure extra flags for mysqld_exporter and check them in the upgrade test
89+
mysqldExporter:
90+
extraFlags:
91+
collect.info_schema.tables.databases: "*" # Override operator default
92+
collect.info_schema.innodb_cmpmem: "true" # Duplicate flag, overriden below
93+
collect.info_schema.innodb_cmpmem: "false"
94+
collect.info_schema.tables: "true"
8895
dataVolumeClaimTemplate:
8996
accessModes: ["ReadWriteOnce"]
9097
resources:

test/endtoend/upgrade_test.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,15 @@ COrder
232232
EOF
233233
}
234234

235+
function verifyResourceSpec() {
236+
echo "Verifying resource spec"
237+
238+
echo "mysqld_exporter flags:"
239+
checkPodSpecBySelectorWithTimeout "planetscale.com/component=vttablet" 3 "--no-collect.info_schema.innodb_cmpmem$"
240+
checkPodSpecBySelectorWithTimeout "planetscale.com/component=vttablet" 3 "--collect.info_schema.tables$"
241+
checkPodSpecBySelectorWithTimeout "planetscale.com/component=vttablet" 3 "--collect.info_schema.tables.databases=\*$"
242+
}
243+
235244
# Test setup
236245
echo "Building the docker image"
237246
docker build -f build/Dockerfile.release -t vitess-operator-pr:latest .
@@ -251,6 +260,7 @@ checkSemiSyncSetup
251260
verifyDurabilityPolicy "commerce" "semi_sync"
252261
upgradeToLatest
253262
verifyVtGateVersion "22.0.0"
263+
verifyResourceSpec
254264
checkSemiSyncSetup
255265
# After upgrading, we verify that the durability policy is still semi_sync
256266
verifyDurabilityPolicy "commerce" "semi_sync"

0 commit comments

Comments
 (0)