Skip to content

Commit

Permalink
Run integration tests on both sail and istioctl install
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-cattermole committed Nov 29, 2023
1 parent 656285b commit e2456db
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:

integration-tests:
name: Integration Tests
strategy:
matrix:
istio-type: [ sail, istioctl ]
runs-on: ubuntu-latest
env:
KIND_CLUSTER_NAME: kuadrant-test
Expand Down Expand Up @@ -73,9 +76,9 @@ jobs:
- name: Check cluster info
run: |
kubectl cluster-info dump
- name: Run make test-env-setup
- name: Run make test-env-setup istio-type=${{ matrix.istio-type }}
run: |
make test-env-setup
make test-env-setup ISTIO_INSTALL_SAIL=${{ matrix.istio-type == 'sail' && true || false }}
- name: Wait for deployments
run: |
kubectl -n ${{ env.KUADRANT_NAMESPACE }} wait --timeout=300s --for=condition=Available deployments --all
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,7 @@ local-cluster-setup: ## Sets up Kind cluster with GatewayAPI manifests and istio
$(MAKE) kind-create-cluster
$(MAKE) namespace
$(MAKE) gateway-api-install
$(MAKE) install-metallb
$(MAKE) sail-install
$(MAKE) istio-install
$(MAKE) install-cert-manager
$(MAKE) deploy-gateway

Expand Down
25 changes: 19 additions & 6 deletions make/istio.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@

ISTIO_INSTALL_DIR = config/dependencies/istio
ISTIO_NAMESPACE = istio-system
## installs project sail vs istioctl install
ISTIO_INSTALL_SAIL ?= true
ifeq (true,$(ISTIO_INSTALL_SAIL))
INSTALL_COMMAND=sail-install
else
INSTALL_COMMAND=istioctl-install
endif

# istioctl tool
ISTIOCTL=$(shell pwd)/bin/istioctl
Expand All @@ -19,21 +26,22 @@ $(ISTIOCTL):
.PHONY: istioctl
istioctl: $(ISTIOCTL) ## Download istioctl locally if necessary.

.PHONY: istio-install
istio-install: istioctl ## Install istio.
.PHONY: istioctl-install
istioctl-install: istioctl ## Install istio.
$(ISTIOCTL) operator init
kubectl apply -f $(ISTIO_INSTALL_DIR)/istio-operator.yaml

.PHONY: istio-uninstall
istio-uninstall: istioctl ## Uninstall istio.
.PHONY: istioctl-uninstall
istioctl-uninstall: istioctl ## Uninstall istio.
$(ISTIOCTL) x uninstall -y --purge

.PHONY: istio-verify-install
istio-verify-install: istioctl ## Verify istio installation.
.PHONY: istioctl-verify-install
istioctl-verify-install: istioctl ## Verify istio installation.
$(ISTIOCTL) verify-install -i $(ISTIO_NAMESPACE)

.PHONY: sail-install
sail-install: kustomize
$(MAKE) install-metallb
$(KUSTOMIZE) build $(ISTIO_INSTALL_DIR)/sail | kubectl apply -f -
kubectl -n istio-system wait --for=condition=Available deployment istio-operator --timeout=300s
kubectl apply -f $(ISTIO_INSTALL_DIR)/sail/istio.yaml
Expand All @@ -42,3 +50,8 @@ sail-install: kustomize
sail-uninstall: kustomize
kubectl delete -f $(ISTIO_INSTALL_DIR)/sail/istio.yaml
$(KUSTOMIZE) build $(ISTIO_INSTALL_DIR)/sail | kubectl delete -f -
$(MAKE) uninstall-metallb

.PHONY: istio-install
istio-install:
$(MAKE) $(INSTALL_COMMAND)

0 comments on commit e2456db

Please sign in to comment.