Skip to content

Commit

Permalink
Bug 1952576: csv_succeeded metric not present
Browse files Browse the repository at this point in the history
`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 <jkarasek@redhat.com>
  • Loading branch information
Josef Karasek committed Jun 23, 2021
1 parent cd40303 commit b6e6510
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/controller/operators/olm/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1115,11 +1115,12 @@ func (a *Operator) syncClusterServiceVersion(obj interface{}) (syncError error)
} else {
syncError = fmt.Errorf("error transitioning ClusterServiceVersion: %s and error updating CSV status: %s", syncError, updateErr)
}
} else {
metrics.EmitCSVMetric(clusterServiceVersion, outCSV)
}
}

// always emit csv metrics
metrics.EmitCSVMetric(clusterServiceVersion, outCSV)

operatorGroup := a.operatorGroupFromAnnotations(logger, clusterServiceVersion)
if operatorGroup == nil {
logger.WithField("reason", "no operatorgroup found for active CSV").Debug("skipping potential RBAC creation in target namespaces")
Expand Down

0 comments on commit b6e6510

Please sign in to comment.