vault/enos/k8s/enos-modules-k8s.hcl
Ryan Cragun c8e6169d5d
VAULT-31402: Add verification for all container images (#28605)
* VAULT-31402: Add verification for all container images

Add verification for all container images that are generated as part of
the build. Before this change we only ever tested a limited subset of
"default" containers based on Alpine Linux that we publish via the
Docker hub and AWS ECR.

Now we support testing all Alpine and UBI based container images. We
also verify the repository and tag information embedded in each by
deploying them and verifying the repo and tag metadata match our
expectations.

This does change the k8s scenario interface quite a bit. We now take in
an archive image and set image/repo/tag information based on the
scenario variants.

To enable this I also needed to add `tar` to the UBI base image. It was
already available in the Alpine image and is used to copy utilities to
the image when deploying and configuring the cluster via Enos.

Since some images contain multiple tags we also add samples for each
image and randomly select which variant to test on a given PR.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2024-10-07 10:16:22 -06:00

53 lines
1.1 KiB
HCL

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
module "create_kind_cluster" {
source = "../modules/local_kind_cluster"
}
module "load_docker_image" {
source = "../modules/load_docker_image"
}
module "k8s_deploy_vault" {
source = "../modules/k8s_deploy_vault"
vault_instance_count = var.instance_count
}
module "k8s_verify_build_date" {
source = "../modules/k8s_vault_verify_build_date"
vault_instance_count = var.instance_count
}
module "k8s_verify_replication" {
source = "../modules/k8s_vault_verify_replication"
vault_instance_count = var.instance_count
}
module "k8s_verify_ui" {
source = "../modules/k8s_vault_verify_ui"
vault_instance_count = var.instance_count
}
module "k8s_verify_version" {
source = "../modules/k8s_vault_verify_version"
vault_instance_count = var.instance_count
vault_product_version = var.vault_version
vault_product_revision = var.vault_revision
}
module "k8s_verify_write_data" {
source = "../modules/k8s_vault_verify_write_data"
vault_instance_count = var.instance_count
}
module "read_license" {
source = "../modules/read_license"
}