diff --git a/controllers/operator_methods.go b/controllers/operator_methods.go index 7aa2e959a900857940a568d1679c938d726ccc74..5f63d59d2ce0080e28d64e721d5d463610a03711 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, @@ -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 }