Skip to content

Commit 007fe7e

Browse files
ronethingAlinsRan
andauthored
backport: apisix ingress pr #2476 #2467 #2472 (#204)
Signed-off-by: ashing <[email protected]> Co-authored-by: AlinsRan <[email protected]>
1 parent a5c4fb7 commit 007fe7e

35 files changed

+1741
-1035
lines changed

Makefile

Lines changed: 75 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
VERSION ?= 2.0.0
2121

22+
RELEASE_SRC = apache-apisix-ingress-controller-${VERSION}-src
2223

2324
IMAGE_TAG ?= dev
2425

@@ -31,14 +32,17 @@ GATEAY_API_VERSION ?= v1.2.0
3132
DASHBOARD_VERSION ?= dev
3233
ADC_VERSION ?= 0.20.0
3334

35+
GINKGO_VERSION ?= 2.20.0
3436
TEST_TIMEOUT ?= 80m
3537
TEST_DIR ?= ./test/e2e/
38+
E2E_NODES ?= 2
3639

3740
# CRD Reference Documentation
3841
CRD_REF_DOCS_VERSION ?= v0.1.0
3942
CRD_REF_DOCS ?= $(LOCALBIN)/crd-ref-docs
40-
CRD_DOCS_CONFIG ?= docs/crd/config.yaml
41-
CRD_DOCS_OUTPUT ?= docs/crd/api.md
43+
CRD_DOCS_CONFIG ?= docs/assets/crd/config.yaml
44+
CRD_DOCS_OUTPUT ?= docs/en/latest/api-reference.md
45+
CRD_DOCS_TEMPLATE ?= docs/assets/template
4246

4347
export KUBECONFIG = /tmp/$(KIND_NAME).kubeconfig
4448

@@ -137,6 +141,14 @@ download-api7ee3-chart:
137141
@helm pull api7/api7ee3 --destination "$(shell helm env HELM_REPOSITORY_CACHE)"
138142
@echo "Downloaded API7EE3 chart"
139143

144+
.PHONY: ginkgo-e2e-test
145+
ginkgo-e2e-test:
146+
@ginkgo -cover -coverprofile=coverage.txt -r --randomize-all --randomize-suites --trace --focus=$(E2E_FOCUS) --nodes=$(E2E_NODES) $(TEST_DIR)
147+
148+
.PHONY: install-ginkgo
149+
install-ginkgo:
150+
@go install github.com/onsi/ginkgo/v2/ginkgo@v$(GINKGO_VERSION)
151+
140152
.PHONY: conformance-test
141153
conformance-test:
142154
DASHBOARD_VERSION=$(DASHBOARD_VERSION) go test -v ./test/conformance -tags=conformance -timeout 60m
@@ -170,15 +182,15 @@ kind-down:
170182

171183
.PHONY: kind-load-images
172184
kind-load-images: pull-infra-images kind-load-ingress-image
173-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev --name $(KIND_NAME)
174-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-dp-manager:$(DASHBOARD_VERSION) --name $(KIND_NAME)
175-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-integrated:$(DASHBOARD_VERSION) --name $(KIND_NAME)
176-
@kind load docker-image kennethreitz/httpbin:latest --name $(KIND_NAME)
185+
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev --name $(KIND_NAME)
186+
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-dp-manager:$(DASHBOARD_VERSION) --name $(KIND_NAME)
187+
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-integrated:$(DASHBOARD_VERSION) --name $(KIND_NAME)
188+
@kind load docker-image kennethreitz/httpbin:latest --name $(KIND_NAME)
177189
@kind load docker-image jmalloc/echo-server:latest --name $(KIND_NAME)
178190

179191
.PHONY: kind-load-gateway-image
180192
kind-load-gateway-image:
181-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev --name $(KIND_NAME)
193+
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev --name $(KIND_NAME)
182194

183195
.PHONY: kind-load-dashboard-images
184196
kind-load-dashboard-images:
@@ -192,7 +204,7 @@ kind-load-ingress-image:
192204
.PHONY: pull-infra-images
193205
pull-infra-images:
194206
@docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev
195-
@docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-dp-manager:$(DASHBOARD_VERSION)
207+
@docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-dp-manager:$(DASHBOARD_VERSION)
196208
@docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-integrated:$(DASHBOARD_VERSION)
197209
@docker pull kennethreitz/httpbin:latest
198210
@docker pull jmalloc/echo-server:latest
@@ -389,7 +401,7 @@ generate-crd-docs: manifests ## Generate CRD reference documentation in a single
389401
--source-path=./api \
390402
--config=$(CRD_DOCS_CONFIG) \
391403
--renderer=markdown \
392-
--templates-dir=./docs/template \
404+
--templates-dir=$(CRD_DOCS_TEMPLATE) \
393405
--output-path=$(CRD_DOCS_OUTPUT) \
394406
--max-depth=100
395407
@echo "CRD reference documentation generated at $(CRD_DOCS_OUTPUT)"
@@ -402,7 +414,7 @@ generate-crd-docs-grouped: manifests ## Generate CRD reference documentation gro
402414
--source-path=./api \
403415
--config=$(CRD_DOCS_CONFIG) \
404416
--renderer=markdown \
405-
--templates-dir=./docs/template \
417+
--templates-dir=$(CRD_DOCS_TEMPLATE) \
406418
--output-path=docs/crd/groups \
407419
--output-mode=group
408420
@echo "CRD reference documentation generated in docs/crd/groups directory"
@@ -416,3 +428,56 @@ verify-license:
416428
.PHONY: update-license
417429
update-license:
418430
docker run -it --rm -v $(PWD):/github/workspace apache/skywalking-eyes header fix
431+
432+
### verify-mdlint: Verify markdown files lint rules.
433+
.PHONY: verify-mdlint
434+
verify-mdlint:
435+
docker run -it --rm -v $(PWD):/work tmknom/markdownlint '**/*.md' --ignore node_modules --ignore CHANGELOG.md
436+
437+
### update-mdlint: Update markdown files lint rules.
438+
.PHONY: update-mdlint
439+
update-mdlint:
440+
docker run -it --rm -v $(PWD):/work tmknom/markdownlint '**/*.md' -f --ignore node_modules --ignore vendor --ignore CHANGELOG.md
441+
442+
### verify-yamllint: Verify yaml files lint rules for `examples` directory.
443+
.PHONY: verify-yamllint
444+
verify-yamllint:
445+
docker run -it --rm -v $(PWD):/yaml peterdavehello/yamllint yamllint examples
446+
447+
### update-yamlfmt: Update yaml files format for `examples` directory.
448+
.PHONY: update-yamlfmt
449+
update-yamlfmt:
450+
go install github.com/google/yamlfmt/cmd/yamlfmt@latest && yamlfmt examples
451+
452+
### verify-all: Verify all verify- rules.
453+
.PHONY: verify-all
454+
verify-all: verify-license verify-mdlint verify-yamllint
455+
456+
### update-all: Update all update- rules.
457+
.PHONY: update-all
458+
update-all: update-license update-mdlint update-gofmt
459+
460+
### release-src: Release source
461+
release-src:
462+
tar -zcvf $(RELEASE_SRC).tgz \
463+
--exclude .github \
464+
--exclude .git \
465+
--exclude .idea \
466+
--exclude .gitignore \
467+
--exclude .DS_Store \
468+
--exclude docs \
469+
--exclude examples \
470+
--exclude scripts \
471+
--exclude samples \
472+
--exclude test \
473+
--exclude release \
474+
--exclude $(RELEASE_SRC).tgz \
475+
.
476+
477+
gpg --batch --yes --armor --detach-sig $(RELEASE_SRC).tgz
478+
shasum -a 512 $(RELEASE_SRC).tgz > $(RELEASE_SRC).tgz.sha512
479+
480+
mkdir -p release
481+
mv $(RELEASE_SRC).tgz release/$(RELEASE_SRC).tgz
482+
mv $(RELEASE_SRC).tgz.asc release/$(RELEASE_SRC).tgz.asc
483+
mv $(RELEASE_SRC).tgz.sha512 release/$(RELEASE_SRC).tgz.sha512
File renamed without changes.
-370 KB
Binary file not shown.
206 KB
Loading
171 KB
Loading
104 KB
Loading
150 KB
Loading

docs/template/gv_details.tpl renamed to docs/assets/template/gv_details.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
### Types
4141

42-
This section describes the types used by the CRDs.
42+
In this section you will find types that the CRDs rely on.
4343

4444
{{- /* Display Types that are not exported Kinds */ -}}
4545
{{- range $typ := $gv.SortedTypes -}}

docs/template/gv_list.tpl renamed to docs/assets/template/gv_list.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ slug: /reference/apisix-ingress-controller/crd-reference
2626
description: Explore detailed reference documentation for the custom resource definitions (CRDs) supported by the APISIX Ingress Controller.
2727
---
2828

29-
This document provides the API resource description for the API7 Ingress Controller custom resource definitions (CRDs).
29+
This document provides the API resource description the APISIX Ingress Controller custom resource definitions (CRDs).
3030

3131
## Packages
3232
{{- range $groupVersions }}
File renamed without changes.

0 commit comments

Comments
 (0)