Skip to content

Commit 14d2eeb

Browse files
committed
[installer] Remove cloud-sql-global
1 parent 7349d1c commit 14d2eeb

File tree

4 files changed

+1
-175
lines changed

4 files changed

+1
-175
lines changed

install/installer/pkg/components/database/cloudsql/global.go

Lines changed: 0 additions & 141 deletions
This file was deleted.

install/installer/pkg/components/database/cloudsql/objects.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,4 @@ var Objects = common.CompositeRenderFunc(
2121
ServicePort: Port,
2222
},
2323
}),
24-
CloudSQLGlobalObjects,
2524
)

install/installer/pkg/components/spicedb/deployment.go

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"github.com/gitpod-io/gitpod/common-go/baseserver"
1313
"github.com/gitpod-io/gitpod/installer/pkg/cluster"
1414
"github.com/gitpod-io/gitpod/installer/pkg/common"
15-
"github.com/gitpod-io/gitpod/installer/pkg/components/database/cloudsql"
1615

1716
appsv1 "k8s.io/api/apps/v1"
1817
corev1 "k8s.io/api/core/v1"
@@ -173,35 +172,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
173172
}
174173

175174
func dbEnvVars(ctx *common.RenderContext) []corev1.EnvVar {
176-
containerEnvVars := common.DatabaseEnv(&ctx.Config)
177-
178-
if ctx.Config.Database.CloudSQLGlobal != nil {
179-
withoutDBHost := filterOutEnvVars("DB_HOST", containerEnvVars)
180-
withoutDBHost = append(withoutDBHost,
181-
// Override the DB host to point to global cloudsql
182-
corev1.EnvVar{
183-
Name: "DB_HOST",
184-
Value: cloudsql.ComponentGlobal,
185-
},
186-
)
187-
188-
containerEnvVars = withoutDBHost
189-
}
190-
191-
return containerEnvVars
192-
}
193-
194-
func filterOutEnvVars(name string, vars []corev1.EnvVar) []corev1.EnvVar {
195-
var filtered []corev1.EnvVar
196-
for _, v := range vars {
197-
if v.Name == name {
198-
continue
199-
}
200-
201-
filtered = append(filtered, v)
202-
}
203-
204-
return filtered
175+
return common.DatabaseEnv(&ctx.Config)
205176
}
206177

207178
func dbWaiter(ctx *common.RenderContext) v1.Container {

install/installer/pkg/config/v1/config.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,6 @@ type Database struct {
204204
External *DatabaseExternal `json:"external,omitempty"`
205205
CloudSQL *DatabaseCloudSQL `json:"cloudSQL,omitempty"`
206206
SSL *SSLOptions `json:"ssl,omitempty"`
207-
208-
// Experimental. CloudSQLGlobal is configuration for a single CloudSQL DB across multiple regions.
209-
CloudSQLGlobal *DatabaseCloudSQL `json:"cloudSQLGlobal,omitempty"`
210207
}
211208

212209
type DatabaseExternal struct {

0 commit comments

Comments
 (0)