From 5d83312857d24d52ff3d6138e13f906f46be03e4 Mon Sep 17 00:00:00 2001 From: Jacob Bohanon Date: Thu, 6 Jun 2024 18:17:45 -0400 Subject: [PATCH] add default curl pod --- testutils/kube/curl.go | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/testutils/kube/curl.go b/testutils/kube/curl.go index 257d68d..5435cdd 100644 --- a/testutils/kube/curl.go +++ b/testutils/kube/curl.go @@ -13,17 +13,21 @@ import ( "github.com/solo-io/go-utils/testutils/kubectl" ) +var ( + DefaultCurlImage = Image{ + Registry: "curlimages", + Repository: "curl", + Tag: "", + Digest: "aa45e9d93122a3cfdf8d7de272e2798ea63733eeee6d06bd2ee4f2f8c4027d7c", + PullPolicy: "IfNotPresent", + } +) + func CurlWithEphemeralPod(ctx context.Context, logger io.Writer, kubeContext, fromns, frompod string, args ...string) string { execParams := EphemeralPodParams{ - Logger: logger, - KubeContext: kubeContext, - Image: Image{ - Registry: "curlimages", - Repository: "curl", - Tag: "", - Digest: "aa45e9d93122a3cfdf8d7de272e2798ea63733eeee6d06bd2ee4f2f8c4027d7c", - PullPolicy: "IfNotPresent", - }, + Logger: logger, + KubeContext: kubeContext, + Image: DefaultCurlImage, FromContainer: "curl", FromNamespace: fromns, FromPod: frompod,