mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-06 05:25:40 +00:00
add new counter metrics for backup deletion (#1280)
* compute backup deletion metrics (attempt, success, fail) Signed-off-by: fabito <fuechi@ciandt.com>
This commit is contained in:
committed by
Nolan Brubaker
parent
985479094f
commit
0167539a14
@@ -36,6 +36,7 @@ import (
|
||||
pkgbackup "github.com/heptio/velero/pkg/backup"
|
||||
"github.com/heptio/velero/pkg/generated/clientset/versioned/fake"
|
||||
informers "github.com/heptio/velero/pkg/generated/informers/externalversions"
|
||||
"github.com/heptio/velero/pkg/metrics"
|
||||
"github.com/heptio/velero/pkg/persistence"
|
||||
persistencemocks "github.com/heptio/velero/pkg/persistence/mocks"
|
||||
"github.com/heptio/velero/pkg/plugin/clientmgmt"
|
||||
@@ -61,6 +62,7 @@ func TestBackupDeletionControllerProcessQueueItem(t *testing.T) {
|
||||
sharedInformers.Velero().V1().BackupStorageLocations(),
|
||||
sharedInformers.Velero().V1().VolumeSnapshotLocations(),
|
||||
nil, // new plugin manager func
|
||||
metrics.NewServerMetrics(),
|
||||
).(*backupDeletionController)
|
||||
|
||||
// Error splitting key
|
||||
@@ -147,6 +149,7 @@ func setupBackupDeletionControllerTest(objects ...runtime.Object) *backupDeletio
|
||||
sharedInformers.Velero().V1().BackupStorageLocations(),
|
||||
sharedInformers.Velero().V1().VolumeSnapshotLocations(),
|
||||
func(logrus.FieldLogger) clientmgmt.Manager { return pluginManager },
|
||||
metrics.NewServerMetrics(),
|
||||
).(*backupDeletionController),
|
||||
|
||||
req: req,
|
||||
@@ -723,6 +726,7 @@ func TestBackupDeletionControllerDeleteExpiredRequests(t *testing.T) {
|
||||
sharedInformers.Velero().V1().BackupStorageLocations(),
|
||||
sharedInformers.Velero().V1().VolumeSnapshotLocations(),
|
||||
nil, // new plugin manager func
|
||||
metrics.NewServerMetrics(),
|
||||
).(*backupDeletionController)
|
||||
|
||||
fakeClock := &clock.FakeClock{}
|
||||
|
||||
Reference in New Issue
Block a user