From 4836dbbdf6d96de6f4d30f294bc0cd082b6a76e0 Mon Sep 17 00:00:00 2001 From: Jamon Date: Thu, 11 Apr 2024 21:28:36 -0400 Subject: [PATCH] getting closer with istio imagetest harness Signed-off-by: Jamon --- images/istio/tests/gateway/main.tf | 2 +- images/istio/tests/install-cni/main.tf | 2 +- images/istio/tests/main.tf | 27 ++++++++++---------------- images/istio/tests/test-gateway.sh | 4 ++-- images/istio/tests/virtualservice.yaml | 4 ++-- 5 files changed, 16 insertions(+), 23 deletions(-) diff --git a/images/istio/tests/gateway/main.tf b/images/istio/tests/gateway/main.tf index 8e4f8c8da1..8e0b4e0c69 100644 --- a/images/istio/tests/gateway/main.tf +++ b/images/istio/tests/gateway/main.tf @@ -8,7 +8,7 @@ terraform { variable "values" { type = any default = { - revision = "istio" + revision = "istio-system" service = { type = "ClusterIP" } diff --git a/images/istio/tests/install-cni/main.tf b/images/istio/tests/install-cni/main.tf index 6c554242d1..79f0a5eccb 100644 --- a/images/istio/tests/install-cni/main.tf +++ b/images/istio/tests/install-cni/main.tf @@ -8,7 +8,7 @@ terraform { variable "values" { type = any default = { - revision = "istio" + revision = "istio-system" cni = { image = "cgr.dev/chainguard/istio-install-cni" tag = "latest" diff --git a/images/istio/tests/main.tf b/images/istio/tests/main.tf index 58edbe5f6c..26099fa667 100644 --- a/images/istio/tests/main.tf +++ b/images/istio/tests/main.tf @@ -24,21 +24,6 @@ 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" { @@ -88,7 +73,8 @@ module "helm_istiod" { # will be managed. revision = local.namespace pilot = { - image = data.oci_string.ref["pilot"].registry_repo + hub = dirname(data.oci_string.ref["pilot"].registry_repo) + image = basename(data.oci_string.ref["pilot"].registry_repo) tag = data.oci_string.ref["pilot"].pseudo_tag } global = { @@ -121,6 +107,7 @@ module "helm_gateway" { service = { type = "ClusterIP" } + # this isn't part of the gateway chart, is it used? global = { istioNamespace = local.namespace # These Helm charts do not like slashes in the image param. @@ -155,7 +142,8 @@ module "helm_install-cni" { tag = data.oci_string.ref["install-cni"].registry_repo } cni = { - image = data.oci_string.ref["install-cni"].registry_repo + hub = dirname(data.oci_string.ref["install-cni"].registry_repo) + image = basename(data.oci_string.ref["install-cni"].registry_repo) tag = data.oci_string.ref["install-cni"].pseudo_tag # These two settings are highly dependent on the K8s cluster setup. @@ -178,6 +166,7 @@ resource "imagetest_feature" "this" { name = "Create istio-system namespace" cmd = <