From c497a8d6605af1e9c356f1eb7aad934c446a9e83 Mon Sep 17 00:00:00 2001 From: Public copy <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 4 Aug 2024 23:27:42 +0000 Subject: [PATCH] automated commit Signed-off-by: Public copy <41898282+github-actions[bot]@users.noreply.github.com> --- images/kyverno/tests/helm/main.tf | 15 +++++++++++---- images/kyverno/tests/main.tf | 9 ++++++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/images/kyverno/tests/helm/main.tf b/images/kyverno/tests/helm/main.tf index 6ade897d1e..9187ede9dd 100644 --- a/images/kyverno/tests/helm/main.tf +++ b/images/kyverno/tests/helm/main.tf @@ -51,13 +51,20 @@ variable "values" { } } +variable "chart_version" { + type = string + description = "If set, override the chart version to install for older versions of kyverno to test version-streamed images." + default = "" +} + module "helm" { source = "../../../../tflib/imagetest/helm" - name = "kyverno" - namespace = "kyverno" - repo = "https://kyverno.github.io/kyverno" - chart = "kyverno" + name = "kyverno" + namespace = "kyverno" + repo = "https://kyverno.github.io/kyverno" + chart = "kyverno" + chart_version = length(var.chart_version) > 0 ? var.chart_version : "" values = var.values } diff --git a/images/kyverno/tests/main.tf b/images/kyverno/tests/main.tf index 9fe98af509..b32a17630e 100644 --- a/images/kyverno/tests/main.tf +++ b/images/kyverno/tests/main.tf @@ -22,6 +22,12 @@ variable "digests" { # see https://github.com/docker-library/busybox/issues/134#issuecomment-1122717673 variable "target_repository" {} +variable "chart_version" { + type = string + description = "If set, override the chart version to install for older versions of kyverno to test version-streamed images." + default = "" +} + locals { parsed = { for k, v in var.digests : k => provider::oci::parse(v) } } data "imagetest_inventory" "this" {} @@ -51,7 +57,8 @@ locals { testing_wget_parsed = provider::oci::parse(apko_build.testing-wget.imag module "helm" { # Use a separate module because this chart is re-used by # the kyverno-policy-reporter tests - source = "./helm" + source = "./helm" + chart_version = var.chart_version values = { test = { image = {