File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,11 @@ type MysqlClusterSpec struct {
57
57
// +optional
58
58
Image string `json:"image,omitempty"`
59
59
60
+ // To specify the image that will be used for sidecar container.
61
+ // It will override --sidecar-image or --sidecar-mysql8-image flags.
62
+ // +optional
63
+ SidecarImage string `json:"sidecarImage,omitempty"`
64
+
60
65
// A bucket URL that contains a xtrabackup to initialize the mysql database.
61
66
// +optional
62
67
InitBucketURL string `json:"initBucketURL,omitempty"`
Original file line number Diff line number Diff line change @@ -268,13 +268,14 @@ func (c *MysqlCluster) GetNamespacedName() types.NamespacedName {
268
268
269
269
// GetSidecarImage selects the sidecar docker image based on mysql version
270
270
func (c * MysqlCluster ) GetSidecarImage () string {
271
+ if c .Spec .SidecarImage != "" {
272
+ return c .Spec .SidecarImage
273
+ }
271
274
// decide the sidecar image based on mysql version
272
- sidecarImage := options .GetOptions ().SidecarMysql57Image
273
275
if c .GetMySQLSemVer ().Major == 8 {
274
- sidecarImage = options .GetOptions ().SidecarMysql8Image
276
+ return options .GetOptions ().SidecarMysql8Image
275
277
}
276
-
277
- return sidecarImage
278
+ return options .GetOptions ().SidecarMysql57Image
278
279
}
279
280
280
281
// IsClusterReady checks if the cluster is ready or not.
You can’t perform that action at this time.
0 commit comments