Skip to content
Snippets Groups Projects

WIP: Update reconcile loop to check Secret instead of provisionStatus on ApplicationRegistration

Closed Francisco Borges Aurindo Barros requested to merge fix-applicationregistration-check into master
All threads resolved!
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -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
}
Loading