Skip to content

Commit

Permalink
Honor label for local-cluster, not just name
Browse files Browse the repository at this point in the history
Refs:
 - https://issues.redhat.com/browse/ACM-13274

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
  • Loading branch information
JustinKuli authored and openshift-merge-bot[bot] committed Aug 20, 2024
1 parent e667abb commit db6e644
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/addon/policyframework/agent_addon.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ func getValues(cluster *clusterv1.ManagedCluster,
annotations := addon.GetAnnotations()
hostingClusterName := annotations[addonapiv1alpha1.HostingClusterNameAnnotationKey]
// special case for local-cluster
if cluster.Name == "local-cluster" || hostingClusterName == "local-cluster" {
isLocal := cluster.Name == "local-cluster" ||
hostingClusterName == "local-cluster" ||
cluster.GetLabels()["local-cluster"] == "true"
if isLocal {
userValues.OnMulticlusterHub = true
}

Expand Down

0 comments on commit db6e644

Please sign in to comment.