Skip to content

Commit e7d4a8b

Browse files
committed
Reconcile proposals if cv.status.history got pruned
1 parent 865431f commit e7d4a8b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pkg/cvo/status.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,13 @@ func (optr *Operator) syncStatus(ctx context.Context, original, config *configv1
182182
if klog.V(6).Enabled() {
183183
klog.Infof("Apply config: %s", cmp.Diff(original, config))
184184
}
185+
if optr.shouldEnableProposalController() {
186+
if original != nil && len(config.Status.History) < len(original.Status.History) {
187+
klog.V(internal.Normal).Infof("Reconciling proposals because ClusterVersion.status.history got pruned")
188+
// queue optr.proposalController.Sync() to manage proposals
189+
optr.proposalController.Queue().Add(optr.proposalController.QueueKey())
190+
}
191+
}
185192
updated, err := applyClusterVersionStatus(ctx, optr.client.ConfigV1(), config, original)
186193
optr.rememberLastUpdate(updated)
187194
return err

0 commit comments

Comments
 (0)