-
Notifications
You must be signed in to change notification settings - Fork 88
Description
Bug Report: Keyspace-Level Image Settings Issue in Vitess Operator
Description
We’ve identified a bug in Vitess Operator v18 related to keyspace-level image settings. The issue occurs when keyspaces are sorted alphabetically. If one keyspace is configured to use the mysql80Compatible image, all keyspaces that come after it (in alphabetical order) will incorrectly use the MySQL 8.0 image, even if they are supposed to default to mysql56Compatible. Keyspaces that appear earlier in the alphabetical order are unaffected and continue using the mysql56Compatible image as expected.
Expected Behavior
Keyspaces without keyspace-level image settings should default to the mysql56Compatible image (18.0.7-percona57-hc-cfc6d4900a), regardless of their alphabetical position relative to keyspaces configured with mysql80Compatible.
Observed Behavior
Keyspaces without keyspace-level image settings are incorrectly using the mysql80Compatible image (18.0.7-percona80-hc-635e8e91b7) for the mysqld container.
Steps to Reproduce
Create multiple keyspaces in Vitess Operator v18, ensuring they are sorted alphabetically.
Configure one keyspace with the mysql80Compatible image setting.
Leave other keyspaces without keyspace-level image settings (defaulting to mysql56Compatible).
Observe that keyspaces following the mysql80Compatible keyspace in alphabetical order incorrectly use the MySQL 8.0 image for their mysqld containers.
Examples
Keyspace
Here is an example of a VitessKeyspace CR that does not have keyspace-level image settings but is incorrectly using the mysql80Compatible image:
apiVersion: planetscale.com/v2
kind: VitessKeyspace
metadata:
name: xxxxx
creationTimestamp: "2025-06-13T06:38:25Z"
images:
mysqld:
mysql80Compatible: docker.ihs.xxx.net/platform-dbtech/vitess-lite:18.0.7-percona80-hc-635e8e91b7
mysqldExporter: docker-hub.ihs.xxx.net/prom/mysqld-exporter:v0.11.0
vtbackup: docker.ihs.xxx.net/platform-dbtech/vitess-lite:18.0.7-percona57-hc-cfc6d4900a
vtorc: docker.ihs.xxx.net/platform-dbtech/vitess-lite:18.0.7-percona57-hc-cfc6d4900a
vttablet: docker.ihs.xxx.net/platform-dbtech/vitess-lite:18.0.7-percona57-hc-cfc6d4900a
Pod
The following pod description highlights the issue. The mysqld container is incorrectly using the mysql80Compatible image (18.0.7-percona80-hc-635e8e91b7) instead of the expected mysql56Compatible image (18.0.7-percona57-hc-cfc6d4900a):
Containers:
mysqld:
Image: docker.ihs.xxx.net/platform-dbtech/vitess-lite:18.0.7-percona80-hc-635e8e91b7
Environment:
MYSQL_FLAVOR: MySQL80