diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 32ab2068e..e79ff6fa3 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -12,7 +12,7 @@ body: Prior to opening the issue, please make sure that you: - Use English to communicate. - - Search the [open issues](https://github.com/apache/api7-ingress-controller/issues) to avoid duplicating the issue. + - Search the [open issues](https://github.com/apache/apisix-ingress-controller/issues) to avoid duplicating the issue. - type: textarea id: current-behavior @@ -56,7 +56,7 @@ body: label: Environment description: Share your environment details. Reports without proper environment details will likely be closed. value: | - - APISIX Ingress controller version (run `api7-ingress-controller version --long`) + - APISIX Ingress controller version (run `apisix-ingress-controller version --long`) - Kubernetes cluster version (run `kubectl version`) - OS version if running APISIX Ingress controller in a bare-metal environment (run `uname -a`) validations: diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index b88f67e2c..a1f825fdb 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -10,7 +10,7 @@ body: Prior to opening the issue, please make sure that you: - Use English to communicate. - - Search the [open issues](https://github.com/apache/api7-ingress-controller/issues) to avoid duplicating the issue. + - Search the [open issues](https://github.com/apache/apisix-ingress-controller/issues) to avoid duplicating the issue. - type: textarea id: description diff --git a/.github/ISSUE_TEMPLATE/improve_docs.yml b/.github/ISSUE_TEMPLATE/improve_docs.yml index c2767446a..1252e5bb7 100644 --- a/.github/ISSUE_TEMPLATE/improve_docs.yml +++ b/.github/ISSUE_TEMPLATE/improve_docs.yml @@ -11,7 +11,7 @@ body: Prior to opening the issue, please make sure that you: - Use English to communicate. - - Search the [open issues](https://github.com/apache/api7-ingress-controller/issues) to avoid duplicating the issue. + - Search the [open issues](https://github.com/apache/apisix-ingress-controller/issues) to avoid duplicating the issue. - type: textarea id: current-state diff --git a/.github/ISSUE_TEMPLATE/performance_issue.yml b/.github/ISSUE_TEMPLATE/performance_issue.yml index 2431700ba..9b6f0d222 100644 --- a/.github/ISSUE_TEMPLATE/performance_issue.yml +++ b/.github/ISSUE_TEMPLATE/performance_issue.yml @@ -12,7 +12,7 @@ body: Prior to opening the issue, please make sure that you: - Use English to communicate. - - Search the [open issues](https://github.com/apache/api7-ingress-controller/issues) to avoid duplicating the issue. + - Search the [open issues](https://github.com/apache/apisix-ingress-controller/issues) to avoid duplicating the issue. - type: textarea id: issue-faced attributes: @@ -46,7 +46,7 @@ body: label: Environment description: Share your environment details. Reports without proper environment details will likely be closed. value: | - - APISIX Ingress controller version (run `api7-ingress-controller version --long`) + - APISIX Ingress controller version (run `apisix-ingress-controller version --long`) - Kubernetes cluster version (run `kubectl version`) - OS version if running APISIX Ingress controller in a bare-metal environment (run `uname -a`) validations: diff --git a/.github/ISSUE_TEMPLATE/request_help.yml b/.github/ISSUE_TEMPLATE/request_help.yml index 919182edb..e20e2aefc 100644 --- a/.github/ISSUE_TEMPLATE/request_help.yml +++ b/.github/ISSUE_TEMPLATE/request_help.yml @@ -24,8 +24,8 @@ body: label: Environment description: Request help without environment information will be ignored or closed. value: | - - your api7-ingress-controller version (output of api7-ingress-controller version --long): + - your apisix-ingress-controller version (output of apisix-ingress-controller version --long): - your Kubernetes cluster version (output of kubectl version): - - if you run api7-ingress-controller in Bare-metal environment, also show your OS version (uname -a): + - if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a): validations: required: true diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE index 9a598e5cd..bcc2761b3 100644 --- a/.github/PULL_REQUEST_TEMPLATE +++ b/.github/PULL_REQUEST_TEMPLATE @@ -34,4 +34,4 @@ Please follow the requirements: - [ ] Did you explain what problem does this PR solve? Or what new features have been added? - [ ] Have you added corresponding test cases? - [ ] Have you modified the corresponding document? -- [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/api7-ingress-controller#community) first** +- [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix-ingress-controller#community) first** diff --git a/.github/workflows/conformance-test.yml b/.github/workflows/conformance-test.yml index 3a7ae9c4f..8f29fb3f7 100644 --- a/.github/workflows/conformance-test.yml +++ b/.github/workflows/conformance-test.yml @@ -103,22 +103,22 @@ jobs: - name: Get Logs from api7-ingress-controller shell: bash run: | - export KUBECONFIG=/tmp/api7-ingress-cluster.kubeconfig - kubectl logs -n api7ee-conformance-test -l app=api7-ingress-controller + export KUBECONFIG=/tmp/apisix-ingress-cluster.kubeconfig + kubectl logs -n apisix-conformance-test -l app=apisix-ingress-controller - name: Upload Gateway API Conformance Report if: ${{ github.event_name == 'push' }} uses: actions/upload-artifact@v4 with: - name: api7-ingress-controller-conformance-report.yaml - path: api7-ingress-controller-conformance-report.yaml + name: apisix-ingress-controller-conformance-report.yaml + path: apisix-ingress-controller-conformance-report.yaml - name: Format Conformance Test Report if: ${{ github.event_name == 'pull_request' }} run: | echo '# conformance test report' > report.md echo '```yaml' >> report.md - cat api7-ingress-controller-conformance-report.yaml >> report.md + cat apisix-ingress-controller-conformance-report.yaml >> report.md echo '```' >> report.md - name: Report Conformance Test Result to PR Comment diff --git a/.gitignore b/.gitignore index 7efa9bb91..51599fbae 100644 --- a/.gitignore +++ b/.gitignore @@ -28,8 +28,8 @@ go.work dist .tmp -api7-ingress-controller -api7-ingress-controller-conformance-report.yaml +apisix-ingress-controller +apisix-ingress-controller-conformance-report.yaml *.mdx .cursor/ diff --git a/Dockerfile b/Dockerfile index be73d4518..7482180ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,8 +22,8 @@ ARG TARGETARCH WORKDIR /app COPY --from=deps /bin/adc /bin/adc -COPY ./bin/api7-ingress-controller_${TARGETARCH} ./api7-ingress-controller +COPY ./bin/apisix-ingress-controller_${TARGETARCH} ./apisix-ingress-controller COPY ./config/samples/config.yaml ./conf/config.yaml -ENTRYPOINT ["/app/api7-ingress-controller"] +ENTRYPOINT ["/app/apisix-ingress-controller"] CMD ["-c", "/app/conf/config.yaml"] diff --git a/Dockerfile.dev b/Dockerfile.dev index ff1bccbdd..b7f1e15c1 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -25,8 +25,8 @@ FROM debian:bullseye-slim WORKDIR /app COPY --from=node_builder /bin/adc /bin/adc -COPY ./bin/api7-ingress-controller . +COPY ./bin/apisix-ingress-controller . COPY ./config/samples/config.yaml ./conf/config.yaml -ENTRYPOINT ["/app/api7-ingress-controller"] +ENTRYPOINT ["/app/apisix-ingress-controller"] CMD ["-c", "/app/conf/config.yaml"] diff --git a/Makefile b/Makefile index 6011045ec..8908d71cc 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ IMG ?= api7/api7-ingress-controller:$(IMAGE_TAG) # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. ENVTEST_K8S_VERSION = 1.30.0 -KIND_NAME ?= api7-ingress-cluster +KIND_NAME ?= apisix-ingress-cluster GATEAY_API_VERSION ?= v1.2.0 DASHBOARD_VERSION ?= dev @@ -84,7 +84,7 @@ help: ## Display this help. .PHONY: manifests manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. - $(CONTROLLER_GEN) rbac:roleName=api7-ingress-manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases + $(CONTROLLER_GEN) rbac:roleName=apisix-ingress-manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases .PHONY: generate generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. @@ -169,7 +169,7 @@ kind-load-ingress-image: pull-infra-images: @docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev @docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-dp-manager:$(DASHBOARD_VERSION) - @docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-integrated:$(DASHBOARD_VERSION) + @docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-integrated:$(DASHBOARD_VERSION) @docker pull kennethreitz/httpbin:latest @docker pull jmalloc/echo-server:latest @@ -177,10 +177,10 @@ pull-infra-images: .PHONY: build build: manifests generate fmt vet ## Build manager binary. - GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=0 go build -o bin/api7-ingress-controller_$(GOARCH) -ldflags $(GO_LDFLAGS) cmd/main.go + GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=0 go build -o bin/apisix-ingress-controller_$(GOARCH) -ldflags $(GO_LDFLAGS) cmd/main.go linux-build: - GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o bin/api7-ingress-controller -ldflags $(GO_LDFLAGS) cmd/main.go + GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o bin/apisix-ingress-controller -ldflags $(GO_LDFLAGS) cmd/main.go .PHONY: build-image build-image: docker-build @@ -191,8 +191,8 @@ build-push-image: docker-build .PHONY: build-multi-arch build-multi-arch: - @CGO_ENABLED=0 GOARCH=amd64 go build -o bin/api7-ingress-controller_amd64 -ldflags $(GO_LDFLAGS) cmd/main.go - @CGO_ENABLED=0 GOARCH=arm64 go build -o bin/api7-ingress-controller_arm64 -ldflags $(GO_LDFLAGS) cmd/main.go + @CGO_ENABLED=0 GOARCH=amd64 go build -o bin/apisix-ingress-controller_amd64 -ldflags $(GO_LDFLAGS) cmd/main.go + @CGO_ENABLED=0 GOARCH=arm64 go build -o bin/apisix-ingress-controller_arm64 -ldflags $(GO_LDFLAGS) cmd/main.go .PHONY: build-multi-arch-image build-multi-arch-image: build-multi-arch @@ -229,10 +229,10 @@ PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le docker-buildx: ## Build and push docker image for the manager for cross-platform support # copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross - - $(CONTAINER_TOOL) buildx create --name api7-ingress-builder - $(CONTAINER_TOOL) buildx use api7-ingress-builder + - $(CONTAINER_TOOL) buildx create --name apisix-ingress-builder + $(CONTAINER_TOOL) buildx use apisix-ingress-builder - $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross . - - $(CONTAINER_TOOL) buildx rm api7-ingress-builder + - $(CONTAINER_TOOL) buildx rm apisix-ingress-builder rm Dockerfile.cross .PHONY: build-installer diff --git a/PROJECT b/PROJECT index d591634af..4685bcc24 100644 --- a/PROJECT +++ b/PROJECT @@ -5,7 +5,7 @@ domain: github.com layout: - go.kubebuilder.io/v4 -projectName: api7-ingress-controller +projectName: apisix-ingress-controller repo: github.com/api7/api7-ingress-controller resources: - api: diff --git a/README.md b/README.md index 7e1d535e5..5fb2e5fbe 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# api7-ingress-controller +# apisix-ingress-controller ## Description -The API7 Ingress Controller allows you to run the API7 Gateway as a Kubernetes Ingress to handle inbound traffic for a Kubernetes cluster. It dynamically configures and manages the API7 Gateway using Gateway API resources. +The APISIX Ingress Controller allows you to run the APISIX Gateway as a Kubernetes Ingress to handle inbound traffic for a Kubernetes cluster. It dynamically configures and manages the API7 Gateway using Gateway API resources. ## Document diff --git a/api/adc/types.go b/api/adc/types.go index d9d4a4db2..8d7b6c4bc 100644 --- a/api/adc/types.go +++ b/api/adc/types.go @@ -415,7 +415,7 @@ func NewDefaultService() *Service { return &Service{ Metadata: Metadata{ Labels: map[string]string{ - "managed-by": "api7-ingress-controller", + "managed-by": "apisix-ingress-controller", }, }, Plugins: make(Plugins), @@ -440,9 +440,9 @@ func NewDefaultUpstream() *Upstream { func NewDefaultRoute() *Route { return &Route{ Metadata: Metadata{ - Desc: "Created by api7-ingress-controller, DO NOT modify it manually", + Desc: "Created by apisix-ingress-controller, DO NOT modify it manually", Labels: map[string]string{ - "managed-by": "api7-ingress-controller", + "managed-by": "apisix-ingress-controller", }, }, } diff --git a/api/dashboard/v1/zz_generated.deepcopy.go b/api/dashboard/v1/zz_generated.deepcopy.go index e3d0d2cd2..241088840 100644 --- a/api/dashboard/v1/zz_generated.deepcopy.go +++ b/api/dashboard/v1/zz_generated.deepcopy.go @@ -1,16 +1,20 @@ //go:build !ignore_autogenerated -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* +Copyright 2024. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ // Code generated by controller-gen. DO NOT EDIT. diff --git a/charts/Chart.yaml b/charts/Chart.yaml index dcfa0cece..17425a5ce 100644 --- a/charts/Chart.yaml +++ b/charts/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -name: api7-ingress-controller-manager -description: Api7 Ingress Controller for Kubernetes +name: apisix-ingress-controller-manager +description: APISIX Ingress Controller for Kubernetes icon: https://apache.org/logos/res/apisix/apisix.png keywords: - ingress @@ -11,7 +11,7 @@ type: application version: 0.1.0 appVersion: 2.0.0 sources: - - https://github.com/api7/api7-ingress-controller + - https://github.com/apache/apisix-ingress-controller maintainers: - name: AlinsRan - name: Revolyssup diff --git a/charts/templates/_helpers.tpl b/charts/templates/_helpers.tpl index 164dac50e..0747678fe 100644 --- a/charts/templates/_helpers.tpl +++ b/charts/templates/_helpers.tpl @@ -1,7 +1,7 @@ {{/* Expand the name of the chart. */}} -{{- define "api7-ingress-controller-manager.name" -}} +{{- define "apisix-ingress-controller-manager.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} {{/* @@ -9,7 +9,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "api7-ingress-controller-manager.name.fullname" -}} +{{- define "apisix-ingress-controller-manager.name.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -24,15 +24,15 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "api7-ingress-controller-manager.chart" -}} +{{- define "apisix-ingress-controller-manager.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Common labels */}} -{{- define "api7-ingress-controller-manager.labels" -}} -helm.sh/chart: {{ include "api7-ingress-controller-manager.chart" . }} -{{ include "api7-ingress-controller-manager.selectorLabels" . }} +{{- define "apisix-ingress-controller-manager.labels" -}} +helm.sh/chart: {{ include "apisix-ingress-controller-manager.chart" . }} +{{ include "apisix-ingress-controller-manager.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -42,11 +42,11 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "api7-ingress-controller-manager.selectorLabels" -}} +{{- define "apisix-ingress-controller-manager.selectorLabels" -}} {{- if .Values.labelsOverride }} {{- tpl (.Values.labelsOverride | toYaml) . }} {{- else }} -app.kubernetes.io/name: {{ include "api7-ingress-controller-manager.name" . }} +app.kubernetes.io/name: {{ include "apisix-ingress-controller-manager.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{- end }} diff --git a/charts/templates/cluster_role.yaml b/charts/templates/cluster_role.yaml index 3260fb6a7..7effb5c25 100644 --- a/charts/templates/cluster_role.yaml +++ b/charts/templates/cluster_role.yaml @@ -1,7 +1,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ .Release.Name }}-api7-ingress-manager-role + name: {{ .Release.Name }}-apisix-ingress-manager-role rules: - apiGroups: - "" @@ -191,7 +191,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ .Release.Name }}-api7-ingress-metrics-auth-role + name: {{ .Release.Name }}-apisix-ingress-metrics-auth-role rules: - apiGroups: - authentication.k8s.io @@ -209,7 +209,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ .Release.Name }}-api7-ingress-metrics-reader + name: {{ .Release.Name }}-apisix-ingress-metrics-reader rules: - nonResourceURLs: - /metrics diff --git a/charts/templates/cluster_role_binding.yaml b/charts/templates/cluster_role_binding.yaml index 463efb1b8..eeea92d43 100644 --- a/charts/templates/cluster_role_binding.yaml +++ b/charts/templates/cluster_role_binding.yaml @@ -2,12 +2,12 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - {{- include "api7-ingress-controller-manager.labels" . | nindent 4 }} - name: {{ .Release.Name }}-api7-ingress-manager-rolebinding + {{- include "apisix-ingress-controller-manager.labels" . | nindent 4 }} + name: {{ .Release.Name }}-apisix-ingress-manager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: {{ .Release.Name }}-api7-ingress-manager-role + name: {{ .Release.Name }}-apisix-ingress-manager-role subjects: - kind: ServiceAccount name: {{ .Release.Name }} @@ -16,11 +16,11 @@ subjects: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: {{ .Release.Name }}-api7-ingress-metrics-auth-rolebinding + name: {{ .Release.Name }}-apisix-ingress-metrics-auth-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: {{ .Release.Name }}-api7-ingress-metrics-auth-role + name: {{ .Release.Name }}-apisix-ingress-metrics-auth-role subjects: - kind: ServiceAccount name: {{ .Release.Name }} diff --git a/charts/templates/configmap.yaml b/charts/templates/configmap.yaml index 68f07545c..376b7e8c3 100644 --- a/charts/templates/configmap.yaml +++ b/charts/templates/configmap.yaml @@ -11,9 +11,9 @@ data: log_level: {{ .Values.config.logLevel | default "info" }} - controller_name: {{ .Values.config.controllerName | default "apisix.apache.org/api7-ingress-controller" }} + controller_name: {{ .Values.config.controllerName | default "apisix.apache.org/apisix-ingress-controller" }} - leader_election_id: {{ .Values.config.leaderElection.id | default "api7-ingress-controller-leader" }} + leader_election_id: {{ .Values.config.leaderElection.id | default "apisix-ingress-controller-leader" }} leader_election: diff --git a/charts/templates/deployment.yaml b/charts/templates/deployment.yaml index 4a6f7f189..aae98ba3f 100644 --- a/charts/templates/deployment.yaml +++ b/charts/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - {{- include "api7-ingress-controller-manager.labels" . | nindent 4 }} + {{- include "apisix-ingress-controller-manager.labels" . | nindent 4 }} name: {{ .Release.Name }} namespace: {{ .Release.Namespace }} annotations: @@ -13,7 +13,7 @@ spec: replicas: {{ .Values.deployment.replicas }} selector: matchLabels: - {{- include "api7-ingress-controller-manager.selectorLabels" . | nindent 6 }} + {{- include "apisix-ingress-controller-manager.selectorLabels" . | nindent 6 }} template: metadata: annotations: @@ -23,7 +23,7 @@ spec: {{- end }} {{- end }} labels: - {{- include "api7-ingress-controller-manager.selectorLabels" . | nindent 8 }} + {{- include "apisix-ingress-controller-manager.selectorLabels" . | nindent 8 }} spec: containers: - env: diff --git a/charts/templates/role.yaml b/charts/templates/role.yaml index 711ec1ae9..851db5b80 100644 --- a/charts/templates/role.yaml +++ b/charts/templates/role.yaml @@ -2,8 +2,8 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: labels: - {{- include "api7-ingress-controller-manager.labels" . | nindent 4 }} - name: {{ .Release.Name }}-api7-ingress-leader-election-role + {{- include "apisix-ingress-controller-manager.labels" . | nindent 4 }} + name: {{ .Release.Name }}-apisix-ingress-leader-election-role namespace: {{ .Release.Namespace }} rules: - apiGroups: diff --git a/charts/templates/role_binding.yaml b/charts/templates/role_binding.yaml index e5dab2e1a..b9446732d 100644 --- a/charts/templates/role_binding.yaml +++ b/charts/templates/role_binding.yaml @@ -2,13 +2,13 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: labels: - {{- include "api7-ingress-controller-manager.labels" . | nindent 4 }} - name: {{ .Release.Name }}-api7-ingress-leader-election-rolebinding + {{- include "apisix-ingress-controller-manager.labels" . | nindent 4 }} + name: {{ .Release.Name }}-apisix-ingress-leader-election-rolebinding namespace: {{ .Release.Namespace }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: {{ .Release.Name }}-api7-ingress-leader-election-role + name: {{ .Release.Name }}-apisix-ingress-leader-election-role subjects: - kind: ServiceAccount name: {{ .Release.Name }} diff --git a/charts/templates/service-account.yaml b/charts/templates/service-account.yaml index 2f3da9936..cdc5457c3 100644 --- a/charts/templates/service-account.yaml +++ b/charts/templates/service-account.yaml @@ -2,6 +2,6 @@ apiVersion: v1 kind: ServiceAccount metadata: labels: - {{- include "api7-ingress-controller-manager.labels" . | nindent 4 }} + {{- include "apisix-ingress-controller-manager.labels" . | nindent 4 }} name: {{ .Release.Name }} namespace: {{ .Release.Namespace }} diff --git a/charts/templates/service.yaml b/charts/templates/service.yaml index 6d7008513..1ecc017d2 100644 --- a/charts/templates/service.yaml +++ b/charts/templates/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: labels: - {{- include "api7-ingress-controller-manager.labels" . | nindent 4 }} + {{- include "apisix-ingress-controller-manager.labels" . | nindent 4 }} name: {{ .Release.Name }}-metrics-service namespace: {{ .Release.Namespace }} spec: @@ -12,4 +12,4 @@ spec: protocol: TCP targetPort: 8443 selector: - {{- include "api7-ingress-controller-manager.selectorLabels" . | nindent 4 }} + {{- include "apisix-ingress-controller-manager.selectorLabels" . | nindent 4 }} diff --git a/charts/values.yaml b/charts/values.yaml index 02737875a..822ffcea2 100644 --- a/charts/values.yaml +++ b/charts/values.yaml @@ -41,9 +41,9 @@ config: certFile: "" keyFile: "" logLevel: "info" - controllerName: apisix.apache.org/api7-ingress-controller + controllerName: apisix.apache.org/apisix-ingress-controller leaderElection: - id: "api7-ingress-controller-leader" + id: "apisix-ingress-controller-leader" leaseDuration: "15s" renewDeadline: "10s" retryPeriod: "2s" diff --git a/cmd/root/root.go b/cmd/root/root.go index 11a394b70..a6cad996e 100644 --- a/cmd/root/root.go +++ b/cmd/root/root.go @@ -59,7 +59,7 @@ func (f *GatewayConfigsFlag) Type() string { } func NewRootCmd() *cobra.Command { - root := newAPI7IngressController() + root := newAPISIXIngressController() root.AddCommand(newVersionCmd()) return root } @@ -68,12 +68,12 @@ func newVersionCmd() *cobra.Command { var long bool cmd := &cobra.Command{ Use: "version", - Short: "version for api7-ingress-controller", + Short: "version for apisix-ingress-controller", Run: func(cmd *cobra.Command, _ []string) { if long { fmt.Print(version.Long()) } else { - fmt.Printf("api7-ingress-controller version %s\n", version.Short()) + fmt.Printf("apisix-ingress-controller version %s\n", version.Short()) } }, } @@ -83,13 +83,13 @@ func newVersionCmd() *cobra.Command { } -func newAPI7IngressController() *cobra.Command { +func newAPISIXIngressController() *cobra.Command { cfg := config.ControllerConfig var configPath string cmd := &cobra.Command{ - Use: "api7-ingress-controller [command]", - Long: "Yet another Ingress controller for Kubernetes using api7ee Gateway as the high performance reverse proxy.", + Use: "apisix-ingress-controller [command]", + Long: "Yet another Ingress controller for Kubernetes using APISIX Gateway as the high performance reverse proxy.", Version: version.Short(), RunE: func(cmd *cobra.Command, args []string) error { if configPath != "" { @@ -141,12 +141,12 @@ func newAPI7IngressController() *cobra.Command { "config-path", "c", "", - "configuration file path for api7-ingress-controller", + "configuration file path for apisix-ingress-controller", ) cmd.Flags().StringVar(&cfg.MetricsAddr, "metrics-bind-address", "0", "The address the metrics endpoint binds to. "+ "Use :8443 for HTTPS or :8080 for HTTP, or leave as 0 to disable the metrics service.") cmd.Flags().StringVar(&cfg.ProbeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.") - cmd.Flags().StringVar(&cfg.LogLevel, "log-level", config.DefaultLogLevel, "The log level for api7-ingress-controller") + cmd.Flags().StringVar(&cfg.LogLevel, "log-level", config.DefaultLogLevel, "The log level for apisix-ingress-controller") cmd.Flags().StringVar(&cfg.ControllerName, "controller-name", config.DefaultControllerName, diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index e82dba95e..87b8a237e 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -1,12 +1,12 @@ # Adds namespace to all resources. -namespace: api7-ingress-system +namespace: apisix-ingress-system # Value of this field is prepended to the # names of all resources, e.g. a deployment named # "wordpress" becomes "alices-wordpress". # Note that it should also match with the prefix (text before '-') of the namespace # field above. -namePrefix: api7-ingress- +namePrefix: apisix-ingress- # Labels to add to all resources and selectors. #labels: diff --git a/config/default/metrics_service.yaml b/config/default/metrics_service.yaml index 7029f38a9..b4aea0bfa 100644 --- a/config/default/metrics_service.yaml +++ b/config/default/metrics_service.yaml @@ -3,7 +3,7 @@ kind: Service metadata: labels: control-plane: controller-manager - app.kubernetes.io/name: api7-ingress + app.kubernetes.io/name: apisix-ingress app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-service namespace: system diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index cad82aaf6..8e7a2eec2 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -3,7 +3,7 @@ kind: Namespace metadata: labels: control-plane: controller-manager - app.kubernetes.io/name: api7-ingress + app.kubernetes.io/name: apisix-ingress app.kubernetes.io/managed-by: kustomize name: system --- @@ -14,7 +14,7 @@ metadata: namespace: system labels: control-plane: controller-manager - app.kubernetes.io/name: api7-ingress + app.kubernetes.io/name: apisix-ingress app.kubernetes.io/managed-by: kustomize spec: selector: diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index fc5abbf87..8a1cad4cb 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -4,7 +4,7 @@ kind: ServiceMonitor metadata: labels: control-plane: controller-manager - app.kubernetes.io/name: api7-ingress + app.kubernetes.io/name: apisix-ingress app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-monitor namespace: system diff --git a/config/rbac/gatewayproxy_editor_role.yaml b/config/rbac/gatewayproxy_editor_role.yaml index 66618d950..7ea08d91a 100644 --- a/config/rbac/gatewayproxy_editor_role.yaml +++ b/config/rbac/gatewayproxy_editor_role.yaml @@ -6,8 +6,8 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: gatewayproxy-editor-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: api7-ingress-controller - app.kubernetes.io/part-of: api7-ingress-controller + app.kubernetes.io/created-by: apisix-ingress-controller + app.kubernetes.io/part-of: apisix-ingress-controller app.kubernetes.io/managed-by: kustomize name: gatewayproxy-editor-role rules: diff --git a/config/rbac/gatewayproxy_viewer_role.yaml b/config/rbac/gatewayproxy_viewer_role.yaml index 7855334c6..75ae42552 100644 --- a/config/rbac/gatewayproxy_viewer_role.yaml +++ b/config/rbac/gatewayproxy_viewer_role.yaml @@ -6,8 +6,8 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: gatewayproxy-viewer-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: api7-ingress-controller - app.kubernetes.io/part-of: api7-ingress-controller + app.kubernetes.io/created-by: apisix-ingress-controller + app.kubernetes.io/part-of: apisix-ingress-controller app.kubernetes.io/managed-by: kustomize name: gatewayproxy-viewer-role rules: diff --git a/config/rbac/leader_election_role.yaml b/config/rbac/leader_election_role.yaml index 40e6a6aa3..5c2240b01 100644 --- a/config/rbac/leader_election_role.yaml +++ b/config/rbac/leader_election_role.yaml @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: labels: - app.kubernetes.io/name: api7-ingress + app.kubernetes.io/name: apisix-ingress app.kubernetes.io/managed-by: kustomize name: leader-election-role rules: diff --git a/config/rbac/leader_election_role_binding.yaml b/config/rbac/leader_election_role_binding.yaml index 1d37ef55c..25d3e8b09 100644 --- a/config/rbac/leader_election_role_binding.yaml +++ b/config/rbac/leader_election_role_binding.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: labels: - app.kubernetes.io/name: api7-ingress + app.kubernetes.io/name: apisix-ingress app.kubernetes.io/managed-by: kustomize name: leader-election-rolebinding roleRef: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 4ccd4f85c..56d015f69 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: api7-ingress-manager-role + name: apisix-ingress-manager-role rules: - apiGroups: - "" diff --git a/config/rbac/role_binding.yaml b/config/rbac/role_binding.yaml index 778f0d2dd..8dd86bc0c 100644 --- a/config/rbac/role_binding.yaml +++ b/config/rbac/role_binding.yaml @@ -2,13 +2,13 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - app.kubernetes.io/name: api7-ingress + app.kubernetes.io/name: apisix-ingress app.kubernetes.io/managed-by: kustomize name: manager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: api7-ingress-manager-role + name: apisix-ingress-manager-role subjects: - kind: ServiceAccount name: controller-manager diff --git a/config/rbac/service_account.yaml b/config/rbac/service_account.yaml index aae837ee6..655fe04c0 100644 --- a/config/rbac/service_account.yaml +++ b/config/rbac/service_account.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ServiceAccount metadata: labels: - app.kubernetes.io/name: api7-ingress + app.kubernetes.io/name: apisix-ingress app.kubernetes.io/managed-by: kustomize name: controller-manager namespace: system diff --git a/config/samples/config.yaml b/config/samples/config.yaml index ab0423512..9c208f306 100644 --- a/config/samples/config.yaml +++ b/config/samples/config.yaml @@ -1,11 +1,11 @@ -log_level: "info" # The log level of the API7 Ingress Controller. +log_level: "info" # The log level of the APISIX Ingress Controller. # the default value is "info". -controller_name: apisix.apache.org/api7-ingress-controller # The controller name of the API7 Ingress Controller, +controller_name: apisix.apache.org/apisix-ingress-controller # The controller name of the APISIX Ingress Controller, # which is used to identify the controller in the GatewayClass. - # The default value is "apisix.apache.org/api7-ingress-controller". -leader_election_id: "api7-ingress-controller-leader" # The leader election ID for the API7 Ingress Controller. - # The default value is "api7-ingress-controller-leader". + # The default value is "apisix.apache.org/apisix-ingress-controller". +leader_election_id: "apisix-ingress-controller-leader" # The leader election ID for the APISIX Ingress Controller. + # The default value is "apisix-ingress-controller-leader". leader_election: lease_duration: 30s # lease_duration is the duration that non-leader candidates will wait # after observing a leadership renewal until attempting to acquire leadership of a diff --git a/config/samples/gateway.apisix.io_v1alpha1_gatewayproxy.yaml b/config/samples/gateway.apisix.io_v1alpha1_gatewayproxy.yaml index 95f0bf447..19d7c8588 100644 --- a/config/samples/gateway.apisix.io_v1alpha1_gatewayproxy.yaml +++ b/config/samples/gateway.apisix.io_v1alpha1_gatewayproxy.yaml @@ -4,9 +4,9 @@ metadata: labels: app.kubernetes.io/name: gatewayproxy app.kubernetes.io/instance: gatewayproxy-sample - app.kubernetes.io/part-of: api7-ingress-controller + app.kubernetes.io/part-of: apisix-ingress-controller app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: api7-ingress-controller + app.kubernetes.io/created-by: apisix-ingress-controller name: gatewayproxy-sample spec: pluginMetadata: diff --git a/config/samples/gateway.apisix.io_v1alpha1_httproutepolicy.yaml b/config/samples/gateway.apisix.io_v1alpha1_httproutepolicy.yaml index d9d887903..b47f40de4 100644 --- a/config/samples/gateway.apisix.io_v1alpha1_httproutepolicy.yaml +++ b/config/samples/gateway.apisix.io_v1alpha1_httproutepolicy.yaml @@ -2,7 +2,7 @@ apiVersion: apisix.apache.org/v1alpha1 kind: HTTPRoutePolicy metadata: labels: - app.kubernetes.io/name: api7-ingress-controller + app.kubernetes.io/name: apisix-ingress-controller app.kubernetes.io/managed-by: kustomize name: httproutepolicy-sample spec: diff --git a/docs/concepts.md b/docs/concepts.md index d7fbb06c8..c320753a6 100644 --- a/docs/concepts.md +++ b/docs/concepts.md @@ -1,10 +1,10 @@ # Concepts -The API7 Ingress Controller is used to manage the API7 Gateway as either a standalone application or a Kubernetes-based application. It dynamically configures and manages the API7 Gateway using Gateway API resources. +The APISIX Ingress Controller is used to manage the APISIX Gateway as either a standalone application or a Kubernetes-based application. It dynamically configures and manages the API7 Gateway using Gateway API resources. ## Architecture -![API7 Ingress Controller Architecture](./assets/images/api7-ingress-controller-architecture.png) +![APISIX Ingress Controller Architecture](./assets/images/api7-ingress-controller-architecture.png) ## Kubernetes Resources @@ -12,13 +12,13 @@ The API7 Ingress Controller is used to manage the API7 Gateway as either a stand In Kubernetes, a Service is a method to expose network applications running on a set of Pods as network services. -When proxying ingress traffic, API7 Gateway by default directs traffic directly to the Pods instead of through kube-proxy. +When proxying ingress traffic, APISIX Gateway by default directs traffic directly to the Pods instead of through kube-proxy. ### EndpointSlicea EndpointSlice objects represent subsets (slices) of backend network endpoints for a Service. -The API7 Ingress Controller continuously tracks matching EndpointSlice objects, and whenever the set of Pods in a Service changes, the set of Pods proxied by the API7 Gateway will also update accordingly. +The APISIX Ingress Controller continuously tracks matching EndpointSlice objects, and whenever the set of Pods in a Service changes, the set of Pods proxied by the APISIX Gateway will also update accordingly. ## Gateway API diff --git a/docs/configure.md b/docs/configure.md index 6ed47ef2a..ab21ff48a 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -1,19 +1,19 @@ # Configure -The API7 Ingress Controller is a Kubernetes Ingress Controller that implements the Gateway API. This document describes how to configure the API7 Ingress Controller. +The APISIX Ingress Controller is a Kubernetes Ingress Controller that implements the Gateway API. This document describes how to configure the APISIX Ingress Controller. ## Example ```yaml -log_level: "info" # The log level of the API7 Ingress Controller. +log_level: "info" # The log level of the APISIX Ingress Controller. # the default value is "info". -controller_name: apisix.apache.org/api7-ingress-controller # The controller name of the API7 Ingress Controller, +controller_name: apisix.apache.org/apisix-ingress-controller # The controller name of the APISIX Ingress Controller, # which is used to identify the controller in the GatewayClass. - # The default value is "apisix.apache.org/api7-ingress-controller". + # The default value is "apisix.apache.org/apisix-ingress-controller". -leader_election_id: "api7-ingress-controller-leader" # The leader election ID for the API7 Ingress Controller. - # The default value is "api7-ingress-controller-leader". +leader_election_id: "apisix-ingress-controller-leader" # The leader election ID for the APISIX Ingress Controller. + # The default value is "apisix-ingress-controller-leader". ``` ### Controller Name @@ -24,9 +24,9 @@ The `controller_name` field is used to identify the `controllerName` in the Gate apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: - name: api7 + name: apisix spec: - controllerName: "apisix.apache.org/api7-ingress-controller" + controllerName: "apisix.apache.org/apisix-ingress-controller" ``` ### Addresses @@ -39,7 +39,7 @@ apiVersion: gateway.networking.k8s.io/v1 metadata: name: gateway1 spec: - gatewayClassName: api7 + gatewayClassName: apisix listeners: - name: http port: 80 diff --git a/docs/crd/api.md b/docs/crd/api.md index f42684721..27636a0e2 100644 --- a/docs/crd/api.md +++ b/docs/crd/api.md @@ -1,10 +1,10 @@ --- title: Resource Definitions API Reference -slug: /reference/api7-ingress-controller/crd-reference -description: Explore detailed reference documentation for the custom resource definitions (CRDs) supported by the API7 Ingress Controller. +slug: /reference/apisix-ingress-controller/crd-reference +description: Explore detailed reference documentation for the custom resource definitions (CRDs) supported by the APISIX Ingress Controller. --- -This document provides the API resource description for the API7 Ingress Controller. +This document provides the API resource description for the APISIX Ingress Controller. ## Packages - [apisix.apache.org/v1alpha1](#apisixapacheorgv1alpha1) diff --git a/docs/gateway-api.md b/docs/gateway-api.md index 0311a6b40..459ff5a83 100644 --- a/docs/gateway-api.md +++ b/docs/gateway-api.md @@ -3,7 +3,7 @@ Gateway API is dedicated to achieving expressive and scalable Kubernetes service networking through various custom resources. -By supporting Gateway API, the API7 Ingress controller can realize richer functions, including Gateway management, multi-cluster support, and other features. It is also possible to manage running instances of the API7 gateway through Gateway API resource management. +By supporting Gateway API, the APISIX Ingress controller can realize richer functions, including Gateway management, multi-cluster support, and other features. It is also possible to manage running instances of the APISIX gateway through Gateway API resource management. ## Concepts @@ -39,19 +39,19 @@ The following example demonstrates how to configure an HTTPRoute resource to rou apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: - name: api7 + name: apisix spec: - controllerName: "apisix.apache.org/api7-ingress-controller" + controllerName: "apisix.apache.org/apisix-ingress-controller" --- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: - name: api7ee + name: apisix namespace: default spec: - gatewayClassName: api7 + gatewayClassName: apisix listeners: - name: http protocol: HTTP @@ -65,7 +65,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - backends.example rules: diff --git a/docs/quickstart.md b/docs/quickstart.md index bf2419350..da0a3a686 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -1,6 +1,6 @@ # Quickstart -This quickstart guide will help you get started with API7 Ingress Controller in a few simple steps. +This quickstart guide will help you get started with APISIX Ingress Controller in a few simple steps. ## Prerequisites @@ -21,10 +21,10 @@ kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/downloa ``` -Install The API7 Ingress Controller: +Install The APISIX Ingress Controller: ```shell -kubectl apply -f https://github.com/api7/api7-ingress-controller/releases/download/install.yaml +kubectl apply -f https://github.com/apache/apisix-ingress-controller/releases/download/install.yaml ``` @@ -33,22 +33,22 @@ kubectl apply -f https://github.com/api7/api7-ingress-controller/releases/downlo Install the GatewayClass, Gateway, HTTPRoute and httpbin example app: ```shell -kubectl apply -f https://github.com/api7/api7-ingress-controller/blob/release-v2-dev/examples/quickstart.yaml +kubectl apply -f https://github.com/apache/apisix-ingress-controller/blob/release-v2-dev/examples/quickstart.yaml ``` Requests will be forwarded by the gateway to the httpbin application: ```shell -curl http://{api7_gateway_loadbalancer_ip}/headers +curl http://{apisix_gateway_loadbalancer_ip}/headers ``` -:::Note If the API7 Gateway service without loadbalancer +:::Note If the APISIX Gateway service without loadbalancer -You can forward the local port to the API7 Gateway service with the following command: +You can forward the local port to the APISIX Gateway service with the following command: ```shell # Listen on port 9080 locally, forwarding to 80 in the pod -kubectl port-forward svc/${api7-gateway-svc} 9080:80 -n ${api7_gateway_namespace} +kubectl port-forward svc/${apisix-gateway-svc} 9080:80 -n ${apisix_gateway_namespace} ``` Now you can send HTTP requests to access it: diff --git a/docs/template/gv_list.tpl b/docs/template/gv_list.tpl index a10ded3ef..a6414c17c 100644 --- a/docs/template/gv_list.tpl +++ b/docs/template/gv_list.tpl @@ -3,11 +3,11 @@ --- title: Resource Definitions API Reference -slug: /reference/api7-ingress-controller/crd-reference -description: Explore detailed reference documentation for the custom resource definitions (CRDs) supported by the API7 Ingress Controller. +slug: /reference/apisix-ingress-controller/crd-reference +description: Explore detailed reference documentation for the custom resource definitions (CRDs) supported by the APISIX Ingress Controller. --- -This document provides the API resource description for the API7 Ingress Controller. +This document provides the API resource description for the APISIX Ingress Controller. ## Packages {{- range $groupVersions }} diff --git a/examples/httpbin/httproute.yaml b/examples/httpbin/httproute.yaml index fda2b96bf..b789b2dc4 100644 --- a/examples/httpbin/httproute.yaml +++ b/examples/httpbin/httproute.yaml @@ -1,16 +1,16 @@ apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: - name: api7 + name: apisix spec: - controllerName: "apisix.apache.org/api7-ingress-controller" + controllerName: "apisix.apache.org/apisix-ingress-controller" --- apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: ControlPlane @@ -27,9 +27,9 @@ spec: apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: - name: api7ee + name: apisix spec: - gatewayClassName: api7 + gatewayClassName: apisix listeners: - name: http protocol: HTTP @@ -38,7 +38,7 @@ spec: parametersRef: group: apisix.apache.org kind: GatewayProxy - name: api7-proxy-config + name: apisix-proxy-config --- @@ -48,7 +48,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example.com rules: diff --git a/examples/httpbin/ingress.yaml b/examples/httpbin/ingress.yaml index 3c195f3f8..9e6b226a5 100644 --- a/examples/httpbin/ingress.yaml +++ b/examples/httpbin/ingress.yaml @@ -1,7 +1,7 @@ apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config namespace: default spec: provider: @@ -19,13 +19,13 @@ spec: apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: - name: api7 + name: apisix spec: - controller: "apisix.apache.org/api7-ingress-controller" + controller: "apisix.apache.org/apisix-ingress-controller" parameters: apiGroup: "apisix.apache.org" kind: "GatewayProxy" - name: "api7-proxy-config" + name: "apisix-proxy-config" namespace: "default" scope: "Namespace" @@ -34,9 +34,9 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: api7-ingress + name: apisix-ingress spec: - ingressClassName: api7 + ingressClassName: apisix rules: - host: httpbin.example.com http: diff --git a/examples/httpbin/quickstart.yaml b/examples/httpbin/quickstart.yaml index 7ca01b72c..36efed055 100644 --- a/examples/httpbin/quickstart.yaml +++ b/examples/httpbin/quickstart.yaml @@ -59,16 +59,16 @@ spec: apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: - name: api7 + name: apisix spec: - controllerName: "apisix.apache.org/api7-ingress-controller" + controllerName: "apisix.apache.org/apisix-ingress-controller" --- apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: ControlPlane @@ -85,9 +85,9 @@ spec: apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: - name: api7ee + name: apisix spec: - gatewayClassName: api7 + gatewayClassName: apisix listeners: - name: http protocol: HTTP @@ -96,7 +96,7 @@ spec: parametersRef: group: apisix.apache.org kind: GatewayProxy - name: api7-proxy-config + name: apisix-proxy-config --- @@ -106,7 +106,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example.com rules: diff --git a/internal/controller/config/types.go b/internal/controller/config/types.go index 9d46cf0c7..d0a0c5821 100644 --- a/internal/controller/config/types.go +++ b/internal/controller/config/types.go @@ -19,12 +19,12 @@ import ( const ( // IngressAPISIXLeader is the default election id for the controller // leader election. - DefaultLeaderElectionID = "api7-ingress-gateway-leader" + DefaultLeaderElectionID = "apisix-ingress-gateway-leader" // IngressClass is the default ingress class name, used for Ingress // object's IngressClassName field in Kubernetes clusters version v1.18.0 // or higher, or the annotation "kubernetes.io/ingress.class" (deprecated). - DefaultControllerName = "apisix.apache.org/api7-ingress-controller" + DefaultControllerName = "apisix.apache.org/apisix-ingress-controller" // DefaultLogLevel is the default log level for apisix-ingress-controller. DefaultLogLevel = "info" diff --git a/internal/controller/gatewayclass_congroller.go b/internal/controller/gatewayclass_congroller.go index 2df100af5..b1d8d25cb 100644 --- a/internal/controller/gatewayclass_congroller.go +++ b/internal/controller/gatewayclass_congroller.go @@ -104,7 +104,7 @@ func (r *GatewayClassReconciler) Reconcile(ctx context.Context, req ctrl.Request Status: meta.ConditionTrue, Reason: string(gatewayv1.GatewayClassReasonAccepted), ObservedGeneration: gc.Generation, - Message: "the gatewayclass has been accepted by the api7-ingress-controller", + Message: "the gatewayclass has been accepted by the apisix-ingress-controller", LastTransitionTime: meta.Now(), } diff --git a/internal/controller/label/label.go b/internal/controller/label/label.go index d98fcb30c..25c30aa06 100644 --- a/internal/controller/label/label.go +++ b/internal/controller/label/label.go @@ -34,7 +34,7 @@ func GenLabel(client client.Object, args ...string) Label { label[LabelNamespace] = client.GetNamespace() label[LabelName] = client.GetName() label[LabelControllerName] = config.ControllerConfig.ControllerName - label[LabelManagedBy] = "api7-ingress-controller" + label[LabelManagedBy] = "apisix-ingress-controller" for i := 0; i < len(args); i += 2 { label[args[i]] = args[i+1] } diff --git a/internal/controller/utils.go b/internal/controller/utils.go index 4f3fe9649..b342b6388 100644 --- a/internal/controller/utils.go +++ b/internal/controller/utils.go @@ -57,7 +57,7 @@ func IsDefaultIngressClass(obj client.Object) bool { } func acceptedMessage(kind string) string { - return fmt.Sprintf("the %s has been accepted by the api7-ingress-controller", kind) + return fmt.Sprintf("the %s has been accepted by the apisix-ingress-controller", kind) } func MergeCondition(conditions []metav1.Condition, newCondition metav1.Condition) []metav1.Condition { diff --git a/internal/provider/adc/cache/indexer.go b/internal/provider/adc/cache/indexer.go index 671dd1fb9..dc530e61f 100644 --- a/internal/provider/adc/cache/indexer.go +++ b/internal/provider/adc/cache/indexer.go @@ -1,3 +1,15 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package cache import ( diff --git a/internal/provider/adc/cache/memdb.go b/internal/provider/adc/cache/memdb.go index 50e22c983..f18b9e51d 100644 --- a/internal/provider/adc/cache/memdb.go +++ b/internal/provider/adc/cache/memdb.go @@ -1,3 +1,15 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package cache import ( diff --git a/internal/provider/adc/cache/noop_db.go b/internal/provider/adc/cache/noop_db.go index 7fb396010..8636b0d7a 100644 --- a/internal/provider/adc/cache/noop_db.go +++ b/internal/provider/adc/cache/noop_db.go @@ -1,3 +1,15 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package cache import ( diff --git a/internal/provider/adc/cache/schema.go b/internal/provider/adc/cache/schema.go index f43d08c2d..e50bf3117 100644 --- a/internal/provider/adc/cache/schema.go +++ b/internal/provider/adc/cache/schema.go @@ -1,3 +1,15 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package cache import ( diff --git a/internal/provider/adc/store.go b/internal/provider/adc/store.go index 05a2a61d5..57694a6ac 100644 --- a/internal/provider/adc/store.go +++ b/internal/provider/adc/store.go @@ -1,3 +1,15 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package adc import ( @@ -6,7 +18,7 @@ import ( "github.com/api7/gopkg/pkg/log" adctypes "github.com/api7/api7-ingress-controller/api/adc" - label "github.com/api7/api7-ingress-controller/internal/controller/label" + "github.com/api7/api7-ingress-controller/internal/controller/label" "github.com/api7/api7-ingress-controller/internal/provider/adc/cache" ) diff --git a/pkg/dashboard/cluster.go b/pkg/dashboard/cluster.go index 1b33efbc9..f0507ff0a 100644 --- a/pkg/dashboard/cluster.go +++ b/pkg/dashboard/cluster.go @@ -54,7 +54,7 @@ var ( ErrFunctionDisabled = errors.New("function disabled") DefaultLabelsManagedBy map[string]string = map[string]string{ - "managed-by": "api7-ingress-controller", + "managed-by": "apisix-ingress-controller", } // ErrRouteNotFound means the [route, ssl, upstream] was not found. @@ -342,7 +342,7 @@ func (c *cluster) HasSynced(ctx context.Context) error { return ctx.Err() case <-c.cacheSynced: if c.cacheSyncErr != nil { - // See https://github.com/apache/api7-ingress-controller/issues/448 + // See https://github.com/apache/apisix-ingress-controller/issues/448 // for more details. return c.cacheSyncErr } diff --git a/test/conformance/conformance_test.go b/test/conformance/conformance_test.go index 282766878..9d180893e 100644 --- a/test/conformance/conformance_test.go +++ b/test/conformance/conformance_test.go @@ -67,8 +67,8 @@ func TestGatewayAPIConformance(t *testing.T) { opts.SupportedFeatures = sets.New(gatewaySupportedFeatures...) opts.SkipTests = append(skippedTestsForSSL, skippedTestsForTraditionalRoutes...) opts.Implementation = conformancev1.Implementation{ - Organization: "API7", - Project: "api7-ingress-controller", + Organization: "APISIX", + Project: "apisix-ingress-controller", URL: "https://github.com/api7/api7-ingress-controller.git", Version: "v2.0.0", } @@ -84,7 +84,7 @@ func TestGatewayAPIConformance(t *testing.T) { t.Fatalf("failed to run the gateway conformance test suite: %v", err) } - const reportFileName = "api7-ingress-controller-conformance-report.yaml" + const reportFileName = "apisix-ingress-controller-conformance-report.yaml" report, err := cSuite.Report() if err != nil { t.Fatalf("failed to get the gateway conformance test report: %v", err) diff --git a/test/conformance/suite_test.go b/test/conformance/suite_test.go index 18bb3b132..87e07bb9a 100644 --- a/test/conformance/suite_test.go +++ b/test/conformance/suite_test.go @@ -28,8 +28,8 @@ import ( "github.com/api7/api7-ingress-controller/test/e2e/framework" ) -var gatewayClassName = "api7" -var controllerName = "apisix.apache.org/api7-ingress-controller" +var gatewayClassName = "apisix" +var controllerName = "apisix.apache.org/apisix-ingress-controller" var gatewayClass = fmt.Sprintf(` apiVersion: gateway.networking.k8s.io/v1 @@ -74,7 +74,7 @@ func deleteNamespace(kubectl *k8s.KubectlOptions) { "gateway-conformance-infra", "gateway-conformance-web-backend", "gateway-conformance-app-backend", - "api7ee-conformance-test", + "apisix-conformance-test", } for _, ns := range namespacesToDelete { @@ -123,19 +123,19 @@ func TestMain(m *testing.M) { kubectl := k8s.NewKubectlOptions("", "", "default") deleteNamespace(kubectl) - namespace := "api7ee-conformance-test" + namespace := "apisix-conformance-test" k8s.KubectlApplyFromString(GinkgoT(), kubectl, gatewayClass) defer k8s.KubectlDeleteFromString(GinkgoT(), kubectl, gatewayClass) k8s.CreateNamespace(GinkgoT(), kubectl, namespace) defer k8s.DeleteNamespace(GinkgoT(), kubectl, namespace) - gatewayGouopId := f.CreateNewGatewayGroupWithIngress() - adminKey := f.GetAdminKey(gatewayGouopId) + gatewayGroupId := f.CreateNewGatewayGroupWithIngress() + adminKey := f.GetAdminKey(gatewayGroupId) svc := f.DeployGateway(framework.DataPlaneDeployOptions{ Namespace: namespace, - GatewayGroupID: gatewayGouopId, + GatewayGroupID: gatewayGroupId, DPManagerEndpoint: framework.DPManagerTLSEndpoint, SetEnv: true, SSLKey: framework.TestKey, @@ -154,7 +154,7 @@ func TestMain(m *testing.M) { address := svc.Status.LoadBalancer.Ingress[0].IP f.DeployIngress(framework.IngressDeployOpts{ - ControllerName: "apisix.apache.org/api7-ingress-controller", + ControllerName: "apisix.apache.org/apisix-ingress-controller", AdminKey: adminKey, AdminTLSVerify: false, Namespace: namespace, diff --git a/test/e2e/crds/backendtrafficpolicy.go b/test/e2e/crds/backendtrafficpolicy.go index 707519ea1..da3a7f4e9 100644 --- a/test/e2e/crds/backendtrafficpolicy.go +++ b/test/e2e/crds/backendtrafficpolicy.go @@ -30,7 +30,7 @@ var _ = Describe("Test BackendTrafficPolicy base on HTTPRoute", func() { apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: ControlPlane @@ -56,7 +56,7 @@ spec: apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: - name: api7ee + name: apisix spec: gatewayClassName: %s listeners: @@ -67,7 +67,7 @@ spec: parametersRef: group: apisix.apache.org kind: GatewayProxy - name: api7-proxy-config + name: apisix-proxy-config ` var defaultHTTPRoute = ` @@ -77,7 +77,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - "httpbin.org" rules: @@ -159,14 +159,14 @@ spec: var _ = Describe("Test BackendTrafficPolicy base on Ingress", func() { s := scaffold.NewScaffold(&scaffold.Options{ - ControllerName: "apisix.apache.org/api7-ingress-controller", + ControllerName: "apisix.apache.org/apisix-ingress-controller", }) var defaultGatewayProxy = ` apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config namespace: default spec: provider: @@ -183,15 +183,15 @@ spec: apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: - name: api7-default + name: apisix-default annotations: ingressclass.kubernetes.io/is-default-class: "true" spec: - controller: "apisix.apache.org/api7-ingress-controller" + controller: "apisix.apache.org/apisix-ingress-controller" parameters: apiGroup: "apisix.apache.org" kind: "GatewayProxy" - name: "api7-proxy-config" + name: "apisix-proxy-config" namespace: "default" scope: "Namespace" ` @@ -200,7 +200,7 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: api7-ingress-default + name: apisix-ingress-default spec: rules: - host: httpbin.org diff --git a/test/e2e/crds/consumer.go b/test/e2e/crds/consumer.go index 6256b355e..1d0868e81 100644 --- a/test/e2e/crds/consumer.go +++ b/test/e2e/crds/consumer.go @@ -31,7 +31,7 @@ var _ = Describe("Test Consumer", func() { apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: ControlPlane @@ -57,7 +57,7 @@ spec: apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: - name: api7ee + name: apisix spec: gatewayClassName: %s listeners: @@ -68,7 +68,7 @@ spec: parametersRef: group: apisix.apache.org kind: GatewayProxy - name: api7-proxy-config + name: apisix-proxy-config ` var defaultHTTPRoute = ` @@ -92,7 +92,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - "httpbin.org" rules: @@ -119,7 +119,7 @@ metadata: name: consumer-sample spec: gatewayRef: - name: api7ee + name: apisix credentials: - type: key-auth name: key-auth-sample @@ -141,7 +141,7 @@ metadata: name: consumer-sample2 spec: gatewayRef: - name: api7ee + name: apisix credentials: - type: key-auth name: key-auth-sample @@ -198,7 +198,7 @@ metadata: name: consumer-sample spec: gatewayRef: - name: api7ee + name: apisix credentials: - type: basic-auth name: basic-auth-sample @@ -220,7 +220,7 @@ metadata: name: consumer-sample spec: gatewayRef: - name: api7ee + name: apisix credentials: - type: basic-auth name: basic-auth-sample @@ -340,7 +340,7 @@ metadata: name: consumer-sample spec: gatewayRef: - name: api7ee + name: apisix credentials: - type: basic-auth name: basic-auth-sample @@ -434,7 +434,7 @@ metadata: name: consumer-sample spec: gatewayRef: - name: api7ee + name: apisix credentials: - type: basic-auth name: basic-auth-sample @@ -446,7 +446,7 @@ spec: apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: ControlPlane diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 1ce81593e..ce8126d5e 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -34,6 +34,6 @@ func TestE2E(t *testing.T) { BeforeSuite(f.BeforeSuite) AfterSuite(f.AfterSuite) - _, _ = fmt.Fprintf(GinkgoWriter, "Starting api7-ingress suite\n") + _, _ = fmt.Fprintf(GinkgoWriter, "Starting apisix-ingress suite\n") RunSpecs(t, "e2e suite") } diff --git a/test/e2e/framework/consts.go b/test/e2e/framework/consts.go index af74a4bcc..d4ad9ba3f 100644 --- a/test/e2e/framework/consts.go +++ b/test/e2e/framework/consts.go @@ -14,33 +14,12 @@ package framework import ( _ "embed" - "fmt" ) const ( - DashboardEndpoint = "http://api7ee3-dashboard.api7-ee-e2e:7080" - DashboardTLSEndpoint = "https://api7ee3-dashboard.api7-ee-e2e:7443" - DataPlaneEndpoint = "http://api7ee3-apisix-gateway:80" // has two instances - DataPlaneForIngressEndpoint = "http://api7ee3-apisix-gateway-ingress:80" // only one instances - DataPlaneForIngressHost = "api7ee3-apisix-gateway-ingress" - DataPlaneTcpPort = 9100 - MTLSDataPlaneHost = "api7ee3-apisix-gateway-mtls" - MTLSDataPlaneEndpoint = "http://api7ee3-apisix-gateway-mtls:80" // only one instance - PrometheusEndpoint = "http://api7-prometheus-server:9090" - DPManagerEndpoint = "http://api7ee3-dp-manager.api7-ee-e2e:7900" - DPManagerTLSEndpoint = "https://api7ee3-dp-manager.api7-ee-e2e:7943" - VaultEndpoint = "http://api7ee3-vault:8200" - KeycloakEndpoint = "http://api7ee3-keycloak:80" -) - -const ( - KeycloakUsername = "kc_admin" - KeycloakPassword = "4a5524de-27e8-42a8-a538-7485c4b86331" - KeycloakDefaultRealm = "master" -) - -var ( - DefaultGatewayGroupKeyPrefix = fmt.Sprintf("/gateway_groups/%s", "default") + DashboardEndpoint = "http://api7ee3-dashboard.api7-ee-e2e:7080" + DashboardTLSEndpoint = "https://api7ee3-dashboard.api7-ee-e2e:7443" + DPManagerTLSEndpoint = "https://api7ee3-dp-manager.api7-ee-e2e:7943" ) var ( diff --git a/test/e2e/framework/manifests/ingress.yaml b/test/e2e/framework/manifests/ingress.yaml index 925568a40..fc63585f6 100644 --- a/test/e2e/framework/manifests/ingress.yaml +++ b/test/e2e/framework/manifests/ingress.yaml @@ -5,8 +5,8 @@ kind: ServiceAccount metadata: labels: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: api7-ingress - name: api7-ingress-controller-manager + app.kubernetes.io/name: apisix-ingress + name: apisix-ingress-controller-manager namespace: {{ .Namespace }} --- apiVersion: rbac.authorization.k8s.io/v1 @@ -14,8 +14,8 @@ kind: Role metadata: labels: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: api7-ingress - name: api7-ingress-leader-election-role + app.kubernetes.io/name: apisix-ingress + name: apisix-ingress-leader-election-role namespace: {{ .Namespace }} rules: - apiGroups: @@ -53,7 +53,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: api7-ingress-manager-role + name: apisix-ingress-manager-role rules: - apiGroups: - "" @@ -257,7 +257,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: api7-ingress-metrics-auth-role + name: apisix-ingress-metrics-auth-role rules: - apiGroups: - authentication.k8s.io @@ -275,7 +275,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: api7-ingress-metrics-reader + name: apisix-ingress-metrics-reader rules: - nonResourceURLs: - /metrics @@ -287,16 +287,16 @@ kind: RoleBinding metadata: labels: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: api7-ingress - name: api7-ingress-leader-election-rolebinding + app.kubernetes.io/name: apisix-ingress + name: apisix-ingress-leader-election-rolebinding namespace: {{ .Namespace }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: api7-ingress-leader-election-role + name: apisix-ingress-leader-election-role subjects: - kind: ServiceAccount - name: api7-ingress-controller-manager + name: apisix-ingress-controller-manager namespace: {{ .Namespace }} --- apiVersion: rbac.authorization.k8s.io/v1 @@ -304,28 +304,28 @@ kind: ClusterRoleBinding metadata: labels: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: api7-ingress - name: api7-ingress-manager-rolebinding + app.kubernetes.io/name: apisix-ingress + name: apisix-ingress-manager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: api7-ingress-manager-role + name: apisix-ingress-manager-role subjects: - kind: ServiceAccount - name: api7-ingress-controller-manager + name: apisix-ingress-controller-manager namespace: {{ .Namespace }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: api7-ingress-metrics-auth-rolebinding + name: apisix-ingress-metrics-auth-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: api7-ingress-metrics-auth-role + name: apisix-ingress-metrics-auth-role subjects: - kind: ServiceAccount - name: api7-ingress-controller-manager + name: apisix-ingress-controller-manager namespace: {{ .Namespace }} --- @@ -337,9 +337,9 @@ data: config.yaml: | log_level: "debug" - controller_name: {{ .ControllerName | default "apisix.apache.org/api7-ingress-controller" }} + controller_name: {{ .ControllerName | default "apisix.apache.org/apisix-ingress-controller" }} - leader_election_id: "api7-ingress-controller-leader" + leader_election_id: "apisix-ingress-controller-leader" provider: sync_period: 0s # The period between two consecutive syncs. @@ -352,9 +352,9 @@ kind: Service metadata: labels: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: api7-ingress + app.kubernetes.io/name: apisix-ingress control-plane: controller-manager - name: api7-ingress-controller-manager-metrics-service + name: apisix-ingress-controller-manager-metrics-service namespace: {{ .Namespace }} spec: ports: @@ -370,23 +370,23 @@ kind: Deployment metadata: labels: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: api7-ingress - app: api7-ingress-controller + app.kubernetes.io/name: apisix-ingress + app: apisix-ingress-controller control-plane: controller-manager - name: api7-ingress-controller-manager + name: apisix-ingress-controller-manager namespace: {{ .Namespace }} spec: replicas: {{ .Replicas | default 1 }} selector: matchLabels: - app: api7-ingress-controller + app: apisix-ingress-controller control-plane: controller-manager template: metadata: annotations: kubectl.kubernetes.io/default-container: manager labels: - app: api7-ingress-controller + app: apisix-ingress-controller control-plane: controller-manager spec: containers: @@ -433,5 +433,5 @@ spec: - name: ingress-config configMap: name: ingress-config - serviceAccountName: api7-ingress-controller-manager + serviceAccountName: apisix-ingress-controller-manager terminationGracePeriodSeconds: 10 diff --git a/test/e2e/gatewayapi/controller.go b/test/e2e/gatewayapi/controller.go index b3f4f8bfc..cbbb1c2d7 100644 --- a/test/e2e/gatewayapi/controller.go +++ b/test/e2e/gatewayapi/controller.go @@ -30,7 +30,7 @@ var _ = Describe("Check if controller cache gets synced with correct resources", apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: ControlPlane @@ -69,7 +69,7 @@ spec: parametersRef: group: apisix.apache.org kind: GatewayProxy - name: api7-proxy-config + name: apisix-proxy-config ` var ResourceApplied = func(s *scaffold.Scaffold, resourType, resourceName, ns, resourceRaw string, observedGeneration int) { @@ -106,7 +106,7 @@ metadata: Expect(err).NotTo(HaveOccurred(), "creating GatewayProxy") time.Sleep(5 * time.Second) - gatewayClassName := fmt.Sprintf("api7-%d", time.Now().Unix()) + gatewayClassName := fmt.Sprintf("apisix-%d", time.Now().Unix()) err = s.CreateResourceFromStringWithNamespace(fmt.Sprintf(defautlGatewayClass, gatewayClassName, gatewayName, s.GetControllerName()), gatewayName) Expect(err).NotTo(HaveOccurred(), "creating GatewayClass") time.Sleep(10 * time.Second) @@ -115,7 +115,7 @@ metadata: gcyaml, err := s.GetResourceYamlFromNamespace("GatewayClass", gatewayClassName, gatewayName) Expect(err).NotTo(HaveOccurred(), "getting GatewayClass yaml") Expect(gcyaml).To(ContainSubstring(`status: "True"`), "checking GatewayClass condition status") - Expect(gcyaml).To(ContainSubstring("message: the gatewayclass has been accepted by the api7-ingress-controller"), "checking GatewayClass condition message") + Expect(gcyaml).To(ContainSubstring("message: the gatewayclass has been accepted by the apisix-ingress-controller"), "checking GatewayClass condition message") By("create Gateway") err = s.CreateResourceFromStringWithNamespace(fmt.Sprintf(defautlGateway, gatewayName, gatewayName, gatewayClassName), gatewayName) @@ -126,13 +126,13 @@ metadata: gwyaml, err := s.GetResourceYamlFromNamespace("Gateway", gatewayName, gatewayName) Expect(err).NotTo(HaveOccurred(), "getting Gateway yaml") Expect(gwyaml).To(ContainSubstring(`status: "True"`), "checking Gateway condition status") - Expect(gwyaml).To(ContainSubstring("message: the gateway has been accepted by the api7-ingress-controller"), "checking Gateway condition message") + Expect(gwyaml).To(ContainSubstring("message: the gateway has been accepted by the apisix-ingress-controller"), "checking Gateway condition message") } Context("Create resource with first controller", func() { s1 := scaffold.NewScaffold(&scaffold.Options{ Name: "gateway1", - ControllerName: "apisix.apache.org/api7-ingress-controller-1", + ControllerName: "apisix.apache.org/apisix-ingress-controller-1", }) var route1 = ` apiVersion: gateway.networking.k8s.io/v1 @@ -172,13 +172,13 @@ spec: routes, err := s1.DefaultDataplaneResource().Route().List(s1.Context) Expect(err).NotTo(HaveOccurred()) Expect(routes).To(HaveLen(1)) - assert.Equal(GinkgoT(), routes[0].Labels["k8s/controller-name"], "apisix.apache.org/api7-ingress-controller-1") + assert.Equal(GinkgoT(), routes[0].Labels["k8s/controller-name"], "apisix.apache.org/apisix-ingress-controller-1") }) }) Context("Create resource with second controller", func() { s2 := scaffold.NewScaffold(&scaffold.Options{ Name: "gateway2", - ControllerName: "apisix.apache.org/api7-ingress-controller-2", + ControllerName: "apisix.apache.org/apisix-ingress-controller-2", }) var route2 = ` apiVersion: gateway.networking.k8s.io/v1 @@ -218,7 +218,7 @@ spec: routes, err := s2.DefaultDataplaneResource().Route().List(s2.Context) Expect(err).NotTo(HaveOccurred()) Expect(routes).To(HaveLen(1)) - assert.Equal(GinkgoT(), routes[0].Labels["k8s/controller-name"], "apisix.apache.org/api7-ingress-controller-2") + assert.Equal(GinkgoT(), routes[0].Labels["k8s/controller-name"], "apisix.apache.org/apisix-ingress-controller-2") }) }) }) diff --git a/test/e2e/gatewayapi/gateway.go b/test/e2e/gatewayapi/gateway.go index 141e4b3c2..dc9218741 100644 --- a/test/e2e/gatewayapi/gateway.go +++ b/test/e2e/gatewayapi/gateway.go @@ -39,14 +39,14 @@ func createSecret(s *scaffold.Scaffold, secretName string) { var _ = Describe("Test Gateway", func() { s := scaffold.NewScaffold(&scaffold.Options{ - ControllerName: "apisix.apache.org/api7-ingress-controller", + ControllerName: "apisix.apache.org/apisix-ingress-controller", }) var gatewayProxyYaml = ` apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: ControlPlane @@ -64,18 +64,18 @@ spec: apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: - name: api7 + name: apisix spec: - controllerName: "apisix.apache.org/api7-ingress-controller" + controllerName: "apisix.apache.org/apisix-ingress-controller" ` var defaultGateway = ` apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: - name: api7ee + name: apisix spec: - gatewayClassName: api7 + gatewayClassName: apisix listeners: - name: http1 protocol: HTTP @@ -84,16 +84,16 @@ spec: parametersRef: group: apisix.apache.org kind: GatewayProxy - name: api7-proxy-config + name: apisix-proxy-config ` var noClassGateway = ` apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: - name: api7ee-not-class + name: apisix-not-class spec: - gatewayClassName: api7-not-exist + gatewayClassName: apisix-not-exist listeners: - name: http1 protocol: HTTP @@ -102,7 +102,7 @@ spec: parametersRef: group: apisix.apache.org kind: GatewayProxy - name: api7-proxy-config + name: apisix-proxy-config ` It("Create Gateway", func() { @@ -118,10 +118,10 @@ spec: time.Sleep(5 * time.Second) By("check GatewayClass condition") - gcyaml, err := s.GetResourceYaml("GatewayClass", "api7") + gcyaml, err := s.GetResourceYaml("GatewayClass", "apisix") Expect(err).NotTo(HaveOccurred(), "getting GatewayClass yaml") Expect(gcyaml).To(ContainSubstring(`status: "True"`), "checking GatewayClass condition status") - Expect(gcyaml).To(ContainSubstring("message: the gatewayclass has been accepted by the api7-ingress-controller"), "checking GatewayClass condition message") + Expect(gcyaml).To(ContainSubstring("message: the gatewayclass has been accepted by the apisix-ingress-controller"), "checking GatewayClass condition message") By("create Gateway") err = s.CreateResourceFromStringWithNamespace(defaultGateway, s. @@ -130,10 +130,10 @@ spec: time.Sleep(5 * time.Second) By("check Gateway condition") - gwyaml, err := s.GetResourceYaml("Gateway", "api7ee") + gwyaml, err := s.GetResourceYaml("Gateway", "apisix") Expect(err).NotTo(HaveOccurred(), "getting Gateway yaml") Expect(gwyaml).To(ContainSubstring(`status: "True"`), "checking Gateway condition status") - Expect(gwyaml).To(ContainSubstring("message: the gateway has been accepted by the api7-ingress-controller"), "checking Gateway condition message") + Expect(gwyaml).To(ContainSubstring("message: the gateway has been accepted by the apisix-ingress-controller"), "checking Gateway condition message") By("create Gateway with not accepted GatewayClass") err = s.CreateResourceFromStringWithNamespace(noClassGateway, s.Namespace()) @@ -141,7 +141,7 @@ spec: time.Sleep(5 * time.Second) By("check Gateway condition") - gwyaml, err = s.GetResourceYaml("Gateway", "api7ee-not-class") + gwyaml, err = s.GetResourceYaml("Gateway", "apisix-not-class") Expect(err).NotTo(HaveOccurred(), "getting Gateway yaml") Expect(gwyaml).To(ContainSubstring(`status: Unknown`), "checking Gateway condition status") }) @@ -163,18 +163,18 @@ spec: apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: - name: api7 + name: apisix spec: - controllerName: "apisix.apache.org/api7-ingress-controller" + controllerName: "apisix.apache.org/apisix-ingress-controller" ` var defaultGateway = fmt.Sprintf(` apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: - name: api7ee + name: apisix spec: - gatewayClassName: api7 + gatewayClassName: apisix listeners: - name: http1 protocol: HTTPS @@ -189,7 +189,7 @@ spec: parametersRef: group: apisix.apache.org kind: GatewayProxy - name: api7-proxy-config + name: apisix-proxy-config `, host, secretName) By("create GatewayClass") err = s.CreateResourceFromStringWithNamespace(defaultGatewayClass, "") @@ -222,9 +222,9 @@ spec: apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: - name: api7 + name: apisix spec: - controllerName: "apisix.apache.org/api7-ingress-controller" + controllerName: "apisix.apache.org/apisix-ingress-controller" ` var defaultGateway = fmt.Sprintf(` @@ -233,7 +233,7 @@ kind: Gateway metadata: name: same-namespace-with-https-listener spec: - gatewayClassName: api7 + gatewayClassName: apisix listeners: - name: https port: 443 @@ -262,7 +262,7 @@ spec: parametersRef: group: apisix.apache.org kind: GatewayProxy - name: api7-proxy-config + name: apisix-proxy-config `, secretName, secretName) By("create GatewayClass") err = s.CreateResourceFromStringWithNamespace(defaultGatewayClass, "") @@ -278,7 +278,7 @@ spec: assert.Nil(GinkgoT(), err, "list tls error") assert.Len(GinkgoT(), tls, 1, "tls number not expect") assert.Equal(GinkgoT(), Cert, tls[0].Cert, "tls cert not expect") - assert.Equal(GinkgoT(), tls[0].Labels["k8s/controller-name"], "apisix.apache.org/api7-ingress-controller") + assert.Equal(GinkgoT(), tls[0].Labels["k8s/controller-name"], "apisix.apache.org/apisix-ingress-controller") By("update secret") err = s.NewKubeTlsSecret(secretName, framework.TestCert, framework.TestKey) diff --git a/test/e2e/gatewayapi/gatewayclass.go b/test/e2e/gatewayapi/gatewayclass.go index 9bc97ef4c..70f2f4d0a 100644 --- a/test/e2e/gatewayapi/gatewayclass.go +++ b/test/e2e/gatewayapi/gatewayclass.go @@ -23,7 +23,7 @@ import ( var _ = Describe("Test GatewayClass", func() { s := scaffold.NewScaffold(&scaffold.Options{ - ControllerName: "apisix.apache.org/api7-ingress-controller", + ControllerName: "apisix.apache.org/apisix-ingress-controller", }) Context("Create GatewayClass", func() { @@ -31,16 +31,16 @@ var _ = Describe("Test GatewayClass", func() { apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: - name: api7 + name: apisix spec: - controllerName: "apisix.apache.org/api7-ingress-controller" + controllerName: "apisix.apache.org/apisix-ingress-controller" ` var noGatewayClass = ` apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: - name: api7-not-accepeted + name: apisix-not-accepeted spec: controllerName: "apisix.apache.org/not-exist" ` @@ -48,9 +48,9 @@ spec: apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: - name: api7ee + name: apisix spec: - gatewayClassName: api7 + gatewayClassName: apisix listeners: - name: http1 protocol: HTTP @@ -62,17 +62,17 @@ spec: Expect(err).NotTo(HaveOccurred(), "creating GatewayClass") time.Sleep(5 * time.Second) - gcyaml, err := s.GetResourceYaml("GatewayClass", "api7") + gcyaml, err := s.GetResourceYaml("GatewayClass", "apisix") Expect(err).NotTo(HaveOccurred(), "getting GatewayClass yaml") Expect(gcyaml).To(ContainSubstring(`status: "True"`), "checking GatewayClass condition status") - Expect(gcyaml).To(ContainSubstring("message: the gatewayclass has been accepted by the api7-ingress-controller"), "checking GatewayClass condition message") + Expect(gcyaml).To(ContainSubstring("message: the gatewayclass has been accepted by the apisix-ingress-controller"), "checking GatewayClass condition message") By("create GatewayClass with not accepted") err = s.CreateResourceFromStringWithNamespace(noGatewayClass, "") Expect(err).NotTo(HaveOccurred(), "creating GatewayClass") time.Sleep(5 * time.Second) - gcyaml, err = s.GetResourceYaml("GatewayClass", "api7-not-accepeted") + gcyaml, err = s.GetResourceYaml("GatewayClass", "apisix-not-accepeted") Expect(err).NotTo(HaveOccurred(), "getting GatewayClass yaml") Expect(gcyaml).To(ContainSubstring(`status: Unknown`), "checking GatewayClass condition status") Expect(gcyaml).To(ContainSubstring("message: Waiting for controller"), "checking GatewayClass condition message") @@ -83,7 +83,7 @@ spec: err := s.CreateResourceFromStringWithNamespace(defautlGatewayClass, "") Expect(err).NotTo(HaveOccurred(), "creating GatewayClass") Eventually(func() string { - spec, err := s.GetResourceYaml("GatewayClass", "api7") + spec, err := s.GetResourceYaml("GatewayClass", "apisix") Expect(err).NotTo(HaveOccurred(), "get resource yaml") return spec }).WithTimeout(8 * time.Second).ProbeEvery(time.Second).Should(ContainSubstring(`status: "True"`)) @@ -94,14 +94,14 @@ spec: time.Sleep(time.Second) By("try to delete the GatewayClass") - _, err = s.RunKubectlAndGetOutput("delete", "GatewayClass", "api7", "--wait=false") + _, err = s.RunKubectlAndGetOutput("delete", "GatewayClass", "apisix", "--wait=false") Expect(err).NotTo(HaveOccurred()) - _, err = s.GetResourceYaml("GatewayClass", "api7") + _, err = s.GetResourceYaml("GatewayClass", "apisix") Expect(err).NotTo(HaveOccurred(), "get resource yaml") - output, err := s.RunKubectlAndGetOutput("describe", "GatewayClass", "api7") - Expect(err).NotTo(HaveOccurred(), "describe GatewayClass api7") + output, err := s.RunKubectlAndGetOutput("describe", "GatewayClass", "apisix") + Expect(err).NotTo(HaveOccurred(), "describe GatewayClass apisix") Expect(output).To(And( ContainSubstring("Warning"), ContainSubstring("DeletionBlocked"), @@ -110,15 +110,15 @@ spec: )) By("delete the Gateway") - err = s.DeleteResource("Gateway", "api7ee") + err = s.DeleteResource("Gateway", "apisix") Expect(err).NotTo(HaveOccurred(), "deleting Gateway") time.Sleep(time.Second) By("try to delete the GatewayClass again") - err = s.DeleteResource("GatewayClass", "api7") + err = s.DeleteResource("GatewayClass", "apisix") Expect(err).NotTo(HaveOccurred()) - _, err = s.GetResourceYaml("GatewayClass", "api7") + _, err = s.GetResourceYaml("GatewayClass", "apisix") Expect(err).To(HaveOccurred(), "get resource yaml") Expect(err.Error()).To(ContainSubstring("not found")) }) diff --git a/test/e2e/gatewayapi/gatewayproxy.go b/test/e2e/gatewayapi/gatewayproxy.go index 22d652990..4b5921cc9 100644 --- a/test/e2e/gatewayapi/gatewayproxy.go +++ b/test/e2e/gatewayapi/gatewayproxy.go @@ -40,7 +40,7 @@ spec: apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: - name: api7 + name: apisix spec: gatewayClassName: %s listeners: @@ -51,14 +51,14 @@ spec: parametersRef: group: apisix.apache.org kind: GatewayProxy - name: api7-proxy-config + name: apisix-proxy-config ` var gatewayProxyWithEnabledPlugin = ` apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: ControlPlane @@ -81,7 +81,7 @@ spec: apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: ControlPlane @@ -104,7 +104,7 @@ spec: apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: ControlPlane @@ -132,7 +132,7 @@ spec: apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: ControlPlane @@ -202,7 +202,7 @@ spec: BeforeEach(func() { By("Create GatewayClass") - gatewayClassName = fmt.Sprintf("api7-%d", time.Now().Unix()) + gatewayClassName = fmt.Sprintf("apisix-%d", time.Now().Unix()) err := s.CreateResourceFromStringWithNamespace(fmt.Sprintf(defaultGatewayClass, gatewayClassName, s.GetControllerName()), "") Expect(err).NotTo(HaveOccurred(), "creating GatewayClass") time.Sleep(5 * time.Second) @@ -211,7 +211,7 @@ spec: gcYaml, err := s.GetResourceYaml("GatewayClass", gatewayClassName) Expect(err).NotTo(HaveOccurred(), "getting GatewayClass yaml") Expect(gcYaml).To(ContainSubstring(`status: "True"`), "checking GatewayClass condition status") - Expect(gcYaml).To(ContainSubstring("message: the gatewayclass has been accepted by the api7-ingress-controller"), "checking GatewayClass condition message") + Expect(gcYaml).To(ContainSubstring("message: the gatewayclass has been accepted by the apisix-ingress-controller"), "checking GatewayClass condition message") By("Create GatewayProxy with enabled plugin") err = s.CreateResourceFromString(fmt.Sprintf(gatewayProxyWithEnabledPlugin, framework.DashboardTLSEndpoint, s.AdminKey())) @@ -224,15 +224,15 @@ spec: time.Sleep(5 * time.Second) By("check Gateway condition") - gwyaml, err := s.GetResourceYaml("Gateway", "api7") + gwyaml, err := s.GetResourceYaml("Gateway", "apisix") Expect(err).NotTo(HaveOccurred(), "getting Gateway yaml") Expect(gwyaml).To(ContainSubstring(`status: "True"`), "checking Gateway condition status") - Expect(gwyaml).To(ContainSubstring("message: the gateway has been accepted by the api7-ingress-controller"), "checking Gateway condition message") + Expect(gwyaml).To(ContainSubstring("message: the gateway has been accepted by the apisix-ingress-controller"), "checking Gateway condition message") }) AfterEach(func() { By("Clean up resources") - _ = s.DeleteResourceFromString(fmt.Sprintf(httpRouteForTest, "api7")) + _ = s.DeleteResourceFromString(fmt.Sprintf(httpRouteForTest, "apisix")) _ = s.DeleteResourceFromString(fmt.Sprintf(gatewayWithProxy, gatewayClassName)) _ = s.DeleteResourceFromString(fmt.Sprintf(gatewayProxyWithEnabledPlugin, framework.DashboardTLSEndpoint, s.AdminKey())) }) @@ -240,7 +240,7 @@ spec: Context("Test Gateway with enabled GatewayProxy plugin", func() { It("Should apply plugin configuration when enabled", func() { By("Create HTTPRoute for Gateway with GatewayProxy") - resourceApplied("HTTPRoute", "test-route", fmt.Sprintf(httpRouteForTest, "api7"), 1) + resourceApplied("HTTPRoute", "test-route", fmt.Sprintf(httpRouteForTest, "apisix"), 1) By("Check if the plugin is applied") resp := s.NewAPISIXClient(). @@ -257,7 +257,7 @@ spec: time.Sleep(5 * time.Second) By("Create HTTPRoute for Gateway with GatewayProxy") - resourceApplied("HTTPRoute", "test-route", fmt.Sprintf(httpRouteForTest, "api7"), 1) + resourceApplied("HTTPRoute", "test-route", fmt.Sprintf(httpRouteForTest, "apisix"), 1) By("Check if the plugin is not applied") resp = s.NewAPISIXClient(). @@ -282,7 +282,7 @@ spec: time.Sleep(5 * time.Second) By("Create HTTPRoute for Gateway with GatewayProxy") - resourceApplied("HTTPRoute", "test-route", fmt.Sprintf(httpRouteForTest, "api7"), 1) + resourceApplied("HTTPRoute", "test-route", fmt.Sprintf(httpRouteForTest, "apisix"), 1) By("Check PluginMetadata working") s.NewAPISIXClient(). @@ -325,7 +325,7 @@ spec: apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: "InvalidType" @@ -334,7 +334,7 @@ spec: apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: "ControlPlane" @@ -343,7 +343,7 @@ spec: apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: "ControlPlane" @@ -385,7 +385,7 @@ spec: Expect(err).NotTo(HaveOccurred(), "creating GatewayProxy with valid provider") Eventually(func() string { - gpYaml, err := s.GetResourceYaml("GatewayProxy", "api7-proxy-config") + gpYaml, err := s.GetResourceYaml("GatewayProxy", "apisix-proxy-config") Expect(err).NotTo(HaveOccurred(), "getting GatewayProxy yaml") return gpYaml }).WithTimeout(8*time.Second).ProbeEvery(2*time.Second). diff --git a/test/e2e/gatewayapi/httproute.go b/test/e2e/gatewayapi/httproute.go index 8fc01162f..06a0a3838 100644 --- a/test/e2e/gatewayapi/httproute.go +++ b/test/e2e/gatewayapi/httproute.go @@ -35,7 +35,7 @@ var _ = Describe("Test HTTPRoute", func() { apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: ControlPlane @@ -61,7 +61,7 @@ spec: apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: - name: api7ee + name: apisix spec: gatewayClassName: %s listeners: @@ -72,13 +72,13 @@ spec: parametersRef: group: apisix.apache.org kind: GatewayProxy - name: api7-proxy-config + name: apisix-proxy-config ` var defaultGatewayHTTPS = ` apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: - name: api7ee + name: apisix spec: gatewayClassName: %s listeners: @@ -95,7 +95,7 @@ spec: parametersRef: group: apisix.apache.org kind: GatewayProxy - name: api7-proxy-config + name: apisix-proxy-config ` var ResourceApplied = func(resourType, resourceName, resourceRaw string, observedGeneration int) { @@ -125,7 +125,7 @@ spec: time.Sleep(5 * time.Second) By("create GatewayClass") - gatewayClassName := fmt.Sprintf("api7-%d", time.Now().Unix()) + gatewayClassName := fmt.Sprintf("apisix-%d", time.Now().Unix()) err = s.CreateResourceFromStringWithNamespace(fmt.Sprintf(gatewayClassYaml, gatewayClassName, s.GetControllerName()), "") Expect(err).NotTo(HaveOccurred(), "creating GatewayClass") time.Sleep(5 * time.Second) @@ -134,7 +134,7 @@ spec: gcyaml, err := s.GetResourceYaml("GatewayClass", gatewayClassName) Expect(err).NotTo(HaveOccurred(), "getting GatewayClass yaml") Expect(gcyaml).To(ContainSubstring(`status: "True"`), "checking GatewayClass condition status") - Expect(gcyaml).To(ContainSubstring("message: the gatewayclass has been accepted by the api7-ingress-controller"), "checking GatewayClass condition message") + Expect(gcyaml).To(ContainSubstring("message: the gatewayclass has been accepted by the apisix-ingress-controller"), "checking GatewayClass condition message") By("create Gateway") err = s.CreateResourceFromStringWithNamespace(fmt.Sprintf(defaultGateway, gatewayClassName), s.Namespace()) @@ -142,10 +142,10 @@ spec: time.Sleep(5 * time.Second) By("check Gateway condition") - gwyaml, err := s.GetResourceYaml("Gateway", "api7ee") + gwyaml, err := s.GetResourceYaml("Gateway", "apisix") Expect(err).NotTo(HaveOccurred(), "getting Gateway yaml") Expect(gwyaml).To(ContainSubstring(`status: "True"`), "checking Gateway condition status") - Expect(gwyaml).To(ContainSubstring("message: the gateway has been accepted by the api7-ingress-controller"), "checking Gateway condition message") + Expect(gwyaml).To(ContainSubstring("message: the gateway has been accepted by the apisix-ingress-controller"), "checking Gateway condition message") } var beforeEachHTTPS = func() { @@ -158,7 +158,7 @@ spec: secretName := _secretName createSecret(s, secretName) By("create GatewayClass") - gatewayClassName := fmt.Sprintf("api7-%d", time.Now().Unix()) + gatewayClassName := fmt.Sprintf("apisix-%d", time.Now().Unix()) err = s.CreateResourceFromStringWithNamespace(fmt.Sprintf(gatewayClassYaml, gatewayClassName, s.GetControllerName()), "") Expect(err).NotTo(HaveOccurred(), "creating GatewayClass") time.Sleep(5 * time.Second) @@ -167,7 +167,7 @@ spec: gcyaml, err := s.GetResourceYaml("GatewayClass", gatewayClassName) Expect(err).NotTo(HaveOccurred(), "getting GatewayClass yaml") Expect(gcyaml).To(ContainSubstring(`status: "True"`), "checking GatewayClass condition status") - Expect(gcyaml).To(ContainSubstring("message: the gatewayclass has been accepted by the api7-ingress-controller"), "checking GatewayClass condition message") + Expect(gcyaml).To(ContainSubstring("message: the gatewayclass has been accepted by the apisix-ingress-controller"), "checking GatewayClass condition message") By("create Gateway") err = s.CreateResourceFromStringWithNamespace(fmt.Sprintf(defaultGatewayHTTPS, gatewayClassName), s.Namespace()) @@ -175,10 +175,10 @@ spec: time.Sleep(5 * time.Second) By("check Gateway condition") - gwyaml, err := s.GetResourceYaml("Gateway", "api7ee") + gwyaml, err := s.GetResourceYaml("Gateway", "apisix") Expect(err).NotTo(HaveOccurred(), "getting Gateway yaml") Expect(gwyaml).To(ContainSubstring(`status: "True"`), "checking Gateway condition status") - Expect(gwyaml).To(ContainSubstring("message: the gateway has been accepted by the api7-ingress-controller"), "checking Gateway condition message") + Expect(gwyaml).To(ContainSubstring("message: the gateway has been accepted by the apisix-ingress-controller"), "checking Gateway condition message") } Context("HTTPRoute with HTTPS Gateway", func() { var exactRouteByGet = ` @@ -188,7 +188,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - api6.com rules: @@ -277,7 +277,7 @@ metadata: name: multi-gateway-route spec: parentRefs: - - name: api7ee + - name: apisix namespace: %s - name: additional-gateway namespace: %s @@ -308,7 +308,7 @@ spec: Expect(exists).To(BeTrue(), "additional gateway group should exist") By("Create additional GatewayClass") - additionalGatewayClassName = fmt.Sprintf("api7-%d", time.Now().Unix()) + additionalGatewayClassName = fmt.Sprintf("apisix-%d", time.Now().Unix()) err = s.CreateResourceFromStringWithNamespace(fmt.Sprintf(gatewayClassYaml, additionalGatewayClassName, s.GetControllerName()), "") Expect(err).NotTo(HaveOccurred(), "creating additional GatewayClass") time.Sleep(5 * time.Second) @@ -316,7 +316,7 @@ spec: gcyaml, err := s.GetResourceYaml("GatewayClass", additionalGatewayClassName) Expect(err).NotTo(HaveOccurred(), "getting additional GatewayClass yaml") Expect(gcyaml).To(ContainSubstring(`status: "True"`), "checking additional GatewayClass condition status") - Expect(gcyaml).To(ContainSubstring("message: the gatewayclass has been accepted by the api7-ingress-controller"), "checking additional GatewayClass condition message") + Expect(gcyaml).To(ContainSubstring("message: the gatewayclass has been accepted by the apisix-ingress-controller"), "checking additional GatewayClass condition message") additionalGatewayProxy := fmt.Sprintf(additionalGatewayProxyYaml, framework.DashboardTLSEndpoint, resources.AdminAPIKey) err = s.CreateResourceFromStringWithNamespace(additionalGatewayProxy, additionalNamespace) @@ -393,7 +393,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.external rules: @@ -412,7 +412,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -431,7 +431,7 @@ metadata: name: httpbin2 spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin2.example rules: @@ -472,7 +472,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -527,7 +527,7 @@ spec: Status(200) By("delete Gateway") - err := s.DeleteResource("Gateway", "api7ee") + err := s.DeleteResource("Gateway", "apisix") Expect(err).NotTo(HaveOccurred(), "deleting Gateway") time.Sleep(5 * time.Second) @@ -614,7 +614,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -633,7 +633,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -682,7 +682,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -702,7 +702,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -1035,7 +1035,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -1066,7 +1066,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -1097,7 +1097,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -1119,7 +1119,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -1141,7 +1141,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -1167,7 +1167,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -1216,7 +1216,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -1339,7 +1339,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -1440,7 +1440,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -1463,7 +1463,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -1539,7 +1539,7 @@ metadata: name: httpbin spec: parentRefs: - - name: api7ee + - name: apisix hostnames: - httpbin.example rules: @@ -1556,7 +1556,7 @@ spec: apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: ControlPlane diff --git a/test/e2e/ingress/ingress.go b/test/e2e/ingress/ingress.go index d6e75b324..0eec0f723 100644 --- a/test/e2e/ingress/ingress.go +++ b/test/e2e/ingress/ingress.go @@ -41,14 +41,14 @@ func createSecret(s *scaffold.Scaffold, secretName string) { var _ = Describe("Test Ingress", func() { s := scaffold.NewScaffold(&scaffold.Options{ - ControllerName: "apisix.apache.org/api7-ingress-controller", + ControllerName: "apisix.apache.org/apisix-ingress-controller", }) var gatewayProxyYaml = ` apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config namespace: default spec: provider: @@ -80,13 +80,13 @@ spec: apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: - name: api7 + name: apisix spec: - controller: "apisix.apache.org/api7-ingress-controller" + controller: "apisix.apache.org/apisix-ingress-controller" parameters: apiGroup: "apisix.apache.org" kind: "GatewayProxy" - name: "api7-proxy-config" + name: "apisix-proxy-config" namespace: "default" scope: "Namespace" ` @@ -95,9 +95,9 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: api7-ingress-tls + name: apisix-ingress-tls spec: - ingressClassName: api7 + ingressClassName: apisix tls: - hosts: - %s @@ -139,15 +139,15 @@ spec: apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: - name: api7-default + name: apisix-default annotations: ingressclass.kubernetes.io/is-default-class: "true" spec: - controller: "apisix.apache.org/api7-ingress-controller" + controller: "apisix.apache.org/apisix-ingress-controller" parameters: apiGroup: "apisix.apache.org" kind: "GatewayProxy" - name: "api7-proxy-config" + name: "apisix-proxy-config" namespace: "default" scope: "Namespace" ` @@ -156,7 +156,7 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: api7-ingress-default + name: apisix-ingress-default spec: rules: - host: default.example.com @@ -183,7 +183,7 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: api7-ingress-external + name: apisix-ingress-external spec: rules: - host: httpbin.external @@ -311,7 +311,7 @@ spec: apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config namespace: default spec: provider: @@ -335,7 +335,7 @@ spec: apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config-with-secret + name: apisix-proxy-config-with-secret namespace: default spec: provider: @@ -362,15 +362,15 @@ spec: apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: - name: api7-with-proxy + name: apisix-with-proxy annotations: ingressclass.kubernetes.io/is-default-class: "true" spec: - controller: "apisix.apache.org/api7-ingress-controller" + controller: "apisix.apache.org/apisix-ingress-controller" parameters: apiGroup: "apisix.apache.org" kind: "GatewayProxy" - name: "api7-proxy-config" + name: "apisix-proxy-config" namespace: "default" scope: "Namespace" ` @@ -379,13 +379,13 @@ spec: apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: - name: api7-with-proxy-secret + name: apisix-with-proxy-secret spec: - controller: "apisix.apache.org/api7-ingress-controller" + controller: "apisix.apache.org/apisix-ingress-controller" parameters: apiGroup: "apisix.apache.org" kind: "GatewayProxy" - name: "api7-proxy-config-with-secret" + name: "apisix-proxy-config-with-secret" namespace: "default" scope: "Namespace" ` @@ -394,9 +394,9 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: api7-ingress-with-proxy + name: apisix-ingress-with-proxy spec: - ingressClassName: api7-with-proxy + ingressClassName: apisix-with-proxy rules: - host: proxy.example.com http: @@ -414,9 +414,9 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: api7-ingress-with-proxy-secret + name: apisix-ingress-with-proxy-secret spec: - ingressClassName: api7-with-proxy-secret + ingressClassName: apisix-with-proxy-secret rules: - host: proxy-secret.example.com http: @@ -506,7 +506,7 @@ stringData: apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config namespace: default spec: provider: @@ -525,13 +525,13 @@ spec: apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: - name: api7 + name: apisix spec: - controller: "apisix.apache.org/api7-ingress-controller" + controller: "apisix.apache.org/apisix-ingress-controller" parameters: apiGroup: "apisix.apache.org" kind: "GatewayProxy" - name: "api7-proxy-config" + name: "apisix-proxy-config" namespace: "default" scope: "Namespace" ` @@ -541,7 +541,7 @@ kind: Ingress metadata: name: default spec: - ingressClassName: api7 + ingressClassName: apisix rules: - host: example.com http: @@ -771,13 +771,13 @@ spec: apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: - name: api7-ingress-class + name: apisix-ingress-class spec: - controller: "apisix.apache.org/api7-ingress-controller" + controller: "apisix.apache.org/apisix-ingress-controller" parameters: apiGroup: "apisix.apache.org" kind: "GatewayProxy" - name: "api7-proxy-config" + name: "apisix-proxy-config" namespace: "default" scope: "Namespace" ` @@ -785,9 +785,9 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: api7-ingress + name: apisix-ingress spec: - ingressClassName: api7-ingress-class + ingressClassName: apisix-ingress-class rules: - host: ingress.example.com http: @@ -804,7 +804,7 @@ spec: apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config namespace: default spec: provider: @@ -889,7 +889,7 @@ data: apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: - name: api7-proxy-config + name: apisix-proxy-config spec: provider: type: ControlPlane @@ -914,13 +914,13 @@ spec: apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: - name: api7-ingress-class + name: apisix-ingress-class spec: - controller: "apisix.apache.org/api7-ingress-controller" + controller: "apisix.apache.org/apisix-ingress-controller" parameters: apiGroup: "apisix.apache.org" kind: "GatewayProxy" - name: "api7-proxy-config" + name: "apisix-proxy-config" namespace: %s scope: "Namespace" ` @@ -928,9 +928,9 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: api7-ingress + name: apisix-ingress spec: - ingressClassName: api7-ingress-class + ingressClassName: apisix-ingress-class rules: - host: ingress.example.com http: diff --git a/test/e2e/scaffold/k8s.go b/test/e2e/scaffold/k8s.go index b9a90ab14..2e1136f04 100644 --- a/test/e2e/scaffold/k8s.go +++ b/test/e2e/scaffold/k8s.go @@ -250,7 +250,7 @@ func (s *Scaffold) ApplyDefaultGatewayResource( time.Sleep(5 * time.Second) By("create GatewayClass") - gatewayClassName := fmt.Sprintf("api7-%d", time.Now().Unix()) + gatewayClassName := fmt.Sprintf("apisix-%d", time.Now().Unix()) gatewayString := fmt.Sprintf(defaultGatewayClass, gatewayClassName, s.GetControllerName()) err = s.CreateResourceFromStringWithNamespace(gatewayString, "") Expect(err).NotTo(HaveOccurred(), "creating GatewayClass") @@ -261,7 +261,7 @@ func (s *Scaffold) ApplyDefaultGatewayResource( Expect(err).NotTo(HaveOccurred(), "getting GatewayClass yaml") Expect(gcyaml).To(ContainSubstring(`status: "True"`), "checking GatewayClass condition status") Expect(gcyaml).To( - ContainSubstring("message: the gatewayclass has been accepted by the api7-ingress-controller"), + ContainSubstring("message: the gatewayclass has been accepted by the apisix-ingress-controller"), "checking GatewayClass condition message", ) @@ -271,11 +271,11 @@ func (s *Scaffold) ApplyDefaultGatewayResource( time.Sleep(5 * time.Second) By("check Gateway condition") - gwyaml, err := s.GetResourceYaml("Gateway", "api7ee") + gwyaml, err := s.GetResourceYaml("Gateway", "apisix") Expect(err).NotTo(HaveOccurred(), "getting Gateway yaml") Expect(gwyaml).To(ContainSubstring(`status: "True"`), "checking Gateway condition status") Expect(gwyaml).To( - ContainSubstring("message: the gateway has been accepted by the api7-ingress-controller"), + ContainSubstring("message: the gateway has been accepted by the apisix-ingress-controller"), "checking Gateway condition message", ) diff --git a/test/e2e/scaffold/scaffold.go b/test/e2e/scaffold/scaffold.go index e3b931ca7..cad786b13 100644 --- a/test/e2e/scaffold/scaffold.go +++ b/test/e2e/scaffold/scaffold.go @@ -44,7 +44,7 @@ const ( DashboardHost = "localhost" DashboardPort = 7080 - DefaultControllerName = "apisix.apache.org/api7-ingress-controller" + DefaultControllerName = "apisix.apache.org/apisix-ingress-controller" ) type Options struct { @@ -469,7 +469,7 @@ func (s *Scaffold) afterEach() { _, _ = k8s.RunKubectlAndGetOutputE(GinkgoT(), s.kubectlOptions, "describe", "pods") } - output := s.GetDeploymentLogs("api7-ingress-controller") + output := s.GetDeploymentLogs("apisix-ingress-controller") if output != "" { _, _ = fmt.Fprintln(GinkgoWriter, output) }