diff --git a/images/velero-plugin-for-aws/README.md b/images/velero-plugin-for-aws/README.md new file mode 100644 index 0000000000..fa8d91b916 --- /dev/null +++ b/images/velero-plugin-for-aws/README.md @@ -0,0 +1,28 @@ + +# velero-plugin-for-aws +| | | +| - | - | +| **OCI Reference** | `cgr.dev/chainguard/velero-plugin-for-aws` | + + +* [View Image in Chainguard Academy](https://edu.chainguard.dev/chainguard/chainguard-images/reference/velero-plugin-for-aws/overview/) +* [View Image Catalog](https://console.enforce.dev/images/catalog) for a full list of available tags. +* [Contact Chainguard](https://www.chainguard.dev/chainguard-images) for enterprise support, SLAs, and access to older tags.* + +--- + + + + + + + +## Download this Image +The image is available on `cgr.dev`: + +``` +docker pull cgr.dev/chainguard/velero-plugin-for-aws:latest +``` + + + diff --git a/images/velero-plugin-for-aws/config/main.tf b/images/velero-plugin-for-aws/config/main.tf new file mode 100644 index 0000000000..4232ccbacc --- /dev/null +++ b/images/velero-plugin-for-aws/config/main.tf @@ -0,0 +1,30 @@ +terraform { + required_providers { + apko = { source = "chainguard-dev/apko" } + } +} + +variable "extra_packages" { + description = "The additional packages to install" + default = [] +} + +data "apko_config" "this" { + config_contents = file("${path.module}/template.apko.yaml") + extra_packages = var.extra_packages +} + +module "accts" { source = "../../../tflib/accts" } + +output "config" { + value = jsonencode({ + contents = { + packages = var.extra_packages + } + accounts = module.accts.block + entrypoint = { + command = "/bin/cp-plugin /plugins/velero-plugin-for-aws /target/velero-plugin-for-aws" + } + }) +} + diff --git a/images/velero-plugin-for-aws/main.tf b/images/velero-plugin-for-aws/main.tf new file mode 100644 index 0000000000..a2374ff647 --- /dev/null +++ b/images/velero-plugin-for-aws/main.tf @@ -0,0 +1,51 @@ +terraform { + required_providers { + oci = { source = "chainguard-dev/oci" } + } +} + +locals { + components = toset(["velero-plugin-for-aws"]) +} + +variable "target_repository" { + description = "The docker repo into which the image and attestations should be published." +} + +module "config" { + for_each = local.components + source = "./config" + extra_packages = [each.key, "${each.key}-compat"] +} + +module "velero-plugin-for-csi" { + for_each = local.components + source = "../../tflib/publisher" + name = basename(path.module) + target_repository = var.target_repository + config = module.config[each.key].config + + build-dev = true + main_package = each.key +} + +module "test" { + for_each = local.components + source = "./tests" + digest = module.velero-plugin-for-csi[each.key].image_ref +} + +resource "oci_tag" "latest" { + for_each = local.components + depends_on = [module.test] + digest_ref = module.velero-plugin-for-csi[each.key].image_ref + tag = "latest" +} + +resource "oci_tag" "latest-dev" { + for_each = local.components + depends_on = [module.test] + digest_ref = module.velero-plugin-for-csi[each.key].dev_ref + tag = "latest-dev" +} + diff --git a/images/velero-plugin-for-aws/metadata.yaml b/images/velero-plugin-for-aws/metadata.yaml new file mode 100644 index 0000000000..4a2f419049 --- /dev/null +++ b/images/velero-plugin-for-aws/metadata.yaml @@ -0,0 +1,10 @@ +name: velero-plugin-for-aws +image: cgr.dev/chainguard/velero-plugin-for-aws +logo: https://storage.googleapis.com/chainguard-academy/logos/velero-plugin-for-aws.svg +endoflife: "" +console_summary: "" +short_description: Plugins to support Velero on AWS +compatibility_notes: "" +readme_file: README.md +upstream_url: https://github.com/vmware-tanzu/velero-plugin-for-aws +keywords: [] diff --git a/images/velero-plugin-for-aws/tests/EXAMPLE_TEST.sh b/images/velero-plugin-for-aws/tests/EXAMPLE_TEST.sh new file mode 100644 index 0000000000..17c5be4f08 --- /dev/null +++ b/images/velero-plugin-for-aws/tests/EXAMPLE_TEST.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -o errexit -o nounset -o errtrace -o pipefail -x + +# TODO: Implement this test. +echo "The test is not implemented yet." \ No newline at end of file diff --git a/images/velero-plugin-for-aws/tests/main.tf b/images/velero-plugin-for-aws/tests/main.tf new file mode 100644 index 0000000000..02fb56a89c --- /dev/null +++ b/images/velero-plugin-for-aws/tests/main.tf @@ -0,0 +1,15 @@ +terraform { + required_providers { + oci = { source = "chainguard-dev/oci" } + } +} + +variable "digest" { + description = "The image digest to run tests over." +} + +data "oci_exec_test" "manifest" { + digest = var.digest + script = "./EXAMPLE_TEST.sh" + working_dir = path.module +} diff --git a/images/velero-plugin-for-csi/README.md b/images/velero-plugin-for-csi/README.md new file mode 100644 index 0000000000..cd9c26d1ae --- /dev/null +++ b/images/velero-plugin-for-csi/README.md @@ -0,0 +1,28 @@ + +# velero-plugin-for-csi +| | | +| - | - | +| **OCI Reference** | `cgr.dev/chainguard/velero-plugin-for-csi` | + + +* [View Image in Chainguard Academy](https://edu.chainguard.dev/chainguard/chainguard-images/reference/velero-plugin-for-csi/overview/) +* [View Image Catalog](https://console.enforce.dev/images/catalog) for a full list of available tags. +* [Contact Chainguard](https://www.chainguard.dev/chainguard-images) for enterprise support, SLAs, and access to older tags.* + +--- + + + + + + + +## Download this Image +The image is available on `cgr.dev`: + +``` +docker pull cgr.dev/chainguard/velero-plugin-for-csi:latest +``` + + + diff --git a/images/velero-plugin-for-csi/config/main.tf b/images/velero-plugin-for-csi/config/main.tf new file mode 100644 index 0000000000..f18e2bdf73 --- /dev/null +++ b/images/velero-plugin-for-csi/config/main.tf @@ -0,0 +1,30 @@ +terraform { + required_providers { + apko = { source = "chainguard-dev/apko" } + } +} + +variable "extra_packages" { + description = "The additional packages to install" + default = [] +} + +data "apko_config" "this" { + config_contents = file("${path.module}/template.apko.yaml") + extra_packages = var.extra_packages +} + +module "accts" { source = "../../../tflib/accts" } + +output "config" { + value = jsonencode({ + contents = { + packages = var.extra_packages + } + accounts = module.accts.block + entrypoint = { + command = "/bin/cp-plugin /plugins/velero-plugin-for-csi /target/velero-plugin-for-csi" + } + }) +} + diff --git a/images/velero-plugin-for-csi/main.tf b/images/velero-plugin-for-csi/main.tf new file mode 100644 index 0000000000..098d71534d --- /dev/null +++ b/images/velero-plugin-for-csi/main.tf @@ -0,0 +1,51 @@ +terraform { + required_providers { + oci = { source = "chainguard-dev/oci" } + } +} + +locals { + components = toset(["velero-plugin-for-csi"]) +} + +variable "target_repository" { + description = "The docker repo into which the image and attestations should be published." +} + +module "config" { + for_each = local.components + source = "./config" + extra_packages = [each.key, "${each.key}-compat"] +} + +module "velero-plugin-for-csi" { + for_each = local.components + source = "../../tflib/publisher" + name = basename(path.module) + target_repository = var.target_repository + config = module.config[each.key].config + + build-dev = true + main_package = each.key +} + +module "test" { + for_each = local.components + source = "./tests" + digest = module.velero-plugin-for-csi[each.key].image_ref +} + +resource "oci_tag" "latest" { + for_each = local.components + depends_on = [module.test] + digest_ref = module.velero-plugin-for-csi[each.key].image_ref + tag = "latest" +} + +resource "oci_tag" "latest-dev" { + for_each = local.components + depends_on = [module.test] + digest_ref = module.velero-plugin-for-csi[each.key].dev_ref + tag = "latest-dev" +} + diff --git a/images/velero-plugin-for-csi/metadata.yaml b/images/velero-plugin-for-csi/metadata.yaml new file mode 100644 index 0000000000..4439f0a201 --- /dev/null +++ b/images/velero-plugin-for-csi/metadata.yaml @@ -0,0 +1,10 @@ +name: velero-plugin-for-csi +image: cgr.dev/chainguard/velero-plugin-for-csi +logo: https://storage.googleapis.com/chainguard-academy/logos/velero-plugin-for-csi.svg +endoflife: "" +console_summary: "" +short_description: Velero plugins for integrating with CSI snapshot API +compatibility_notes: "" +readme_file: README.md +upstream_url: https://github.com/vmware-tanzu/velero-plugin-for-csi +keywords: [] diff --git a/images/velero-plugin-for-csi/tests/EXAMPLE_TEST.sh b/images/velero-plugin-for-csi/tests/EXAMPLE_TEST.sh new file mode 100644 index 0000000000..17c5be4f08 --- /dev/null +++ b/images/velero-plugin-for-csi/tests/EXAMPLE_TEST.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -o errexit -o nounset -o errtrace -o pipefail -x + +# TODO: Implement this test. +echo "The test is not implemented yet." \ No newline at end of file diff --git a/images/velero-plugin-for-csi/tests/main.tf b/images/velero-plugin-for-csi/tests/main.tf new file mode 100644 index 0000000000..02fb56a89c --- /dev/null +++ b/images/velero-plugin-for-csi/tests/main.tf @@ -0,0 +1,15 @@ +terraform { + required_providers { + oci = { source = "chainguard-dev/oci" } + } +} + +variable "digest" { + description = "The image digest to run tests over." +} + +data "oci_exec_test" "manifest" { + digest = var.digest + script = "./EXAMPLE_TEST.sh" + working_dir = path.module +} diff --git a/main.tf b/main.tf index 6dbc21ce26..9acb73c39a 100644 --- a/main.tf +++ b/main.tf @@ -1428,6 +1428,16 @@ module "velero" { target_repository = "${var.target_repository}/velero" } +module "velero-plugin-for-aws" { + source = "./images/velero-plugin-for-aws" + target_repository = "${var.target_repository}/velero-plugin-for-aws" +} + +module "velero-plugin-for-csi" { + source = "./images/velero-plugin-for-csi" + target_repository = "${var.target_repository}/velero-plugin-for-csi" +} + module "vertical-pod-autoscaler" { source = "./images/vertical-pod-autoscaler" target_repository = "${var.target_repository}/vertical-pod-autoscaler"