Skip to content

Commit 48f229b

Browse files
author
Simon Emms
committed
[installer]: remove the custom labels from the selector labels
1 parent 3c23517 commit 48f229b

File tree

18 files changed

+21
-20
lines changed

18 files changed

+21
-20
lines changed

install/installer/pkg/components/agent-smith/daemonset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func daemonset(ctx *common.RenderContext) ([]runtime.Object, error) {
3737
}),
3838
},
3939
Spec: appsv1.DaemonSetSpec{
40-
Selector: &metav1.LabelSelector{MatchLabels: labels},
40+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
4141
Template: corev1.PodTemplateSpec{
4242
ObjectMeta: metav1.ObjectMeta{
4343
Name: Component,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
6060
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDeployment),
6161
},
6262
Spec: appsv1.DeploymentSpec{
63-
Selector: &metav1.LabelSelector{MatchLabels: labels},
63+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
6464
Replicas: common.Replicas(ctx, Component),
6565
Strategy: common.DeploymentStrategy,
6666
Template: corev1.PodTemplateSpec{

install/installer/pkg/components/content-service/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
9898
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDeployment),
9999
},
100100
Spec: v1.DeploymentSpec{
101-
Selector: &metav1.LabelSelector{MatchLabels: labels},
101+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
102102
Replicas: common.Replicas(ctx, Component),
103103
Strategy: common.DeploymentStrategy,
104104
Template: corev1.PodTemplateSpec{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
3030
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDeployment),
3131
},
3232
Spec: appsv1.DeploymentSpec{
33-
Selector: &metav1.LabelSelector{MatchLabels: labels},
33+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
3434
Replicas: common.Replicas(ctx, Component),
3535
Strategy: common.DeploymentStrategy,
3636
Template: corev1.PodTemplateSpec{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
3737
MaxSurge: &intstr.IntOrString{IntVal: 1},
3838
},
3939
},
40-
Selector: &metav1.LabelSelector{MatchLabels: labels},
40+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
4141
Replicas: common.Replicas(ctx, Component),
4242
Template: corev1.PodTemplateSpec{
4343
ObjectMeta: metav1.ObjectMeta{

install/installer/pkg/components/ide-metrics/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
3030
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDeployment),
3131
},
3232
Spec: appsv1.DeploymentSpec{
33-
Selector: &metav1.LabelSelector{MatchLabels: labels},
33+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
3434
Replicas: common.Replicas(ctx, Component),
3535
Strategy: common.DeploymentStrategy,
3636
Template: corev1.PodTemplateSpec{

install/installer/pkg/components/ide-proxy/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
3030
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDeployment),
3131
},
3232
Spec: appsv1.DeploymentSpec{
33-
Selector: &metav1.LabelSelector{MatchLabels: labels},
33+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
3434
Replicas: common.Replicas(ctx, Component),
3535
Strategy: common.DeploymentStrategy,
3636
Template: corev1.PodTemplateSpec{

install/installer/pkg/components/image-builder-mk3/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
118118
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDeployment),
119119
},
120120
Spec: appsv1.DeploymentSpec{
121-
Selector: &metav1.LabelSelector{MatchLabels: labels},
121+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
122122
Replicas: common.Replicas(ctx, Component),
123123
Strategy: common.DeploymentStrategy,
124124
Template: corev1.PodTemplateSpec{

install/installer/pkg/components/openvsx-proxy/statefulset.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func statefulset(ctx *common.RenderContext) ([]runtime.Object, error) {
4040
},
4141
Spec: appsv1.StatefulSetSpec{
4242
Selector: &metav1.LabelSelector{
43-
MatchLabels: labels,
43+
MatchLabels: common.DefaultLabels(Component),
4444
},
4545
ServiceName: Component,
4646
// todo(sje): receive config value
@@ -139,7 +139,7 @@ func statefulset(ctx *common.RenderContext) ([]runtime.Object, error) {
139139
VolumeClaimTemplates: []v1.PersistentVolumeClaim{{
140140
ObjectMeta: metav1.ObjectMeta{
141141
Name: "redis-data",
142-
Labels: labels,
142+
Labels: common.DefaultLabels(Component),
143143
},
144144
Spec: v1.PersistentVolumeClaimSpec{
145145
AccessModes: []v1.PersistentVolumeAccessMode{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
130130
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDeployment),
131131
},
132132
Spec: appsv1.DeploymentSpec{
133-
Selector: &metav1.LabelSelector{MatchLabels: labels},
133+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
134134
Replicas: common.Replicas(ctx, Component),
135135
Strategy: common.DeploymentStrategy,
136136
Template: corev1.PodTemplateSpec{

install/installer/pkg/components/public-api-server/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
4646
}),
4747
},
4848
Spec: appsv1.DeploymentSpec{
49-
Selector: &metav1.LabelSelector{MatchLabels: labels},
49+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
5050
Replicas: common.Replicas(ctx, Component),
5151
Strategy: common.DeploymentStrategy,
5252
Template: corev1.PodTemplateSpec{

install/installer/pkg/components/registry-facade/daemonset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ func daemonset(ctx *common.RenderContext) ([]runtime.Object, error) {
193193
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDaemonset),
194194
},
195195
Spec: appsv1.DaemonSetSpec{
196-
Selector: &metav1.LabelSelector{MatchLabels: labels},
196+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
197197
Template: corev1.PodTemplateSpec{
198198
ObjectMeta: metav1.ObjectMeta{
199199
Name: Component,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
289289
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDeployment),
290290
},
291291
Spec: appsv1.DeploymentSpec{
292-
Selector: &metav1.LabelSelector{MatchLabels: labels},
292+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
293293
Replicas: common.Replicas(ctx, Component),
294294
Strategy: common.DeploymentStrategy,
295295
Template: corev1.PodTemplateSpec{

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package usage
55

66
import (
77
"fmt"
8+
89
"github.com/gitpod-io/gitpod/common-go/baseserver"
910
"github.com/gitpod-io/gitpod/installer/pkg/cluster"
1011
"github.com/gitpod-io/gitpod/installer/pkg/common"
@@ -72,7 +73,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
7273
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDeployment),
7374
},
7475
Spec: appsv1.DeploymentSpec{
75-
Selector: &metav1.LabelSelector{MatchLabels: labels},
76+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
7677
Replicas: common.Replicas(ctx, Component),
7778
Strategy: common.DeploymentStrategy,
7879
Template: corev1.PodTemplateSpec{

install/installer/pkg/components/ws-daemon/daemonset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ fi
358358
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDaemonset),
359359
},
360360
Spec: appsv1.DaemonSetSpec{
361-
Selector: &metav1.LabelSelector{MatchLabels: labels},
361+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
362362
Template: corev1.PodTemplateSpec{
363363
ObjectMeta: metav1.ObjectMeta{
364364
Labels: labels,

install/installer/pkg/components/ws-manager-bridge/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
7373
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDeployment),
7474
},
7575
Spec: appsv1.DeploymentSpec{
76-
Selector: &metav1.LabelSelector{MatchLabels: labels},
76+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
7777
Replicas: common.Replicas(ctx, Component),
7878
Strategy: common.DeploymentStrategy,
7979
Template: corev1.PodTemplateSpec{

install/installer/pkg/components/ws-manager/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
133133
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDeployment),
134134
},
135135
Spec: appsv1.DeploymentSpec{
136-
Selector: &metav1.LabelSelector{MatchLabels: labels},
136+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
137137
Replicas: common.Replicas(ctx, Component),
138138
Strategy: common.DeploymentStrategy,
139139
Template: corev1.PodTemplateSpec{

install/installer/pkg/components/ws-proxy/deployment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
6666
Affinity: common.NodeAffinity(cluster.AffinityLabelWorkspaceServices),
6767
TopologySpreadConstraints: []corev1.TopologySpreadConstraint{
6868
corev1.TopologySpreadConstraint{
69-
LabelSelector: &metav1.LabelSelector{MatchLabels: labels},
69+
LabelSelector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
7070
MaxSkew: 1,
7171
TopologyKey: "kubernetes.io/hostname",
7272
WhenUnsatisfiable: corev1.DoNotSchedule,
@@ -177,7 +177,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
177177
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDeployment),
178178
},
179179
Spec: appsv1.DeploymentSpec{
180-
Selector: &metav1.LabelSelector{MatchLabels: labels},
180+
Selector: &metav1.LabelSelector{MatchLabels: common.DefaultLabels(Component)},
181181
Replicas: common.Replicas(ctx, Component),
182182
Strategy: common.DeploymentStrategy,
183183
Template: corev1.PodTemplateSpec{

0 commit comments

Comments
 (0)