Skip to content

Commit 566218f

Browse files
author
Simon Emms
committed
[installer]: add customization function to ws-deployment
1 parent 5cc4e3d commit 566218f

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
)
1818

1919
func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
20-
labels := common.DefaultLabels(Component)
20+
labels := common.CustomizeLabel(ctx, Component, common.TypeMetaDeployment)
2121

2222
configHash, err := common.ObjectHash(configmap(ctx))
2323
if err != nil {
@@ -127,9 +127,10 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
127127
&appsv1.Deployment{
128128
TypeMeta: common.TypeMetaDeployment,
129129
ObjectMeta: metav1.ObjectMeta{
130-
Name: Component,
131-
Namespace: ctx.Namespace,
132-
Labels: labels,
130+
Name: Component,
131+
Namespace: ctx.Namespace,
132+
Labels: labels,
133+
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDeployment),
133134
},
134135
Spec: appsv1.DeploymentSpec{
135136
Selector: &metav1.LabelSelector{MatchLabels: labels},
@@ -140,9 +141,11 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
140141
Name: Component,
141142
Namespace: ctx.Namespace,
142143
Labels: labels,
143-
Annotations: map[string]string{
144-
common.AnnotationConfigChecksum: configHash,
145-
},
144+
Annotations: common.CustomizeAnnotation(ctx, Component, common.TypeMetaDeployment, func() map[string]string {
145+
return map[string]string{
146+
common.AnnotationConfigChecksum: configHash,
147+
}
148+
}),
146149
},
147150
Spec: podSpec,
148151
},

0 commit comments

Comments
 (0)