File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
porch/controllers/packagevariants/pkg/controllers/packagevariant Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,14 @@ func (r *PackageVariantReconciler) findAndUpdateExistingRevisions(ctx context.Co
269
269
var err error
270
270
for i , downstream := range downstreams {
271
271
if r .isUpToDate (pv , downstream ) {
272
+ if downstream .Spec .Lifecycle == porchapi .PackageRevisionLifecycleDeletionProposed {
273
+ // We proposed this package revision for deletion in the past, but now it
274
+ // matches our target, so we no longer want it to be deleted.
275
+ downstream .Spec .Lifecycle = porchapi .PackageRevisionLifecyclePublished
276
+ if err := r .Client .Update (ctx , downstream ); err != nil {
277
+ klog .Errorf ("error updating package revision lifecycle: %v" , err )
278
+ }
279
+ }
272
280
continue
273
281
}
274
282
if porchapi .LifecycleIsPublished (downstream .Spec .Lifecycle ) {
You can’t perform that action at this time.
0 commit comments