Skip to content

Commit 5b38f05

Browse files
committed
Preserve original .status.lastUpdateTime in copied CSVs.
Currently, CSVs are mirrored into the namespaces that are watched by the operator they represent. At the moment a copied CSV is updated, its .status.lastUpdateTime field is set to the current time, rather than using the same timestamp that appears on the original CSV's status. As the size of a cluster grows, it becomes increasingly unlikely that these two timestamps will have the same value. This means that there's almost always a non-empty diff between the original and any given copy, thereby triggering an update to the copy even if nothing else has changed in the original.
1 parent cfda6a3 commit 5b38f05

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

pkg/controller/operators/olm/operatorgroup.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,6 @@ func (a *Operator) copyToNamespace(csv *v1alpha1.ClusterServiceVersion, namespac
734734
logger.Debug("updating status")
735735
// Must use fetchedCSV because UpdateStatus(...) checks resource UID.
736736
fetchedCSV.Status = newCSV.Status
737-
fetchedCSV.Status.LastUpdateTime = a.now()
738737
if fetchedCSV, err = a.client.OperatorsV1alpha1().ClusterServiceVersions(namespace).UpdateStatus(context.TODO(), fetchedCSV, metav1.UpdateOptions{}); err != nil {
739738
logger.WithError(err).Error("status update for target CSV failed")
740739
return nil, err

0 commit comments

Comments
 (0)