diff --git a/deploy/crds/planetscale.com_vitessclusters.yaml b/deploy/crds/planetscale.com_vitessclusters.yaml
index 818304f1..4f6d696c 100644
--- a/deploy/crds/planetscale.com_vitessclusters.yaml
+++ b/deploy/crds/planetscale.com_vitessclusters.yaml
@@ -1289,6 +1289,14 @@ spec:
mysql80Compatible:
type: string
type: object
+ mysqldExporter:
+ type: string
+ vtbackup:
+ type: string
+ vtorc:
+ type: string
+ vttablet:
+ type: string
type: object
name:
maxLength: 63
diff --git a/docs/api/index.html b/docs/api/index.html
index 41caa361..1ffe05bf 100644
--- a/docs/api/index.html
+++ b/docs/api/index.html
@@ -6551,7 +6551,18 @@
VitessKeyspaceTemplateI
VitessKeyspaceTemplateImages specifies user-definable container images to
-use for this keyspace.
+use for this keyspace. The images defined here by the user will override
+those defined at the top-level in VitessCluster.spec.images.
+While this field allows you to set a different Vitess version for some
+components than the version defined at the top level, it is important to
+note that Vitess only ensures compatibility between one version and the
+next and previous one. For instance: N is only guaranteed to be compatible
+with N+1 and N-1. Do be careful when specifying multiple versions across
+your cluster so that they respect this compatibility rule.
+Note: this structure is a copy of VitessKeyspaceImages, once we have gotten
+rid of MysqldImage and replaced it by MysqldImageNew (planned for v2.15), we
+should be able to remove VitessKeyspaceTemplateImages entirely and just use
+VitessKeyspaceImages instead as it contains exactly the same fields.
@@ -6563,6 +6574,39 @@ VitessKeyspaceTemplateI
+vttablet
+
+string
+
+ |
+
+ Vttablet is the container image (including version tag) to use for Vitess Tablet instances.
+ |
+
+
+
+vtorc
+
+string
+
+ |
+
+ Vtorc is the container image (including version tag) to use for Vitess Orchestrator instances.
+ |
+
+
+
+vtbackup
+
+string
+
+ |
+
+ Vtbackup is the container image (including version tag) to use for Vitess Backup jobs.
+ |
+
+
+
mysqld
@@ -6577,6 +6621,17 @@ VitessKeyspaceTemplateI
mysqld running alongside each tablet.
|
+
+
+mysqldExporter
+
+string
+
+ |
+
+ MysqldExporter specifies the container image for mysqld-exporter.
+ |
+
VitessKeyspaceTurndownPolicy
diff --git a/pkg/apis/planetscale/v2/vitesskeyspace_defaults.go b/pkg/apis/planetscale/v2/vitesskeyspace_defaults.go
index aa5c51d2..a98a0f49 100644
--- a/pkg/apis/planetscale/v2/vitesskeyspace_defaults.go
+++ b/pkg/apis/planetscale/v2/vitesskeyspace_defaults.go
@@ -73,8 +73,20 @@ func DefaultVitessKeyspaceImages(dst *VitessKeyspaceImages, clusterDefaults *Vit
// MergeVitessKeyspaceTemplateImages takes non-empty image values from a non-nil src
// and sets them on dst.
func MergeVitessKeyspaceTemplateImages(dst *VitessKeyspaceImages, src *VitessKeyspaceTemplateImages) {
+ if src.Vttablet != "" {
+ dst.Vttablet = src.Vttablet
+ }
+ if src.Vtorc != "" {
+ dst.Vtorc = src.Vtorc
+ }
+ if src.Vtbackup != "" {
+ dst.Vtbackup = src.Vtbackup
+ }
if src.Mysqld != nil {
dst.Mysqld.Mysql56Compatible = src.Mysqld.Mysql56Compatible
dst.Mysqld.Mysql80Compatible = src.Mysqld.Mysql80Compatible
}
+ if src.MysqldExporter != "" {
+ dst.MysqldExporter = src.MysqldExporter
+ }
}
diff --git a/pkg/apis/planetscale/v2/vitesskeyspace_types.go b/pkg/apis/planetscale/v2/vitesskeyspace_types.go
index 1550b242..1d8dbdd0 100644
--- a/pkg/apis/planetscale/v2/vitesskeyspace_types.go
+++ b/pkg/apis/planetscale/v2/vitesskeyspace_types.go
@@ -188,13 +188,34 @@ type VitessKeyspaceTemplate struct {
}
// VitessKeyspaceTemplateImages specifies user-definable container images to
-// use for this keyspace.
+// use for this keyspace. The images defined here by the user will override
+// those defined at the top-level in VitessCluster.spec.images.
+//
+// While this field allows you to set a different Vitess version for some
+// components than the version defined at the top level, it is important to
+// note that Vitess only ensures compatibility between one version and the
+// next and previous one. For instance: N is only guaranteed to be compatible
+// with N+1 and N-1. Do be careful when specifying multiple versions across
+// your cluster so that they respect this compatibility rule.
+//
+// Note: this structure is a copy of VitessKeyspaceImages, once we have gotten
+// rid of MysqldImage and replaced it by MysqldImageNew (planned for v2.15), we
+// should be able to remove VitessKeyspaceTemplateImages entirely and just use
+// VitessKeyspaceImages instead as it contains exactly the same fields.
type VitessKeyspaceTemplateImages struct {
+ // Vttablet is the container image (including version tag) to use for Vitess Tablet instances.
+ Vttablet string `json:"vttablet,omitempty"`
+ // Vtorc is the container image (including version tag) to use for Vitess Orchestrator instances.
+ Vtorc string `json:"vtorc,omitempty"`
+ // Vtbackup is the container image (including version tag) to use for Vitess Backup jobs.
+ Vtbackup string `json:"vtbackup,omitempty"`
// Mysqld specifies the container image to use for mysqld, as well as
// declaring which MySQL flavor setting in Vitess the image is
// compatible with. Only one flavor image may be provided at a time.
// mysqld running alongside each tablet.
Mysqld *MysqldImageNew `json:"mysqld,omitempty"`
+ // MysqldExporter specifies the container image for mysqld-exporter.
+ MysqldExporter string `json:"mysqldExporter,omitempty"`
}
// VitessOrchestratorSpec specifies deployment parameters for vtorc.
diff --git a/test/endtoend/operator/operator-latest.yaml b/test/endtoend/operator/operator-latest.yaml
index b2e6122f..97eca325 100644
--- a/test/endtoend/operator/operator-latest.yaml
+++ b/test/endtoend/operator/operator-latest.yaml
@@ -2777,6 +2777,14 @@ spec:
mysql80Compatible:
type: string
type: object
+ mysqldExporter:
+ type: string
+ vtbackup:
+ type: string
+ vtorc:
+ type: string
+ vttablet:
+ type: string
type: object
name:
maxLength: 63