Skip to content

Commit a936831

Browse files
authored
Unique name label on additionalVersionedPods (#488)
1 parent 207d806 commit a936831

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/fullnode/pod_builder.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,9 @@ func buildAdditionalPod(
557557
// Create a unique name for the additional pod
558558
name := fmt.Sprintf("%s-%d", podSpec.Name, ordinal)
559559

560+
labels := defaultLabels(crd)
561+
labels[kube.NameLabel] = appName(crd) + "-" + podSpec.Name
562+
560563
pod := &corev1.Pod{
561564
TypeMeta: metav1.TypeMeta{
562565
Kind: "Pod",
@@ -565,7 +568,7 @@ func buildAdditionalPod(
565568
ObjectMeta: metav1.ObjectMeta{
566569
Namespace: crd.Namespace,
567570
Name: name,
568-
Labels: defaultLabels(crd),
571+
Labels: labels,
569572
Annotations: make(map[string]string),
570573
},
571574
Spec: podSpec.PodSpec,

0 commit comments

Comments
 (0)