Skip to content

Commit

Permalink
[installer] Optional flag to use mysql 8.0 (#18069)
Browse files Browse the repository at this point in the history
  • Loading branch information
geropl authored Jun 27, 2023
1 parent 8a2df3b commit 943f630
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions dev/preview/workflow/preview/deploy-gitpod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,11 @@ yq w -i "${INSTALLER_CONFIG_PATH}" experimental.workspace.networkLimits.enforce
yq w -i "${INSTALLER_CONFIG_PATH}" experimental.workspace.networkLimits.connectionsPerMinute "3000"
yq w -i "${INSTALLER_CONFIG_PATH}" experimental.workspace.networkLimits.bucketSize "3000"

#
# Configure DB
#
yq w -i "${INSTALLER_CONFIG_PATH}" database.inClusterMySql_8_0 "true"

log_success "Generated config at $INSTALLER_CONFIG_PATH"

# ========
Expand Down
7 changes: 7 additions & 0 deletions install/installer/pkg/components/database/incluster/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,17 @@ var Helm = common.CompositeHelmFunc(

imageRegistry := common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL)

// We switched to specific tags because we got subtle broken versions with just specifying major versions
mysqlBitnamiImageTag := "5.7.34-debian-10-r55"
if cfg.Config.Database.InClusterMysSQL_8_0 {
mysqlBitnamiImageTag = "8.0.33-debian-11-r24"
}

return &common.HelmConfig{
Enabled: true,
Values: &values.Options{
Values: []string{
helm.KeyValue("mysql.image.tag", mysqlBitnamiImageTag),
helm.KeyValue("mysql.auth.existingSecret", SQLPasswordName),
helm.KeyValue("mysql.auth.database", Database),
helm.KeyValue("mysql.auth.username", Username),
Expand Down
2 changes: 2 additions & 0 deletions install/installer/pkg/config/v1/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ type Database struct {
External *DatabaseExternal `json:"external,omitempty"`
CloudSQL *DatabaseCloudSQL `json:"cloudSQL,omitempty"`
SSL *SSLOptions `json:"ssl,omitempty"`
// A temporary flag to help debug for the migration to MySQL 8.0
InClusterMysSQL_8_0 bool `json:"inClusterMySql_8_0,omitempty"`
}

type DatabaseExternal struct {
Expand Down
3 changes: 1 addition & 2 deletions install/installer/third_party/charts/mysql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
mysql:
fullnameOverride: mysql
image:
# We switched to the specific version because "5.7" was broken at least once
tag: 5.7.34-debian-10-r55
tag: "overwritten"
primary:
extraEnvVars:
# We rely on this in our DB implementations: NULL (re-)sets configured columns to be initialized with CURRENT_TIMESTAMP.
Expand Down

0 comments on commit 943f630

Please sign in to comment.