From 3fa590c780ed581d85ff4f2de0f552c8dcac4aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20J=2E=20Salmer=C3=B3n=20Garc=C3=ADa?= Date: Mon, 21 Apr 2025 11:32:48 +0200 Subject: [PATCH] [bitnami/envoy-gateway] ci: :construction_worker: Add VIB files (#80446) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [bitnami/envoy-gateway] ci: :construction_worker: Add VIB files Signed-off-by: Javier J. Salmerón García * chore: :bulb: Improve comments Signed-off-by: Javier J. Salmerón García --------- Signed-off-by: Javier J. Salmerón García --- .vib/envoy-gateway/goss/goss.yaml | 12 +++++ .vib/envoy-gateway/goss/vars.yaml | 9 ++++ .vib/envoy-gateway/vib-verify.json | 73 ++++++++++++++++++++++++++++ .vib/envoy-ratelimit/goss/goss.yaml | 12 +++++ .vib/envoy-ratelimit/goss/vars.yaml | 6 +++ .vib/envoy-ratelimit/vib-verify.json | 73 ++++++++++++++++++++++++++++ 6 files changed, 185 insertions(+) create mode 100644 .vib/envoy-gateway/goss/goss.yaml create mode 100644 .vib/envoy-gateway/goss/vars.yaml create mode 100644 .vib/envoy-gateway/vib-verify.json create mode 100644 .vib/envoy-ratelimit/goss/goss.yaml create mode 100644 .vib/envoy-ratelimit/goss/vars.yaml create mode 100644 .vib/envoy-ratelimit/vib-verify.json diff --git a/.vib/envoy-gateway/goss/goss.yaml b/.vib/envoy-gateway/goss/goss.yaml new file mode 100644 index 000000000000..7f9b90cfb4fe --- /dev/null +++ b/.vib/envoy-gateway/goss/goss.yaml @@ -0,0 +1,12 @@ +# Copyright Broadcom, Inc. All Rights Reserved. +# SPDX-License-Identifier: APACHE-2.0 + +gossfile: + # Load scripts from .vib/common/goss/templates + ../../common/goss/templates/check-app-version.yaml: {} + ../../common/goss/templates/check-binaries.yaml: {} + ../../common/goss/templates/check-broken-symlinks.yaml: {} + ../../common/goss/templates/check-ca-certs.yaml: {} + ../../common/goss/templates/check-directories.yaml: {} + ../../common/goss/templates/check-linked-libraries.yaml: {} + ../../common/goss/templates/check-spdx.yaml: {} diff --git a/.vib/envoy-gateway/goss/vars.yaml b/.vib/envoy-gateway/goss/vars.yaml new file mode 100644 index 000000000000..091cd5d062c9 --- /dev/null +++ b/.vib/envoy-gateway/goss/vars.yaml @@ -0,0 +1,9 @@ +binaries: + - envoy-gateway +root_dir: /opt/bitnami +directories: + - paths: + - /opt/bitnami/envoy-gateway +version: + bin_name: envoy-gateway + flag: version diff --git a/.vib/envoy-gateway/vib-verify.json b/.vib/envoy-gateway/vib-verify.json new file mode 100644 index 000000000000..e753dbc375ee --- /dev/null +++ b/.vib/envoy-gateway/vib-verify.json @@ -0,0 +1,73 @@ +{ + "context": { + "resources": { + "url": "{SHA_ARCHIVE}", + "path": "{VIB_ENV_PATH}" + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" + }, + "phases": { + "package": { + "actions": [ + { + "action_id": "container-image-package", + "params": { + "application": { + "details": { + "name": "{VIB_ENV_CONTAINER}", + "tag": "{VIB_ENV_TAG}" + } + }, + "architectures": [ + "linux/amd64", + "linux/arm64" + ] + } + }, + { + "action_id": "container-image-lint", + "params": { + "threshold": "error" + } + } + ] + }, + "verify": { + "actions": [ + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "envoy-gateway/goss/goss.yaml", + "vars_file": "envoy-gateway/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-envoy-gateway" + } + } + } + }, + { + "action_id": "trivy", + "params": { + "threshold": "LOW", + "vuln_type": [ + "OS" + ] + } + }, + { + "action_id": "grype", + "params": { + "threshold": "CRITICAL", + "package_type": [ + "OS" + ] + } + } + ] + } + } +} diff --git a/.vib/envoy-ratelimit/goss/goss.yaml b/.vib/envoy-ratelimit/goss/goss.yaml new file mode 100644 index 000000000000..3aa8b5a1d52e --- /dev/null +++ b/.vib/envoy-ratelimit/goss/goss.yaml @@ -0,0 +1,12 @@ +# Copyright Broadcom, Inc. All Rights Reserved. +# SPDX-License-Identifier: APACHE-2.0 + +gossfile: + # Load scripts from .vib/common/goss/templates + # This application contains no versioning as we track it at commit level + ../../common/goss/templates/check-binaries.yaml: {} + ../../common/goss/templates/check-broken-symlinks.yaml: {} + ../../common/goss/templates/check-ca-certs.yaml: {} + ../../common/goss/templates/check-directories.yaml: {} + ../../common/goss/templates/check-linked-libraries.yaml: {} + ../../common/goss/templates/check-spdx.yaml: {} diff --git a/.vib/envoy-ratelimit/goss/vars.yaml b/.vib/envoy-ratelimit/goss/vars.yaml new file mode 100644 index 000000000000..9404d90ea909 --- /dev/null +++ b/.vib/envoy-ratelimit/goss/vars.yaml @@ -0,0 +1,6 @@ +binaries: + - ratelimit +root_dir: /opt/bitnami +directories: + - paths: + - /opt/bitnami/envoy-ratelimit diff --git a/.vib/envoy-ratelimit/vib-verify.json b/.vib/envoy-ratelimit/vib-verify.json new file mode 100644 index 000000000000..e8d940967ad4 --- /dev/null +++ b/.vib/envoy-ratelimit/vib-verify.json @@ -0,0 +1,73 @@ +{ + "context": { + "resources": { + "url": "{SHA_ARCHIVE}", + "path": "{VIB_ENV_PATH}" + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" + }, + "phases": { + "package": { + "actions": [ + { + "action_id": "container-image-package", + "params": { + "application": { + "details": { + "name": "{VIB_ENV_CONTAINER}", + "tag": "{VIB_ENV_TAG}" + } + }, + "architectures": [ + "linux/amd64", + "linux/arm64" + ] + } + }, + { + "action_id": "container-image-lint", + "params": { + "threshold": "error" + } + } + ] + }, + "verify": { + "actions": [ + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "envoy-ratelimit/goss/goss.yaml", + "vars_file": "envoy-ratelimit/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-envoy-ratelimit" + } + } + } + }, + { + "action_id": "trivy", + "params": { + "threshold": "LOW", + "vuln_type": [ + "OS" + ] + } + }, + { + "action_id": "grype", + "params": { + "threshold": "CRITICAL", + "package_type": [ + "OS" + ] + } + } + ] + } + } +}