Skip to content

Commit 9b78217

Browse files
committed
Add mysqld_exporter flags to the upgrade test
Signed-off-by: Sergey Stankevich <[email protected]>
1 parent 5796a5e commit 9b78217

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

test/endtoend/operator/cluster_upgrade.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ spec:
9999
cpu: 100m
100100
memory: 512Mi
101101
configOverrides: "innodb_fast_shutdown=0"
102+
# Configure extra flags for mysqld_exporter and check them in the upgrade test
103+
mysqldExporter:
104+
extraFlags:
105+
collect.info_schema.tables.databases: "*" # Override the default
106+
collect.info_schema.innodb_cmpmem: "false"
107+
collect.info_schema.tables: "true"
102108
dataVolumeClaimTemplate:
103109
accessModes: ["ReadWriteOnce"]
104110
resources:

test/endtoend/upgrade_test.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,15 @@ function upgradeToLatest() {
252252
verifyDataCommerce
253253
}
254254

255+
function verifyResourceSpec() {
256+
echo "Verifying resource spec"
257+
258+
echo "mysqld_exporter flags:"
259+
checkPodSpecBySelectorWithTimeout example "planetscale.com/component=vttablet" 3 "--no-collect.info_schema.innodb_cmpmem$"
260+
checkPodSpecBySelectorWithTimeout example "planetscale.com/component=vttablet" 3 "--collect.info_schema.tables$"
261+
checkPodSpecBySelectorWithTimeout example "planetscale.com/component=vttablet" 3 "--collect.info_schema.tables.databases=\*$"
262+
}
263+
255264
# Test setup
256265
setupKindCluster
257266
cd test/endtoend/operator || exit 1
@@ -263,6 +272,7 @@ checkSemiSyncSetup
263272
verifyDurabilityPolicy "commerce" "semi_sync"
264273
upgradeToLatest
265274
verifyVtGateVersion "23.0.0"
275+
verifyResourceSpec
266276
checkSemiSyncSetup
267277
# After upgrading, we verify that the durability policy is still semi_sync
268278
verifyDurabilityPolicy "commerce" "semi_sync"

0 commit comments

Comments
 (0)