From 0f9097a014cf036ad4e12be409c310ebb4139614 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 13 Sep 2026 07:13:41 +0000 Subject: [PATCH] chore: update patternizer-managed files --- Makefile-common | 6 ++++++ pattern.sh | 48 ++---------------------------------------------- 2 files changed, 8 insertions(+), 46 deletions(-) diff --git a/Makefile-common b/Makefile-common index 36cae531c..cf9b7bfe0 100644 --- a/Makefile-common +++ b/Makefile-common @@ -32,6 +32,11 @@ pattern-install: load-secrets: ## Loads secrets onto the cluster (unless explicitly disabled in values-global.yaml) @$(ANSIBLE_RUN) rhvp.cluster_utils.load_secrets +##@ Debug Tasks +.PHONY: display-secrets-info +display-secrets-info: ## Display your secret material on terminal or show secret loading error. Use with caution! + @$(ANSIBLE_RUN) rhvp.cluster_utils.display_secrets_info + ##@ Validation Tasks .PHONY: validate-prereq validate-prereq: ## verify pre-requisites @@ -53,6 +58,7 @@ validate-schema: ## validates values files against schema in common/clustergroup argo-healthcheck: ## Checks if all argo applications are synced @$(ANSIBLE_RUN) rhvp.cluster_utils.argo_healthcheck +##@ Testing (CI) Tasks .PHONY: run-ci-tests run-ci-tests: ## To run ci-tests, set any needed env vars @$(ANSIBLE_RUN) rhvp.cluster_utils.run_ci_tests diff --git a/pattern.sh b/pattern.sh index 7d8937c54..b2172fd4f 100755 --- a/pattern.sh +++ b/pattern.sh @@ -17,46 +17,6 @@ function is_container() { return 1 } -function verify_image() { - local image="$1" - - case "${image}" in - quay.io/validatedpatterns/*|quay.io/hybridcloudpatterns/*) - ;; - *) - echo "Skipping image verification for third-party registry" - return 0 - ;; - esac - - if ! command -v cosign >/dev/null 2>&1; then - echo "WARNING: cosign is not installed, cannot verify image signature" - echo "Install cosign to enable image verification: https://docs.sigstore.dev/cosign/system_config/installation/" - return 0 - fi - - echo "Verifying image signature for ${image}..." - local output rc - local oidc_issuer="${VP_COSIGN_OIDC_ISSUER:-https://token.actions.githubusercontent.com}" - local cert_identity="${VP_COSIGN_CERT_IDENTITY:-https://github.com/validatedpatterns/utility-container/.*}" - output=$(cosign verify \ - --certificate-oidc-issuer "${oidc_issuer}" \ - --certificate-identity-regexp "${cert_identity}" \ - "${image}" 2>&1) && rc=$? || rc=$? - - if [ "${rc}" -eq 0 ]; then - echo "Image signature verified successfully" - elif [ "${rc}" -ge 10 ] && [ "${rc}" -le 13 ]; then - echo "ERROR: Image signature verification failed for ${image} (exit code ${rc})" - echo "${output}" - echo "Set VP_VERIFY_IMAGE=false to skip this check" - exit 1 - else - echo "WARNING: Could not verify image signature for ${image} (likely a network issue)" - echo "Set VP_VERIFY_IMAGE=false to skip this check" - fi -} - if is_container; then echo "Already running in a container" exec "$@" @@ -139,10 +99,6 @@ if [ -n "${EXTRA_ARGS:-}" ]; then EXTRA_ARGS_ARRAY=(${EXTRA_ARGS}) fi -if [ "${VP_VERIFY_IMAGE:-true}" != "false" ]; then - verify_image "$PATTERN_UTILITY_CONTAINER" -fi - # Copy Kubeconfig from current environment. The utilities will pick up ~/.kube/config if set so it's not mandatory # $HOME is mounted as itself for any files that are referenced with absolute paths # $HOME is mounted to /root because the UID in the container is 0 and that's where SSH looks for credentials @@ -173,12 +129,12 @@ podman run -it --rm --pull=newer \ -e UUID_FILE \ -e VALUES_SECRET \ -e 'VP_*' \ - ${PKI_HOST_MOUNT_ARGS[@]+"${PKI_HOST_MOUNT_ARGS[@]}"} \ + "${PKI_HOST_MOUNT_ARGS[@]}" \ -v "$(pwd -P)":"$(pwd -P)" \ -v "${HOME}":"${HOME}" \ -v "${HOME}":/pattern-home \ "${PODMAN_ARGS[@]}" \ - ${EXTRA_ARGS_ARRAY[@]+"${EXTRA_ARGS_ARRAY[@]}"} \ + "${EXTRA_ARGS_ARRAY[@]}" \ -w "$(pwd -P)" \ "$PATTERN_UTILITY_CONTAINER" \ "$@"