Skip to content

Commit b6e6510

Browse files
author
Josef Karasek
committed
Bug 1952576: csv_succeeded metric not present
`csv_succeeded` metric is lost between pod restarts. This is because this metric is only emitted when CSV.Status is changed. Signed-off-by: Josef Karasek <[email protected]>
1 parent cd40303 commit b6e6510

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/controller/operators/olm/operator.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,11 +1115,12 @@ func (a *Operator) syncClusterServiceVersion(obj interface{}) (syncError error)
11151115
} else {
11161116
syncError = fmt.Errorf("error transitioning ClusterServiceVersion: %s and error updating CSV status: %s", syncError, updateErr)
11171117
}
1118-
} else {
1119-
metrics.EmitCSVMetric(clusterServiceVersion, outCSV)
11201118
}
11211119
}
11221120

1121+
// always emit csv metrics
1122+
metrics.EmitCSVMetric(clusterServiceVersion, outCSV)
1123+
11231124
operatorGroup := a.operatorGroupFromAnnotations(logger, clusterServiceVersion)
11241125
if operatorGroup == nil {
11251126
logger.WithField("reason", "no operatorgroup found for active CSV").Debug("skipping potential RBAC creation in target namespaces")

0 commit comments

Comments
 (0)