Skip to content

Instantly share code, notes, and snippets.

@soukron
Last active October 8, 2024 16:30
Show Gist options
  • Save soukron/dcc030fd7851204822d222f030535839 to your computer and use it in GitHub Desktop.
Save soukron/dcc030fd7851204822d222f030535839 to your computer and use it in GitHub Desktop.
Create blank pattern with latest common / clustergroup
mkdir blank
cd blank/
git init
git remote add origin https://github.com/soukron/blank
git remote add -f upstream-common https://github.com/validatedpatterns/common.git
git read-tree --prefix=common/ -u upstream-common/main
ln -s common/scripts/pattern-util.sh pattern.sh
cat <<EOF>Makefile
.PHONY: default
default: help
.PHONY: help
##@ Pattern tasks
# No need to add a comment here as help is described in common/
help:
@make -f common/Makefile MAKEFILE_LIST="Makefile common/Makefile" help
%:
make -f common/Makefile \$*
.PHONY: install
install: operator-deploy post-install ## installs the pattern and loads the secrets
@echo "Installed"
.PHONY: post-install
post-install: ## Post-install tasks
make load-secrets
@echo "Done"
.PHONY: test
test:
@make -f common/Makefile PATTERN_OPTS="-f values-global.yaml -f values-default.yaml" test
EOF
git add Makefile pattern.sh
git commit -a -m "Added upstream from upstream-common/main"
cat <<EOF>values-global.yaml
---
global:
pattern: blank
secretStore:
backend: none
options: {}
main:
clusterGroupName: default
multiSourceConfig:
enabled: true
clusterGroupChartVersion: 0.9.*
EOF
cat <<EOF>values-default.yaml
clusterGroup:
name: default
isHubCluster: true
namespaces: []
subscriptions: {}
projects:
- default
applications: {}
EOF
git add values-default.yaml values-global.yaml
git commit -a -m "Adde default values for blank pattern"
git push -u origin main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment