Skip to content

Commit 6289455

Browse files
committed
chore: 1.18 kubernetes-ci use self-hosted
1 parent 241a4d5 commit 6289455

3 files changed

Lines changed: 17 additions & 31 deletions

File tree

.github/workflows/e2e-test-k8s.yml

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -34,47 +34,38 @@ jobs:
3434
matrix:
3535
cases_subset:
3636
- v2
37-
runs-on: buildjet-2vcpu-ubuntu-2004
37+
runs-on: self-hosted
3838
steps:
3939
- name: Checkout
40-
uses: actions/checkout@v2
40+
uses: actions/checkout@v3
4141
with:
4242
submodules: recursive
4343

4444
- name: Setup Go Env
45-
uses: actions/setup-go@v4
46-
with:
47-
go-version: "1.24"
45+
run: |
46+
go env
4847
4948
- name: Install kind
5049
run: |
51-
go install sigs.k8s.io/kind@v0.13.0
50+
kind version
5251
5352
- name: Install Helm
5453
run: |
5554
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
5655
chmod 700 get_helm.sh
5756
./get_helm.sh
5857
59-
- name: Login to Registry
60-
uses: docker/login-action@v3
61-
with:
62-
registry: ${{ secrets.DOCKER_REGISTRY }}
63-
username: ${{ secrets.DOCKER_USERNAME }}
64-
password: ${{ secrets.DOCKER_PASSWORD }}
65-
66-
- name: Login to Private Registry
67-
uses: docker/login-action@v3
68-
with:
69-
registry: hkccr.ccs.tencentyun.com
70-
username: ${{ secrets.PRIVATE_DOCKER_USERNAME }}
71-
password: ${{ secrets.PRIVATE_DOCKER_PASSWORD }}
72-
7358
- name: Launch Kind Cluster
7459
env:
75-
KIND_NODE_IMAGE: kindest/node:v1.18.20@sha256:38a8726ece5d7867fb0ede63d718d27ce2d41af519ce68be5ae7fcca563537ed
60+
KIND_NODE_IMAGE: kindest/node:v1.18.15
7661
run: |
7762
make kind-up
63+
KIND_NODE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' apisix-ingress-cluster-control-plane)
64+
echo $KIND_NODE_IP
65+
66+
kubectl config get-clusters
67+
kubectl config set-cluster kind-apisix-ingress-cluster --server=https://$KIND_NODE_IP:6443
68+
kubectl wait --for=condition=Ready nodes --all
7869
7970
- name: Build images
8071
env:
@@ -107,14 +98,10 @@ jobs:
10798
node $(pwd)/adc.js -v
10899
echo "ADC_BIN=node $(pwd)/adc.js" >> $GITHUB_ENV
109100
110-
111-
- name: Start OpenLDAP server
112-
run: make e2e-ldap
113-
114101
- name: Run E2E test suite
115102
shell: bash
116103
env:
117-
API7_EE_LICENSE: ${{ secrets.API7_EE_LICENSE }}
104+
#API7_EE_LICENSE: ${{ secrets.API7_EE_LICENSE }}
118105
PROVIDER_TYPE: api7ee
119106
TEST_LABEL: ${{ matrix.cases_subset }}
120107
INGRESS_VERSION: v1beta1

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ CRD_DOCS_TEMPLATE ?= docs/assets/template
4848

4949
INGRESS_VERSION ?= v1
5050

51-
export KUBECONFIG = /tmp/$(KIND_NAME).kubeconfig
51+
#export KUBECONFIG = /tmp/$(KIND_NAME).kubeconfig
5252

5353
# go
5454
VERSYM="github.com/apache/apisix-ingress-controller/internal/version._buildVersion"
@@ -143,7 +143,6 @@ kind-e2e-test: kind-up build-image kind-load-images e2e-test
143143
# Utilize Kind or modify the e2e tests to load the image locally, enabling compatibility with other vendors.
144144
.PHONY: e2e-test
145145
e2e-test: adc
146-
@kind get kubeconfig --name $(KIND_NAME) > $$KUBECONFIG
147146
DASHBOARD_VERSION=$(DASHBOARD_VERSION) go test $(TEST_DIR) -test.timeout=$(TEST_TIMEOUT) -v -ginkgo.v -ginkgo.focus="$(TEST_FOCUS)" -ginkgo.label-filter="$(TEST_LABEL)"
148147

149148
.PHONY: download-api7ee3-chart
@@ -189,8 +188,6 @@ kind-up:
189188
@kind get clusters 2>&1 | grep -v $(KIND_NAME) \
190189
&& kind create cluster --name $(KIND_NAME) --image $(KIND_NODE_IMAGE) \
191190
|| echo "kind cluster already exists"
192-
@kind get kubeconfig --name $(KIND_NAME) > $$KUBECONFIG
193-
kubectl wait --for=condition=Ready nodes --all
194191

195192
.PHONY: kind-down
196193
kind-down:
@@ -277,7 +274,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
277274
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
278275
.PHONY: docker-build
279276
docker-build: set-e2e-goos build ## Build docker image with the manager.
280-
$(CONTAINER_TOOL) build -t ${IMG} -f Dockerfile .
277+
$(CONTAINER_TOOL) build --build-arg TARGETARCH=${GOARCH} -t ${IMG} -f Dockerfile .
281278

282279
.PHONY: docker-push
283280
docker-push: ## Push docker image with the manager.

test/e2e/framework/api7_dashboard.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ prometheus:
203203
server:
204204
persistence:
205205
enabled: false
206+
jaeger:
207+
builtin: false
206208
postgresql:
207209
{{- if ne .DB "postgres" }}
208210
builtin: false

0 commit comments

Comments
 (0)