Skip to content

Commit

Permalink
Multicluster setup (n > 2) (#722)
Browse files Browse the repository at this point in the history
- change the Makefile targets so that they run in a for loop
- add tests for terratest for round-robin @ 3 clusters (failover is still pending)
- change the helm chart to be able to set up more than one hostAlias entry for a pod
- add simple script that generates the yaml configs for k3d clusters so that we are DRY

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
  • Loading branch information
jkremser authored Nov 19, 2021
1 parent 04f4e74 commit 6f3f219
Show file tree
Hide file tree
Showing 13 changed files with 297 additions and 157 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/terratest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,21 @@ jobs:
cluster-name: "test-gslb2"
args: -c k3d/test-gslb2.yaml

- name: Create 3rd k3s Cluster
uses: AbsaOSS/k3d-action@v1.5.0
with:
cluster-name: "test-gslb3"
args: -c k3d/test-gslb3.yaml

- name: K8GB deployment
run: make deploy-candidate
run: |
make deploy-test-version list-running-pods CLUSTERS_NUMBER=3
echo "Cluster 1 (eu):"
kubectl get no -owide --context=k3d-test-gslb1
echo "Cluster 2 (us):"
kubectl get no -owide --context=k3d-test-gslb2
echo "Cluster 3 (cz):"
kubectl get no -owide --context=k3d-test-gslb3
- name: Terratest
run: make terratest
10 changes: 8 additions & 2 deletions .github/workflows/upgrade-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,17 @@ jobs:
cluster-name: "test-gslb2"
args: -c k3d/test-gslb2.yaml

- name: Create 3rd k3s Cluster
uses: AbsaOSS/k3d-action@v1.5.0
with:
cluster-name: "test-gslb3"
args: -c k3d/test-gslb3.yaml

- name: K8GB deploy stable version
run: make deploy-stable-version
run: make deploy-stable-version list-running-pods CLUSTERS_NUMBER=3

- name: K8GB deploy test version
run: make deploy-test-version
run: make deploy-test-version list-running-pods CLUSTERS_NUMBER=3

- name: Terratest
run: make terratest
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ chart/k8gb/charts/*.tgz

# gh-pages | Jekyll generated files
_site

# generated k3d configs
k3d/test-gslb[!1-3].yaml
Loading

0 comments on commit 6f3f219

Please sign in to comment.