From a515d3f0f91d9d60844caa72d96ba22dd8c1c3b6 Mon Sep 17 00:00:00 2001
From: phantomjinx
Date: Tue, 12 Dec 2023 12:56:05 +0000
Subject: [PATCH] fix: Adds support for sha256 tag checksums #96
---
pkg/resources/container.go | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/pkg/resources/container.go b/pkg/resources/container.go
index a72671af46..be9dcf766a 100644
--- a/pkg/resources/container.go
+++ b/pkg/resources/container.go
@@ -2,6 +2,7 @@ package resources
import (
"os"
+ "strings"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/intstr"
@@ -62,5 +63,10 @@ func getImageFor(tag string, imageRepository string) string {
}
}
+ if strings.HasPrefix(tag, "sha256:") {
+ // tag is a sha checksum tag
+ return repository + "@" + tag
+ }
+
return repository + ":" + tag
}