Skip to content

Commit db6e644

Browse files
Honor label for local-cluster, not just name
Refs: - https://issues.redhat.com/browse/ACM-13274 Signed-off-by: Justin Kulikauskas <[email protected]>
1 parent e667abb commit db6e644

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/addon/policyframework/agent_addon.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ func getValues(cluster *clusterv1.ManagedCluster,
104104
annotations := addon.GetAnnotations()
105105
hostingClusterName := annotations[addonapiv1alpha1.HostingClusterNameAnnotationKey]
106106
// special case for local-cluster
107-
if cluster.Name == "local-cluster" || hostingClusterName == "local-cluster" {
107+
isLocal := cluster.Name == "local-cluster" ||
108+
hostingClusterName == "local-cluster" ||
109+
cluster.GetLabels()["local-cluster"] == "true"
110+
if isLocal {
108111
userValues.OnMulticlusterHub = true
109112
}
110113

0 commit comments

Comments
 (0)