Skip to content

Commit 8547215

Browse files
committed
Hash machine pool name label
1 parent db16e3c commit 8547215

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

exp/controllers/awsmachinepool_controller.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ import (
5656
"sigs.k8s.io/cluster-api/util"
5757
"sigs.k8s.io/cluster-api/util/annotations"
5858
"sigs.k8s.io/cluster-api/util/conditions"
59+
"sigs.k8s.io/cluster-api/util/labels/format"
5960
"sigs.k8s.io/cluster-api/util/predicates"
6061
)
6162

@@ -533,7 +534,7 @@ func createAWSMachinesIfNotExists(ctx context.Context, awsMachineList *infrav1.A
533534
Namespace: mp.Namespace,
534535
GenerateName: fmt.Sprintf("%s-", existingASG.Name),
535536
Labels: map[string]string{
536-
clusterv1.MachinePoolNameLabel: mp.Name,
537+
clusterv1.MachinePoolNameLabel: format.MustFormatValue(mp.Name),
537538
clusterv1.ClusterNameLabel: mp.Spec.ClusterName,
538539
},
539540
OwnerReferences: []metav1.OwnerReference{

0 commit comments

Comments
 (0)