Skip to content

Commit

Permalink
Don't collect CAPI manifests for public clouds + gitignore fix
Browse files Browse the repository at this point in the history
  • Loading branch information
a13x5 authored and Kshatrix committed Dec 4, 2024
1 parent dee18a4 commit 97393a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion hack/collect-airgap-providers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 97393a5

Please sign in to comment.