Skip to content

Commit 6f8bbba

Browse files
csweichelroboquat
authored andcommitted
[installer] Remove default workspace template
1 parent 26e2777 commit 6f8bbba

File tree

2 files changed

+7
-35
lines changed

2 files changed

+7
-35
lines changed

components/installer/pkg/components/ws-manager/configmap.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"time"
1111

1212
wsdaemon "github.com/gitpod-io/gitpod/installer/pkg/components/ws-daemon"
13-
"k8s.io/utils/pointer"
1413
"sigs.k8s.io/yaml"
1514

1615
"github.com/gitpod-io/gitpod/common-go/grpc"
@@ -159,19 +158,6 @@ func buildWorkspaceTemplates(ctx *common.RenderContext) (config.WorkspacePodTemp
159158
cfgTpls = &configv1.WorkspaceTemplates{}
160159
}
161160

162-
cfgTpls.Default = &corev1.Pod{
163-
Spec: corev1.PodSpec{
164-
EnableServiceLinks: pointer.Bool(false),
165-
DNSConfig: &corev1.PodDNSConfig{
166-
Nameservers: []string{
167-
"1.1.1.1",
168-
"8.8.8.8",
169-
},
170-
},
171-
DNSPolicy: corev1.DNSNone,
172-
},
173-
}
174-
175161
ops := []struct {
176162
Name string
177163
Path *string

components/installer/pkg/components/ws-manager/configmap_test.go

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,13 @@ func TestBuildWorkspaceTemplates(t *testing.T) {
2929
Expectation Expectation
3030
}{
3131
{
32-
Name: "no templates",
33-
Expectation: Expectation{
34-
TplConfig: wsmancfg.WorkspacePodTemplateConfiguration{DefaultPath: "/workspace-templates/default.yaml"},
35-
Data: map[string]bool{"default.yaml": true},
36-
},
32+
Name: "no templates",
33+
Expectation: Expectation{},
3734
},
3835
{
39-
Name: "empty templates",
40-
Config: &configv1.WorkspaceTemplates{},
41-
Expectation: Expectation{
42-
TplConfig: wsmancfg.WorkspacePodTemplateConfiguration{DefaultPath: "/workspace-templates/default.yaml"},
43-
Data: map[string]bool{"default.yaml": true},
44-
},
36+
Name: "empty templates",
37+
Config: &configv1.WorkspaceTemplates{},
38+
Expectation: Expectation{},
4539
},
4640
{
4741
Name: "default tpl",
@@ -60,11 +54,9 @@ func TestBuildWorkspaceTemplates(t *testing.T) {
6054
},
6155
Expectation: Expectation{
6256
TplConfig: wsmancfg.WorkspacePodTemplateConfiguration{
63-
DefaultPath: "/workspace-templates/default.yaml",
6457
RegularPath: "/workspace-templates/regular.yaml",
6558
},
6659
Data: map[string]bool{
67-
"default.yaml": true,
6860
"regular.yaml": true,
6961
},
7062
},
@@ -76,11 +68,9 @@ func TestBuildWorkspaceTemplates(t *testing.T) {
7668
},
7769
Expectation: Expectation{
7870
TplConfig: wsmancfg.WorkspacePodTemplateConfiguration{
79-
DefaultPath: "/workspace-templates/default.yaml",
8071
PrebuildPath: "/workspace-templates/prebuild.yaml",
8172
},
8273
Data: map[string]bool{
83-
"default.yaml": true,
8474
"prebuild.yaml": true,
8575
},
8676
},
@@ -92,12 +82,10 @@ func TestBuildWorkspaceTemplates(t *testing.T) {
9282
},
9383
Expectation: Expectation{
9484
TplConfig: wsmancfg.WorkspacePodTemplateConfiguration{
95-
DefaultPath: "/workspace-templates/default.yaml",
96-
GhostPath: "/workspace-templates/ghost.yaml",
85+
GhostPath: "/workspace-templates/ghost.yaml",
9786
},
9887
Data: map[string]bool{
99-
"default.yaml": true,
100-
"ghost.yaml": true,
88+
"ghost.yaml": true,
10189
},
10290
},
10391
},
@@ -108,11 +96,9 @@ func TestBuildWorkspaceTemplates(t *testing.T) {
10896
},
10997
Expectation: Expectation{
11098
TplConfig: wsmancfg.WorkspacePodTemplateConfiguration{
111-
DefaultPath: "/workspace-templates/default.yaml",
11299
ImagebuildPath: "/workspace-templates/imagebuild.yaml",
113100
},
114101
Data: map[string]bool{
115-
"default.yaml": true,
116102
"imagebuild.yaml": true,
117103
},
118104
},

0 commit comments

Comments
 (0)