From 2e26e5ff0b3c10b28704fd1e9f5f8007796754c7 Mon Sep 17 00:00:00 2001 From: Jamon Date: Thu, 11 Apr 2024 18:24:45 -0400 Subject: [PATCH] refactor istio to use imagetest_harness_k3s Signed-off-by: Jamon --- images/istio/tests/istiod/main.tf | 2 +- images/istio/tests/main.tf | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/images/istio/tests/istiod/main.tf b/images/istio/tests/istiod/main.tf index 64e50f9c8e..12a6065549 100644 --- a/images/istio/tests/istiod/main.tf +++ b/images/istio/tests/istiod/main.tf @@ -11,7 +11,7 @@ variable "values" { revision = "istio-system" pilot = { image = "cgr.dev/chainguard/istio-pilot" - tag = "latest" + tag = "latest" } global = { istioNamespace = "istio-system" diff --git a/images/istio/tests/main.tf b/images/istio/tests/main.tf index d84d60d0bd..58edbe5f6c 100644 --- a/images/istio/tests/main.tf +++ b/images/istio/tests/main.tf @@ -24,6 +24,21 @@ data "oci_string" "ref" { input = each.value } +data "oci_exec_test" "proxy-version" { + digest = var.digests.proxy + script = "docker run --rm $IMAGE_NAME --version" +} + +data "oci_exec_test" "pilot-version" { + digest = var.digests.pilot + script = "docker run --rm $IMAGE_NAME --version" +} + +data "oci_exec_test" "operator-version" { + digest = var.digests.operator + script = "docker run --rm $IMAGE_NAME version" +} + data "imagetest_inventory" "this" {} resource "imagetest_harness_k3s" "this" { @@ -74,7 +89,7 @@ module "helm_istiod" { revision = local.namespace pilot = { image = data.oci_string.ref["pilot"].registry_repo - tag = data.oci_string.ref["pilot"].pseudo_tag + tag = data.oci_string.ref["pilot"].pseudo_tag } global = { istioNamespace = local.namespace