From 97393a57b641d19b7efd43955c1531bdc8eb6436 Mon Sep 17 00:00:00 2001 From: Aleksei Sizov Date: Wed, 4 Dec 2024 11:32:10 -0500 Subject: [PATCH] Don't collect CAPI manifests for public clouds + gitignore fix --- .gitignore | 5 +++++ hack/collect-airgap-providers.sh | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 55aeadb65..65806b9f3 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,8 @@ mkdocs # airgap-push script directories hmc-airgap + +# Exclude CAPI operator manifests +templates/provider/*/files +# But keep hmc-templates +!templates/provider/hmc-templates/files diff --git a/hack/collect-airgap-providers.sh b/hack/collect-airgap-providers.sh index 6e3360952..316f892fc 100644 --- a/hack/collect-airgap-providers.sh +++ b/hack/collect-airgap-providers.sh @@ -23,10 +23,11 @@ set -e PROVIDER_LIST_FILE="${LOCALBIN}/providers.yaml" REPOSITORIES_FILE="${LOCALBIN}/capi-repositories.yaml" DOWNLOAD_LIST_FILE="${LOCALBIN}/download-list" +EXCLUDED_PROVIDERS='hmc*\|projectsveltos\|cluster-api-provider-aws\|cluster-api-provider-azure' $CLUSTERCTL config repositories -o yaml > $REPOSITORIES_FILE -for tmpl in $(ls --color=never -1 $PROVIDER_TEMPLATES_DIR | grep -v 'hmc*\|projectsveltos'); do +for tmpl in $(ls --color=never -1 $PROVIDER_TEMPLATES_DIR | grep -v $EXCLUDED_PROVIDERS); do $HELM template ${PROVIDER_TEMPLATES_DIR}/${tmpl} | path="${PROVIDER_TEMPLATES_DIR}/${tmpl}" $YQ 'select(.apiVersion | test("operator.cluster.x-k8s.io.*")) | [{"name": .metadata.name, "version": .spec.version, "kind": .kind, "path": strenv(path)}]'; done | grep -v '\[\]' > $PROVIDER_LIST_FILE