Skip to content

Commit

Permalink
Add mysqld_exporter flags to the upgrade test
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Stankevich <[email protected]>
  • Loading branch information
stankevich committed Nov 8, 2024
1 parent 2553001 commit 4f78932
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/endtoend/operator/cluster_upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ spec:
cpu: 100m
memory: 512Mi
configOverrides: "innodb_fast_shutdown=0"
# Configure extra flags for mysqld_exporter and check them in the upgrade test
mysqldExporter:
extraFlags:
collect.info_schema.tables.databases: "*" # Override operator default
collect.info_schema.innodb_cmpmem: "true" # Duplicate flag, overriden below
collect.info_schema.innodb_cmpmem: "false"
collect.info_schema.tables: "true"
dataVolumeClaimTemplate:
accessModes: ["ReadWriteOnce"]
resources:
Expand Down
10 changes: 10 additions & 0 deletions test/endtoend/upgrade_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,15 @@ COrder
EOF
}

function verifyResourceSpec() {
echo "Verifying resource spec"

echo "mysqld_exporter flags:"
checkPodSpecBySelectorWithTimeout "planetscale.com/component=vttablet" 3 "--no-collect.info_schema.innodb_cmpmem$"
checkPodSpecBySelectorWithTimeout "planetscale.com/component=vttablet" 3 "--collect.info_schema.tables$"
checkPodSpecBySelectorWithTimeout "planetscale.com/component=vttablet" 3 "--collect.info_schema.tables.databases=\*$"
}

# Test setup
echo "Building the docker image"
docker build -f build/Dockerfile.release -t vitess-operator-pr:latest .
Expand All @@ -251,6 +260,7 @@ checkSemiSyncSetup
verifyDurabilityPolicy "commerce" "semi_sync"
upgradeToLatest
verifyVtGateVersion "22.0.0"
verifyResourceSpec
checkSemiSyncSetup
# After upgrading, we verify that the durability policy is still semi_sync
verifyDurabilityPolicy "commerce" "semi_sync"
Expand Down

0 comments on commit 4f78932

Please sign in to comment.