From b1905966b6667b47a5b4b4224df00bf9aadddd53 Mon Sep 17 00:00:00 2001
From: Francisco Borges Aurindo Barros
 <francisco.borges.aurindo.barros@cern.ch>
Date: Wed, 4 Dec 2024 18:16:41 +0100
Subject: [PATCH 1/2] Update operator_methods.go

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

diff --git a/controllers/operator_methods.go b/controllers/operator_methods.go
index 7aa2e95..26a8ed2 100644
--- a/controllers/operator_methods.go
+++ b/controllers/operator_methods.go
@@ -39,7 +39,7 @@ func (r *GitlabPagesSiteReconciler) getOidcSecret(ctx context.Context, gitlabPag
 
 	// Ensure we have a valid ApplicationRegistration registration, this only happens when we have exactly one ApplicationRegistration
 	// with a status set by the authz-operator and this status says provisioning succeeded
-	if !reflect.DeepEqual(appReg.Status, authzalpha1.ApplicationRegistrationStatus{}) && appReg.Status.ProvisioningStatus != "Created" {
+	if !reflect.DeepEqual(appReg.Status, authzalpha1.ApplicationRegistrationStatus{}) && appReg.Status.ClientCredentialsSecret != "oidc-client-secret" {
 		meta.SetStatusCondition(&gitlabPagesSite.Status.Conditions, metav1.Condition{
 			Type:    webservicescernchv1alpha1.ConditionTypeGitlabPagesSiteCreated,
 			Status:  metav1.ConditionFalse,
-- 
GitLab


From 43ff2027a33e9ecc8d1e3f826444d80f2923ad4f Mon Sep 17 00:00:00 2001
From: Francisco Borges Aurindo Barros
 <francisco.borges.aurindo.barros@cern.ch>
Date: Wed, 4 Dec 2024 18:19:19 +0100
Subject: [PATCH 2/2] Apply 1 suggestion(s) to 1 file(s)

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

diff --git a/controllers/operator_methods.go b/controllers/operator_methods.go
index 26a8ed2..5f63d59 100644
--- a/controllers/operator_methods.go
+++ b/controllers/operator_methods.go
@@ -51,7 +51,7 @@ func (r *GitlabPagesSiteReconciler) getOidcSecret(ctx context.Context, gitlabPag
 			return nil, err
 		}
 
-		err := fmt.Errorf("ApplicationRegistration %v still doesn't have ProvisioningStatus set to Created", appReg.Name)
+		err := fmt.Errorf("ApplicationRegistration %v still doesn't have ClientCredentialsSecret status set to 'oidc-client-secret'", appReg.Name)
 		r.logger.Info(err.Error())
 		return nil, err
 	}
-- 
GitLab