Skip to content

Commit 32fcf36

Browse files
committed
Need to use a string prefix to cluster names.
1 parent 7261bb0 commit 32fcf36

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/controller/gateway_controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ func (r *GatewayReconciler) ensureHostnamesClaimed(
461461
Namespace: objectKey.Namespace,
462462
Name: objectKey.Name,
463463
Labels: map[string]string{
464-
downstreamclient.UpstreamOwnerClusterNameLabel: strings.ReplaceAll(upstreamClusterName, "/", "_"),
464+
downstreamclient.UpstreamOwnerClusterNameLabel: fmt.Sprintf("cluster-%s", strings.ReplaceAll(upstreamClusterName, "/", "_")),
465465
downstreamclient.UpstreamOwnerNamespaceLabel: upstreamGateway.Namespace,
466466
downstreamclient.UpstreamOwnerNameLabel: upstreamGateway.Name,
467467
},
@@ -492,7 +492,7 @@ func (r *GatewayReconciler) ensureHostnamesClaimed(
492492
listOpts := []client.ListOption{
493493
client.InNamespace(r.Config.Gateway.DownstreamHostnameAccountingNamespace),
494494
client.MatchingLabels{
495-
downstreamclient.UpstreamOwnerClusterNameLabel: strings.ReplaceAll(upstreamClusterName, "/", "_"),
495+
downstreamclient.UpstreamOwnerClusterNameLabel: fmt.Sprintf("cluster-%s", strings.ReplaceAll(upstreamClusterName, "/", "_")),
496496
downstreamclient.UpstreamOwnerNamespaceLabel: upstreamGateway.Namespace,
497497
downstreamclient.UpstreamOwnerNameLabel: upstreamGateway.Name,
498498
},
@@ -769,7 +769,7 @@ func (r *GatewayReconciler) finalizeGateway(
769769
listOpts := []client.ListOption{
770770
client.InNamespace(r.Config.Gateway.DownstreamHostnameAccountingNamespace),
771771
client.MatchingLabels{
772-
downstreamclient.UpstreamOwnerClusterNameLabel: strings.ReplaceAll(upstreamClusterName, "/", "_"),
772+
downstreamclient.UpstreamOwnerClusterNameLabel: fmt.Sprintf("cluster-%s", strings.ReplaceAll(upstreamClusterName, "/", "_")),
773773
downstreamclient.UpstreamOwnerNamespaceLabel: upstreamGateway.Namespace,
774774
downstreamclient.UpstreamOwnerNameLabel: upstreamGateway.Name,
775775
},

0 commit comments

Comments
 (0)