Skip to content

Commit f84026f

Browse files
authored
Merge pull request #174 from beekhof/spoke-install
Allow an optional TARGET_SITE variable to drive main.clusterGroupName
2 parents eedb453 + 27ac754 commit f84026f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changes
22

33
## October 3, 2022
4+
* Restore the ability to install a non-default site: `make TARGET_SITE=mysite install`
45
* Revised tests (new output and filenames, requires adding new result files to git)
56
* ACM 2.6 required for ACM-based managed sites
67
* Introduced global.clusterDomain template variable (without the `apps.` prefix)

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
NAME=$(shell basename `pwd`)
22
# This is to ensure that whether we start with a git@ or https:// URL, we end up with an https:// URL
33
# This is because we expect to use tokens for repo authentication as opposed to SSH keys
4+
ifneq ($(origin TARGET_SITE), undefined)
5+
TARGET_SITE_OPT=--set main.clusterGroupName=$(TARGET_SITE)
6+
endif
7+
48
TARGET_ORIGIN ?= origin
59
TARGET_REPO=$(shell git remote show $(TARGET_ORIGIN) | grep Push | sed -e 's/.*URL:[[:space:]]*//' -e 's%^git@%%' -e 's%^https://%%' -e 's%:%/%' -e 's%^%https://%')
610
# git branch --show-current is also available as of git 2.22, but we will use this for compatibility
@@ -9,7 +13,7 @@ HUBCLUSTER_APPS_DOMAIN=$(shell oc get ingresses.config/cluster -o jsonpath={.spe
913

1014
# --set values always take precedence over the contents of -f
1115
HELM_OPTS=-f values-global.yaml --set main.git.repoURL="$(TARGET_REPO)" --set main.git.revision=$(TARGET_BRANCH) \
12-
--set global.hubClusterDomain=$(HUBCLUSTER_APPS_DOMAIN)
16+
--set global.hubClusterDomain=$(HUBCLUSTER_APPS_DOMAIN) $(TARGET_SITE_OPT)
1317
TEST_OPTS= -f common/examples/values-secret.yaml -f values-global.yaml --set global.repoURL="https://github.com/pattern-clone/mypattern" \
1418
--set main.git.repoURL="https://github.com/pattern-clone/mypattern" --set main.git.revision=main --set global.pattern="mypattern" \
1519
--set global.namespace="pattern-namespace" --set global.hubClusterDomain=apps.hub.example.com --set global.localClusterDomain=apps.region.example.com --set global.clusterDomain=region.example.com\

0 commit comments

Comments
 (0)