Skip to content

Commit 0e411da

Browse files
committed
feat: ready for opensource
Signed-off-by: ashing <[email protected]>
1 parent f04b3f4 commit 0e411da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+29
-16902
lines changed

.github/workflows/conformance-test.yml

Lines changed: 0 additions & 130 deletions
This file was deleted.

.github/workflows/e2e-test.yml

Lines changed: 0 additions & 94 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ ENVTEST_K8S_VERSION = 1.30.0
1212
KIND_NAME ?= apisix-ingress-cluster
1313
GATEAY_API_VERSION ?= v1.2.0
1414

15-
DASHBOARD_VERSION ?= dev
1615
TEST_TIMEOUT ?= 45m
1716

1817
# CRD Reference Documentation
@@ -105,23 +104,6 @@ test: manifests generate fmt vet envtest ## Run tests.
105104
.PHONY: kind-e2e-test
106105
kind-e2e-test: kind-up build-image kind-load-images e2e-test
107106

108-
# Utilize Kind or modify the e2e tests to load the image locally, enabling compatibility with other vendors.
109-
.PHONY: e2e-test
110-
e2e-test:
111-
@kind get kubeconfig --name $(KIND_NAME) > $$KUBECONFIG
112-
DASHBOARD_VERSION=$(DASHBOARD_VERSION) go test ./test/e2e/ -test.timeout=$(TEST_TIMEOUT) -v -ginkgo.v -ginkgo.focus="$(TEST_FOCUS)"
113-
114-
.PHONY: download-api7ee3-chart
115-
download-api7ee3-chart:
116-
@helm repo add api7 https://charts.api7.ai || true
117-
@helm repo update
118-
@helm pull api7/api7ee3 --destination "$(shell helm env HELM_REPOSITORY_CACHE)"
119-
@echo "Downloaded API7EE3 chart"
120-
121-
.PHONY: conformance-test
122-
conformance-test:
123-
DASHBOARD_VERSION=$(DASHBOARD_VERSION) go test -v ./test/conformance -tags=conformance -timeout 60m
124-
125107
.PHONY: lint
126108
lint: sort-import golangci-lint ## Run golangci-lint linter
127109
$(GOLANGCI_LINT) run
@@ -146,30 +128,15 @@ kind-down:
146128

147129
.PHONY: kind-load-images
148130
kind-load-images: pull-infra-images kind-load-ingress-image
149-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev --name $(KIND_NAME)
150-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-dp-manager:$(DASHBOARD_VERSION) --name $(KIND_NAME)
151-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-integrated:$(DASHBOARD_VERSION) --name $(KIND_NAME)
152131
@kind load docker-image kennethreitz/httpbin:latest --name $(KIND_NAME)
153132
@kind load docker-image jmalloc/echo-server:latest --name $(KIND_NAME)
154133

155-
.PHONY: kind-load-gateway-image
156-
kind-load-gateway-image:
157-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev --name $(KIND_NAME)
158-
159-
.PHONY: kind-load-dashboard-images
160-
kind-load-dashboard-images:
161-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-dp-manager:$(DASHBOARD_VERSION) --name $(KIND_NAME)
162-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-integrated:$(DASHBOARD_VERSION) --name $(KIND_NAME)
163-
164134
.PHONY: kind-load-ingress-image
165135
kind-load-ingress-image:
166136
@kind load docker-image $(IMG) --name $(KIND_NAME)
167137

168138
.PHONY: pull-infra-images
169139
pull-infra-images:
170-
@docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev
171-
@docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-dp-manager:$(DASHBOARD_VERSION)
172-
@docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-integrated:$(DASHBOARD_VERSION)
173140
@docker pull kennethreitz/httpbin:latest
174141
@docker pull jmalloc/echo-server:latest
175142

@@ -314,10 +281,6 @@ $(GOLANGCI_LINT): $(LOCALBIN)
314281

315282
gofmt: ## Apply go fmt
316283
@gofmt -w -r 'interface{} -> any' .
317-
@gofmt -w -r 'FIt -> It' test
318-
@gofmt -w -r 'FContext -> Context' test
319-
@gofmt -w -r 'FDescribe -> Describe' test
320-
@gofmt -w -r 'FDescribeTable -> DescribeTable' test
321284
@go fmt ./...
322285
.PHONY: gofmt
323286

api/v1alpha1/backendtrafficpolicy_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ type BackendTrafficPolicy struct {
2222
metav1.TypeMeta `json:",inline"`
2323
metav1.ObjectMeta `json:"metadata,omitempty"`
2424

25-
// BackendTrafficPolicySpec defines traffic handling policies applied to backend services,
26-
// such as load balancing strategy, connection settings, and failover behavior.
25+
// BackendTrafficPolicySpec defines traffic handling policies applied to backend services,
26+
// such as load balancing strategy, connection settings, and failover behavior.
2727
Spec BackendTrafficPolicySpec `json:"spec,omitempty"`
2828
Status PolicyStatus `json:"status,omitempty"`
2929
}

api/v1alpha1/consumer_types.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ type Consumer struct {
2323
metav1.TypeMeta `json:",inline"`
2424
metav1.ObjectMeta `json:"metadata,omitempty"`
2525

26-
// ConsumerSpec defines the configuration for a consumer, including consumer name,
26+
// ConsumerSpec defines the configuration for a consumer, including consumer name,
2727
// authentication credentials, and plugin settings.
2828
Spec ConsumerSpec `json:"spec,omitempty"`
2929
Status Status `json:"status,omitempty"`
3030
}
3131

3232
type ConsumerSpec struct {
3333
// GatewayRef specifies the gateway details.
34-
GatewayRef GatewayRef `json:"gatewayRef,omitempty"`
34+
GatewayRef GatewayRef `json:"gatewayRef,omitempty"`
3535
// Credentials specifies the credential details of a consumer.
3636
Credentials []Credential `json:"credentials,omitempty"`
3737
// Plugins define the plugins associated with a consumer.
38-
Plugins []Plugin `json:"plugins,omitempty"`
38+
Plugins []Plugin `json:"plugins,omitempty"`
3939
}
4040

4141
type GatewayRef struct {
@@ -48,7 +48,7 @@ type GatewayRef struct {
4848
Kind *string `json:"kind,omitempty"`
4949
// Group is the API group the resource belongs to. Default is `gateway.networking.k8s.io`.
5050
// +kubebuilder:default=gateway.networking.k8s.io
51-
Group *string `json:"group,omitempty"`
51+
Group *string `json:"group,omitempty"`
5252
// Namespace is namespace of the resource.
5353
Namespace *string `json:"namespace,omitempty"`
5454
}
@@ -58,18 +58,18 @@ type Credential struct {
5858
// +kubebuilder:validation:Enum=jwt-auth;basic-auth;key-auth;hmac-auth;
5959
// Type specifies the type of authentication to configure credentials for.
6060
// Can be one of `jwt-auth`, `basic-auth`, `key-auth`, or `hmac-auth`.
61-
Type string `json:"type"`
61+
Type string `json:"type"`
6262
// Config specifies the credential details for authentication.
63-
Config apiextensionsv1.JSON `json:"config,omitempty"`
63+
Config apiextensionsv1.JSON `json:"config,omitempty"`
6464
// SecretRef references to the Secret that contains the credentials.
65-
SecretRef *SecretReference `json:"secretRef,omitempty"`
65+
SecretRef *SecretReference `json:"secretRef,omitempty"`
6666
// Name is the name of the credential.
67-
Name string `json:"name,omitempty"`
67+
Name string `json:"name,omitempty"`
6868
}
6969

7070
type SecretReference struct {
7171
// Name is the name of the secret.
72-
Name string `json:"name"`
72+
Name string `json:"name"`
7373
// Namespace is the namespace of the secret.
7474
Namespace *string `json:"namespace,omitempty"`
7575
}

0 commit comments

Comments
 (0)