Skip to content

Commit

Permalink
ci(github): remove docker DNS setting on ipv6 e2e tests (#8676)
Browse files Browse the repository at this point in the history
This was only required in circleci apparently

also:
- simplify makefile on e2e
- add ginkgo label to skip ipv6 test

Signed-off-by: Charly Molter <[email protected]>
Signed-off-by: Jay Jijie Chen <[email protected]>
Co-authored-by: Jay Jijie Chen <[email protected]>
  • Loading branch information
lahabana and jijiechen authored Jan 11, 2024
1 parent 38d4ce0 commit 8153d5c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,6 @@ jobs:
if: steps.eval-params.outputs.run-type == 'github'
run: |
make dev/set-kuma-helm-repo
- name: "GitHub Actions: enable ipv6 for docker"
if: ${{ steps.eval-params.outputs.run-type == 'github' && env.E2E_PARAM_K8S_VERSION == 'kindIpv6' }}
run: |
cat <<'EOF' | sudo tee /etc/docker/daemon.json
{
"ipv6": true,
"fixed-cidr-v6": "2001:db8:1::/64",
"dns": ["8.8.8.8"],
"dns-search": ["."]
}
EOF
sudo service docker restart
- name: "GitHub Actions: run E2E tests"
if: steps.eval-params.outputs.run-type == 'github'
run: |
Expand Down
15 changes: 5 additions & 10 deletions mk/e2e.new.mk
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,18 @@ endif
ifeq ($(K8S_CLUSTER_TOOL),kind)
GINKGO_E2E_LABEL_FILTERS := $(call append_label_filter,!kind-not-supported)
endif
ifdef IPV6
GINKGO_E2E_LABEL_FILTERS := $(call append_label_filter,!ipv6-not-supported)
endif

ifeq ($(shell uname -m | sed -e s/aarch.*/arm64/),arm64)
GINKGO_E2E_LABEL_FILTERS := $(call append_label_filter,!arm-not-supported)
endif


ifdef IPV6
KIND_CONFIG_IPV6=-ipv6
endif

define gen-k8sclusters
.PHONY: test/e2e/k8s/start/cluster/$1
test/e2e/k8s/start/cluster/$1:
KIND_CONFIG=$(TOP)/test/kind/cluster$(KIND_CONFIG_IPV6)-$1.yaml \
KIND_CLUSTER_NAME=$1 \
$(MAKE) $(K8S_CLUSTER_TOOL)/start
KIND_CLUSTER_NAME=$1 $(MAKE) $(K8S_CLUSTER_TOOL)/start

.PHONY: test/e2e/k8s/load/images/$1
test/e2e/k8s/load/images/$1:
Expand All @@ -81,8 +77,7 @@ test/e2e/k8s/wait/$1:

.PHONY: test/e2e/k8s/stop/cluster/$1
test/e2e/k8s/stop/cluster/$1:
KIND_CLUSTER_NAME=$1 \
$(MAKE) $(K8S_CLUSTER_TOOL)/stop
KIND_CLUSTER_NAME=$1 $(MAKE) $(K8S_CLUSTER_TOOL)/stop
endef

$(foreach cluster, $(K8SCLUSTERS), $(eval $(call gen-k8sclusters,$(cluster))))
Expand Down
4 changes: 2 additions & 2 deletions mk/kind.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ KUMA_NAMESPACE ?= kuma-system

.PHONY: kind/start
kind/start: ${KUBECONFIG_DIR}
@$(KIND) get clusters | grep $(KIND_CLUSTER_NAME) >/dev/null 2>&1 && echo "Kind cluster already running." && exit 0 || \
$(KIND) get clusters | grep $(KIND_CLUSTER_NAME) >/dev/null 2>&1 && echo "Kind cluster already running." && exit 0 || \
($(KIND) create cluster \
--name "$(KIND_CLUSTER_NAME)" \
--config "$(KIND_CONFIG)" \
--config "$(KUMA_DIR)/test/kind/cluster-$(if $(IPV6),ipv6-,)$(KIND_CLUSTER_NAME).yaml" \
--image=kindest/node:$(CI_KUBERNETES_VERSION) \
--kubeconfig $(KIND_KUBECONFIG) \
--quiet --wait 120s && \
Expand Down

0 comments on commit 8153d5c

Please sign in to comment.