Skip to content

Commit 3ade90d

Browse files
committed
chore: apply labels and annotations from the user to the its object (#8838)
(cherry picked from commit 309ab9c)
1 parent ec6611e commit 3ade90d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/controller/factory/builder.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func BuildInstanceSet(synthesizedComp *component.SynthesizedComponent, component
5252
)
5353

5454
podBuilder := builder.NewPodBuilder("", "").
55-
// Priority: static < dynamic < built-in
55+
// priority: static < dynamic < built-in
5656
AddLabelsInMap(synthesizedComp.StaticLabels).
5757
AddLabelsInMap(synthesizedComp.DynamicLabels).
5858
AddLabelsInMap(constant.GetCompLabels(clusterName, compName, synthesizedComp.Labels)).
@@ -65,7 +65,9 @@ func BuildInstanceSet(synthesizedComp *component.SynthesizedComponent, component
6565

6666
itsName := constant.GenerateWorkloadNamePattern(clusterName, compName)
6767
itsBuilder := builder.NewInstanceSetBuilder(namespace, itsName).
68+
// priority: static < dynamic < built-in
6869
AddLabelsInMap(synthesizedComp.StaticLabels).
70+
AddLabelsInMap(synthesizedComp.DynamicLabels).
6971
AddLabelsInMap(constant.GetCompLabels(clusterName, compName)).
7072
AddAnnotations(constant.KubeBlocksGenerationKey, synthesizedComp.Generation).
7173
AddAnnotations(constant.CRDAPIVersionAnnotationKey, workloads.GroupVersion.String()).

0 commit comments

Comments
 (0)