Skip to content

Commit

Permalink
fix(metrics): update storage metrics on gc (#2698)
Browse files Browse the repository at this point in the history
Signed-off-by: Eusebiu Petu <petu.eusebiu@gmail.com>
  • Loading branch information
eusebiu-constantin-petu-dbk authored Oct 3, 2024
1 parent d42ac4c commit cfbeeff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/storage/imagestore/imagestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -1634,6 +1634,11 @@ func (is *ImageStore) CleanupRepo(repo string, blobs []godigest.Digest, removeRe
}
}

// finally update metrics
if is.storeDriver.Name() == storageConstants.LocalStorageDriverName {
monitoring.SetStorageUsage(is.metrics, is.rootDir, repo)
}

return count, nil
}

Expand Down

0 comments on commit cfbeeff

Please sign in to comment.