@@ -194,6 +194,7 @@ func (r *OCIRepositoryReconciler) Reconcile(ctx context.Context, req ctrl.Reques
194
194
summarizeHelper := summarize .NewHelper (r .EventRecorder , patchHelper )
195
195
summarizeOpts := []summarize.Option {
196
196
summarize .WithConditions (ociRepositoryReadyCondition ),
197
+ summarize .WithBiPolarityConditionTypes (sourcev1 .SourceVerifiedCondition ),
197
198
summarize .WithReconcileResult (recResult ),
198
199
summarize .WithReconcileError (retErr ),
199
200
summarize .WithIgnoreNotFound (),
@@ -297,6 +298,14 @@ func (r *OCIRepositoryReconciler) reconcileSource(ctx context.Context, obj *sour
297
298
ctxTimeout , cancel := context .WithTimeout (ctx , obj .Spec .Timeout .Duration )
298
299
defer cancel ()
299
300
301
+ // Remove previously failed source verification status conditions. The
302
+ // failing verification should be recalculated. But an existing successful
303
+ // verification need not be removed as it indicates verification of previous
304
+ // version.
305
+ if conditions .IsFalse (obj , sourcev1 .SourceVerifiedCondition ) {
306
+ conditions .Delete (obj , sourcev1 .SourceVerifiedCondition )
307
+ }
308
+
300
309
options := r .craneOptions (ctxTimeout , obj .Spec .Insecure )
301
310
302
311
// Generate the registry credential keychain either from static credentials or using cloud OIDC
0 commit comments