Skip to content

Commit

Permalink
Use k3d instead of minikube
Browse files Browse the repository at this point in the history
Signed-off-by: Elliot Gunton <egunton@bloomberg.net>
  • Loading branch information
elliotgunton committed Dec 11, 2023
1 parent 9662192 commit 1bbdec0
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,9 @@ regenerate-test-data: install-3.8
HERA_REGENERATE=1 make test examples
@poetry run python -m pytest -k test_for_missing_examples --runxfail

.PHONY: install-minikube
install-minikube: ## Install minikube client
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
.PHONY: install-k3d
install-k3d: ## Install k3d client
curl -s https://github.com/k3d-io/k3d/main/install.sh | bash

.PHONY: install-argo
install-argo: ## Install argo client
Expand All @@ -151,18 +150,18 @@ install-argo: ## Install argo client

.PHONY: run-argo
run-argo: ## Start the argo server
minikube status || minikube start --ports 2746
k3d cluster list | grep test-cluster || k3d cluster create test-cluster
k3d kubeconfig merge test-cluster --kubeconfig-switch-context
kubectl get namespace argo || kubectl create namespace argo
kubectl apply -n argo -f https://github.com/argoproj/argo-workflows/releases/download/v$(ARGO_WORKFLOWS_VERSION)/install.yaml
kubectl patch deployment argo-server --namespace argo --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/args", "value": ["server", "--auth-mode=server"]}]'
kubectl rollout status -n argo deployment/argo-server --timeout=120s --watch=true

.PHONY: stop-argo
stop-argo: ## Stop the argo server
minikube stop
k3d cluster stop test-cluster

.PHONY: test-workflows
test-workflows: ## Run workflow tests (requires local argo cluster)
minikube status
@(kubectl -n argo port-forward deployment/argo-server 2746:2746 &)
@poetry run python -m pytest tests/test_submission.py -m workflow

0 comments on commit 1bbdec0

Please sign in to comment.