Skip to content

Commit

Permalink
refactor istio to use imagetest_harness_k3s
Browse files Browse the repository at this point in the history
Signed-off-by: Jamon <[email protected]>
  • Loading branch information
jamonation committed Apr 11, 2024
1 parent cfffbc9 commit 2e26e5f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion images/istio/tests/istiod/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ variable "values" {
revision = "istio-system"
pilot = {
image = "cgr.dev/chainguard/istio-pilot"
tag = "latest"
tag = "latest"
}
global = {
istioNamespace = "istio-system"
Expand Down
17 changes: 16 additions & 1 deletion images/istio/tests/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2e26e5f

Please sign in to comment.