From 1c194e0d043c26400f257a1b98883c0457d48593 Mon Sep 17 00:00:00 2001 From: Jamon Date: Sat, 13 Apr 2024 19:04:21 -0400 Subject: [PATCH] fix jenkins imagetest_harness_k3s compatibility Signed-off-by: Jamon --- images/jenkins/main.tf | 4 +--- images/jenkins/tests/controller/main.tf | 8 ++++---- images/jenkins/tests/main.tf | 23 +++++++---------------- 3 files changed, 12 insertions(+), 23 deletions(-) diff --git a/images/jenkins/main.tf b/images/jenkins/main.tf index c36de01c3c..d84fa61554 100644 --- a/images/jenkins/main.tf +++ b/images/jenkins/main.tf @@ -20,9 +20,7 @@ module "latest" { module "test-latest" { source = "./tests" - digests = { - controller = module.latest.image_ref - } + digest = module.latest.image_ref } resource "oci_tag" "latest" { diff --git a/images/jenkins/tests/controller/main.tf b/images/jenkins/tests/controller/main.tf index 4c6875e703..3cfe589830 100644 --- a/images/jenkins/tests/controller/main.tf +++ b/images/jenkins/tests/controller/main.tf @@ -1,14 +1,14 @@ - - // default values - these get overridden when the resource is called variable "values" { type = any default = { + namespace = "jenkins" fullnameOverride = "jenkins" + nameOverride = "jenkins" + create_namespace = true - nameOverride = "jenkins" controller = { - javaOpts = "-Djenkins.security.FIPS140.COMPLIANCE=true" + javaOpts = "" jenkinsOpts = "" admin = { createSecret = false diff --git a/images/jenkins/tests/main.tf b/images/jenkins/tests/main.tf index 297477f0fd..4458ccb469 100644 --- a/images/jenkins/tests/main.tf +++ b/images/jenkins/tests/main.tf @@ -9,17 +9,11 @@ locals { namespace = "jenkins" } -variable "digests" { +variable "digest" { description = "The image digest to run tests over." - type = object({ - controller = string - }) } -data "oci_string" "ref" { - for_each = var.digests - input = each.value -} +data "oci_string" "ref" { input = var.digest } data "imagetest_inventory" "this" {} @@ -28,9 +22,6 @@ resource "imagetest_harness_k3s" "this" { inventory = data.imagetest_inventory.this sandbox = { - envs = { - "UNUSED_NAMESPACE" = local.namespace - } mounts = [ { source = path.module @@ -44,12 +35,12 @@ module "helm_controller" { source = "./controller" values = { namespace = local.namespace - create_namespace = true fullnameOverride = local.namespace nameOverride = local.namespace + create_namespace = true controller = { - javaOpts = "-Djenkins.security.FIPS140.COMPLIANCE=true" + javaOpts = "" jenkinsOpts = "" installPlugins = false admin = { @@ -61,9 +52,9 @@ module "helm_controller" { } } image = { - registry = data.oci_string.ref["controller"].registry - repository = data.oci_string.ref["controller"].repo - tag = data.oci_string.ref["controller"].pseudo_tag + registry = data.oci_string.ref.registry + repository = data.oci_string.ref.repo + tag = data.oci_string.ref.pseudo_tag } } }