Skip to content

Commit

Permalink
permutation #1
Browse files Browse the repository at this point in the history
  • Loading branch information
kuritka committed Apr 7, 2021
1 parent c105f41 commit 0fda9ec
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,44 @@ deploy-full-local-setup: ## Deploy full local multicluster setup
$(call deploy-local-cluster,$(CLUSTER_GSLB1),$(CLUSTER_GSLB2),$(VERSION),)
$(call deploy-local-cluster,$(CLUSTER_GSLB2),$(CLUSTER_GSLB1),$(VERSION),$(CLUSTER_GSLB2_HELM_ARGS))

.PHONY: deploy-permutation
deploy-permutation:
$(call deploy-local-cluster,$(CLUSTER_GSLB1),$(CLUSTER_GSLB2),$(SEMVER),)
$(call deploy-local-cluster,$(CLUSTER_GSLB2),$(CLUSTER_GSLB1),$(SEMVER),$(CLUSTER_GSLB2_HELM_ARGS))

@echo "\n$(YELLOW)Local cluster $(CYAN)$(CLUSTER_GSLB2) $(NC)"
kubectl get pods -A
@echo "\n$(YELLOW)Local cluster $(CYAN)$(CLUSTER_GSLB1) $(NC)"
kubectl config use-context k3d-$(CLUSTER_GSLB1)
kubectl get pods -A

@echo "\n$(YELLOW)build k8gb docker and push to registry $(NC)"
docker build . -t $(REPO):$(SEMVER)
k3d image import $(REPO):$(SEMVER) -c $(CLUSTER_GSLB1)
k3d image import $(REPO):$(SEMVER) -c $(CLUSTER_GSLB2)

@echo "\n$(YELLOW)Deploy GSLB operator from to k3d-$(CLUSTER_GSLB1) $(NC)"
kubectl config use-context k3d-$(CLUSTER_GSLB1)
cd chart/k8gb && helm dependency update
helm -n k8gb upgrade -i k8gb chart/k8gb -f $(VALUES_YAML) \
--set k8gb.hostAlias.enabled=true \
--set k8gb.hostAlias.ip="`$(call get-host-alias-ip,k3d-$(CLUSTER_GSLB1),k3d-$(CLUSTER_GSLB2))`" \
--set k8gb.imageTag=$(SEMVER)
--set k8gb.log.format=$(LOG_FORMAT)
--set k8gb.log.level=$(LOG_LEVEL)

@echo "\n$(YELLOW)Deploy GSLB operator from to k3d-$(CLUSTER_GSLB1) $(NC)"
kubectl config use-context k3d-$(CLUSTER_GSLB2)
cd chart/k8gb && helm dependency update
helm -n k8gb upgrade -i k8gb chart/k8gb -f $(VALUES_YAML) \
--set k8gb.hostAlias.enabled=true \
--set k8gb.hostAlias.ip="`$(call get-host-alias-ip,k3d-$(CLUSTER_GSLB2),k3d-$(CLUSTER_GSLB1))`" \
--set k8gb.imageTag=$(SEMVER) $(CLUSTER_GSLB2_HELM_ARGS)
--set k8gb.log.format=$(LOG_FORMAT)
--set k8gb.log.level=$(LOG_LEVEL)

cd terratest/test/ && go mod download && go test -v

# triggered by terraform GitHub Action. Clusters already exists. GO is not installed yet
.PHONY: deploy-to-AbsaOSS-k3d-action
deploy-to-AbsaOSS-k3d-action:
Expand Down

0 comments on commit 0fda9ec

Please sign in to comment.