From 2b0d7d7e91ac31a89fdfec628f55b73434e3aaca Mon Sep 17 00:00:00 2001
From: Francisco Barros <francisco.borges.aurindo.barros@cern.ch>
Date: Fri, 5 May 2023 10:21:46 +0200
Subject: [PATCH] Revert "Remove ip_whitelist functionality from Operator"

This reverts commit e584708eb576a8eb0f8eec0bce417bd3cd2597ed.
---
 controllers/drupalsite_resources.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/controllers/drupalsite_resources.go b/controllers/drupalsite_resources.go
index e1ef2062..1ea567ed 100644
--- a/controllers/drupalsite_resources.go
+++ b/controllers/drupalsite_resources.go
@@ -1257,6 +1257,9 @@ func routeForDrupalSite(currentobject *routev1.Route, d *webservicesv1a1.DrupalS
 		currentobject.Labels[k] = v
 	}
 
+	if _, exists := d.Annotations["haproxy.router.openshift.io/ip_whitelist"]; exists {
+		currentobject.Annotations["haproxy.router.openshift.io/ip_whitelist"] = d.Annotations["haproxy.router.openshift.io/ip_whitelist"]
+	}
 	// Set timeout to 60sec: https://gitlab.cern.ch/webservices/webframeworks-planning/-/issues/642
 	currentobject.Annotations["haproxy.router.openshift.io/timeout"] = "200s"
 	currentobject.Spec.Host = Url
-- 
GitLab