Skip to content

Commit

Permalink
synchronisation
Browse files Browse the repository at this point in the history
Signed-off-by: Coleen Iona Quadros <coleen.quadros27@gmail.com>
  • Loading branch information
coleenquadros committed Jun 26, 2024
1 parent 1a6a693 commit 4e2f1e6
Showing 1 changed file with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,23 @@ func (r *PlacementRuleReconciler) Reconcile(ctx context.Context, req ctrl.Reques
// We want to ensure that the local-cluster is always in the managedClusterList
// In the case when hubSelfManagement is enabled, we will delete it from the list and modify the object
// to cater to the use case of deploying in open-cluster-management-observability namespace
delete(managedClusterList, "local-cluster")
if _, ok := managedClusterList["local-cluster"]; !ok {
obj := &clusterv1.ManagedCluster{
ObjectMeta: metav1.ObjectMeta{
Name: "local-cluster",
Namespace: config.GetDefaultNamespace(),
Labels: map[string]string{
"openshiftVersion": "mimical",
if req.Name == "local-cluster" {
managedClusterListMutex.Lock()
delete(managedClusterList, "local-cluster")
managedClusterListMutex.Unlock()
if _, ok := managedClusterList["local-cluster"]; !ok {
obj := &clusterv1.ManagedCluster{
ObjectMeta: metav1.ObjectMeta{
Name: "local-cluster",
Namespace: config.GetDefaultNamespace(),
Labels: map[string]string{
"openshiftVersion": "mimical",
},
},
},
}
installMetricsWithoutAddon = true
updateManagedClusterList(obj)
}
installMetricsWithoutAddon = true
updateManagedClusterList(obj)
}

if config.GetMonitoringCRName() == "" {
Expand Down

0 comments on commit 4e2f1e6

Please sign in to comment.