Skip to content

Commit e955e75

Browse files
geroplroboquat
authored andcommitted
[installer] Minor alignments + fixes
1 parent 02c2d26 commit e955e75

File tree

5 files changed

+24
-6
lines changed

5 files changed

+24
-6
lines changed

install/installer/pkg/common/constants.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ const (
4545
WSProxyComponent = "ws-proxy"
4646
ImageBuilderComponent = "image-builder-mk3"
4747
ImageBuilderRPCPort = 8080
48+
DebugPort = 6060
49+
DebugNodePort = 9229
4850

4951
AnnotationConfigChecksum = "gitpod.io/checksum_config"
5052
)

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package cloudsql
66

77
import (
88
"fmt"
9+
"github.com/gitpod-io/gitpod/installer/pkg/cluster"
910
"github.com/gitpod-io/gitpod/installer/pkg/common"
1011
appsv1 "k8s.io/api/apps/v1"
1112
corev1 "k8s.io/api/core/v1"
@@ -43,7 +44,9 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
4344
Labels: labels,
4445
},
4546
Spec: corev1.PodSpec{
46-
Affinity: &corev1.Affinity{},
47+
Affinity: &corev1.Affinity{
48+
NodeAffinity: common.NodeAffinity(cluster.AffinityLabelMeta).NodeAffinity,
49+
},
4750
ServiceAccountName: Component,
4851
EnableServiceLinks: pointer.Bool(false),
4952
DNSPolicy: "ClusterFirst",

install/installer/pkg/components/server/constants.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ const (
1818
PrometheusPort = 9500
1919
PrometheusPortName = "metrics"
2020
InstallationAdminPort = common.ServerInstallationAdminPort
21-
InstallationAdminName = "installation-admin"
21+
InstallationAdminName = "install-admin"
22+
DebugPortName = "debug"
23+
DebugNodePortName = "debugnode"
2224
ServicePort = 3000
2325
)

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,14 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
292292
Name: PrometheusPortName,
293293
ContainerPort: PrometheusPort,
294294
}, {
295-
Name: "debug",
296-
ContainerPort: 6060,
295+
Name: InstallationAdminName,
296+
ContainerPort: InstallationAdminPort,
297297
}, {
298-
Name: "debugnode",
299-
ContainerPort: 9229,
298+
Name: DebugPortName,
299+
ContainerPort: common.DebugPort,
300+
}, {
301+
Name: DebugNodePortName,
302+
ContainerPort: common.DebugNodePort,
300303
},
301304
},
302305
// todo(sje): do we need to cater for serverContainer.env from values.yaml?

install/installer/pkg/components/server/objects.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ var Objects = common.CompositeRenderFunc(
2929
ContainerPort: InstallationAdminPort,
3030
ServicePort: InstallationAdminPort,
3131
},
32+
DebugPortName: {
33+
ContainerPort: common.DebugPort,
34+
ServicePort: common.DebugPort,
35+
},
36+
DebugNodePortName: {
37+
ContainerPort: common.DebugNodePort,
38+
ServicePort: common.DebugNodePort,
39+
},
3240
}),
3341
common.DefaultServiceAccount(Component),
3442
)

0 commit comments

Comments
 (0)