From 047595d8fdf7d6cc70de59ed311e2fcba2d2c13a Mon Sep 17 00:00:00 2001
From: Vasvi Sharma <vasvi.sharma@cern.ch>
Date: Mon, 11 Mar 2024 09:15:07 +0100
Subject: [PATCH] Change ssoproxy labeling condition

---
 controllers/drupalsite_controller.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/controllers/drupalsite_controller.go b/controllers/drupalsite_controller.go
index d6e04778..30f2c76c 100644
--- a/controllers/drupalsite_controller.go
+++ b/controllers/drupalsite_controller.go
@@ -246,7 +246,7 @@ func (r *DrupalSiteReconciler) Reconcile(ctx context.Context, req ctrl.Request)
 	if drupalSite.Labels == nil {
 		drupalSite.Labels = map[string]string{}
 	}
-	if namespace.Labels[ssoProxyLabel] == "true" && drupalSite.Labels[ssoProxyLabel] != "true" {
+	if (namespace.Labels[ssoProxyLabel] == "true" && drupalSite.Labels[ssoProxyLabel] != "true") || drupalSite.Labels[sitePrimaryLabel] != "true"  {
 		drupalSite.Labels[ssoProxyLabel] = "true"
 		return r.updateCRorFailReconcile(ctx, log, drupalSite)
 	}
-- 
GitLab