fix: add ready condition to OAuth2ClientStatus (#122)

This commit is contained in:
andremarianiello
2023-03-27 11:34:35 -04:00
committed by GitHub
parent 6aba89e7a8
commit fdedbe52ad
18 changed files with 276 additions and 49 deletions

View File

@ -1,4 +1,4 @@
// Copyright © 2022 Ory Corp
// Copyright © 2023 Ory Corp
// SPDX-License-Identifier: Apache-2.0
// Code generated by mockery v1.0.0. DO NOT EDIT.

View File

@ -1,4 +1,4 @@
// Copyright © 2022 Ory Corp
// Copyright © 2023 Ory Corp
// SPDX-License-Identifier: Apache-2.0
package controllers
@ -357,12 +357,24 @@ func (r *OAuth2ClientReconciler) updateReconciliationStatusError(ctx context.Con
Code: code,
Description: err.Error(),
}
c.Status.Conditions = []hydrav1alpha1.OAuth2ClientCondition{
{
Type: hydrav1alpha1.OAuth2ClientConditionReady,
Status: hydrav1alpha1.ConditionFalse,
},
}
return r.updateClientStatus(ctx, c)
}
func (r *OAuth2ClientReconciler) ensureEmptyStatusError(ctx context.Context, c *hydrav1alpha1.OAuth2Client) error {
c.Status.ReconciliationError = hydrav1alpha1.ReconciliationError{}
c.Status.Conditions = []hydrav1alpha1.OAuth2ClientCondition{
{
Type: hydrav1alpha1.OAuth2ClientConditionReady,
Status: hydrav1alpha1.ConditionTrue,
},
}
return r.updateClientStatus(ctx, c)
}

View File

@ -1,4 +1,4 @@
// Copyright © 2022 Ory Corp
// Copyright © 2023 Ory Corp
// SPDX-License-Identifier: Apache-2.0
package controllers_test

View File

@ -1,4 +1,4 @@
// Copyright © 2022 Ory Corp
// Copyright © 2023 Ory Corp
// SPDX-License-Identifier: Apache-2.0
package controllers_test