diff --git a/manifests/pipecd/templates/deployment.yaml b/manifests/pipecd/templates/deployment.yaml index 7da175b60d..57680d7384 100644 --- a/manifests/pipecd/templates/deployment.yaml +++ b/manifests/pipecd/templates/deployment.yaml @@ -354,7 +354,7 @@ spec: {{- end }} containers: - name: mysql - image: mysql:{{ .Values.mysql.imageTag }} + image: {{ .Values.mysql.image }}:{{ .Values.mysql.imageTag }} imagePullPolicy: IfNotPresent env: - name: MYSQL_ROOT_PASSWORD diff --git a/manifests/pipecd/values.yaml b/manifests/pipecd/values.yaml index c8dc4ab6bb..12cb4a1912 100644 --- a/manifests/pipecd/values.yaml +++ b/manifests/pipecd/values.yaml @@ -69,7 +69,8 @@ cloudSQLProxy: resources: {} mysql: - imageTag: "8.0.23" + image: mysql + imageTag: 8.0.33 resources: {} port: 3306 diff --git a/pkg/app/pipectl/cmd/quickstart/quickstart.go b/pkg/app/pipectl/cmd/quickstart/quickstart.go index e9581b8bf8..f217951a71 100644 --- a/pkg/app/pipectl/cmd/quickstart/quickstart.go +++ b/pkg/app/pipectl/cmd/quickstart/quickstart.go @@ -149,6 +149,8 @@ func (c *command) installControlPlane(ctx context.Context, helm string, input cl "--create-namespace", "--values", fmt.Sprintf(helmQuickstartValueRemotePath, c.version), + "--set", + fmt.Sprintf("mysql.image=%s", selectMySQLImage()), } var stderr, stdout bytes.Buffer @@ -312,6 +314,19 @@ func openbrowser(url string) error { return err } +func selectMySQLImage() string { + var mysqlImage string + switch runtime.GOARCH { + case "amd64": + mysqlImage = "mysql" + case "arm64": + mysqlImage = "arm64v8/mysql" + default: + mysqlImage = "mysql" + } + return mysqlImage +} + func (c *command) uninstallAll(ctx context.Context, helm string, input cli.Input) error { input.Logger.Info("Uninstalling PipeCD components...") @@ -380,9 +395,9 @@ func (c *command) getKubectl() (string, error) { } // getHelm finds and returns helm executable binary in the following priority: -// 1. pre-installed in command specified toolsDir (default is $HOME/.pipectl/tools) -// 2. $PATH -// 3. install new helm to command specified toolsDir +// 1. pre-installed in command specified toolsDir (default is $HOME/.pipectl/tools) +// 2. $PATH +// 3. install new helm to command specified toolsDir func (c *command) getHelm(ctx context.Context) (string, error) { binName := "helm"