@@ -10,8 +10,8 @@ import (
1010 "time"
1111
1212 "github.com/github/deployment-tracker/pkg/deploymentrecord"
13- "github.com/github/deployment-tracker/pkg/image "
14- "github.com/github/deployment-tracker/pkg/metrics "
13+ "github.com/github/deployment-tracker/pkg/dtmetrics "
14+ "github.com/github/deployment-tracker/pkg/ociutil "
1515 "k8s.io/apimachinery/pkg/runtime/schema"
1616 "k8s.io/apimachinery/pkg/types"
1717 amcache "k8s.io/apimachinery/pkg/util/cache"
@@ -271,14 +271,14 @@ func (c *Controller) processNextItem(ctx context.Context) bool {
271271 dur := time .Since (start )
272272
273273 if err == nil {
274- metrics .EventsProcessedOk .WithLabelValues (event .EventType ).Inc ()
275- metrics .EventsProcessedTimer .WithLabelValues ("ok" ).Observe (dur .Seconds ())
274+ dtmetrics .EventsProcessedOk .WithLabelValues (event .EventType ).Inc ()
275+ dtmetrics .EventsProcessedTimer .WithLabelValues ("ok" ).Observe (dur .Seconds ())
276276
277277 c .workqueue .Forget (event )
278278 return true
279279 }
280- metrics .EventsProcessedTimer .WithLabelValues ("failed" ).Observe (dur .Seconds ())
281- metrics .EventsProcessedFailed .WithLabelValues (event .EventType ).Inc ()
280+ dtmetrics .EventsProcessedTimer .WithLabelValues ("failed" ).Observe (dur .Seconds ())
281+ dtmetrics .EventsProcessedFailed .WithLabelValues (event .EventType ).Inc ()
282282
283283 // Requeue on error with rate limiting
284284 slog .Error ("Failed to process event, requeuing" ,
@@ -443,7 +443,7 @@ func (c *Controller) recordContainer(ctx context.Context, pod *corev1.Pod, conta
443443 }
444444
445445 // Extract image name and tag
446- imageName , version := image .ExtractName (container .Image )
446+ imageName , version := ociutil .ExtractName (container .Image )
447447
448448 // Create deployment record
449449 record := deploymentrecord .NewDeploymentRecord (
@@ -676,14 +676,14 @@ func getContainerDigest(pod *corev1.Pod, containerName string) string {
676676 // Check regular container statuses
677677 for _ , status := range pod .Status .ContainerStatuses {
678678 if status .Name == containerName {
679- return image .ExtractDigest (status .ImageID )
679+ return ociutil .ExtractDigest (status .ImageID )
680680 }
681681 }
682682
683683 // Check init container statuses
684684 for _ , status := range pod .Status .InitContainerStatuses {
685685 if status .Name == containerName {
686- return image .ExtractDigest (status .ImageID )
686+ return ociutil .ExtractDigest (status .ImageID )
687687 }
688688 }
689689
0 commit comments