This is an automated email from the ASF dual-hosted git repository.
ashishtiwari pushed a commit to branch v1.8.0
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git
The following commit(s) were added to refs/heads/v1.8.0 by this push:
new 7980e307 Revert
7980e307 is described below
commit 7980e307028ab22a2c4944e562067671a65facf4
Author: Ashish Tiwari <[email protected]>
AuthorDate: Mon Mar 17 19:18:40 2025 +0530
Revert
---
.github/workflows/e2e-test-ci-v2-cron-dev.yml | 12 +--
.github/workflows/e2e-test-ci-v2-cron.yml | 12 +--
.github/workflows/e2e-test-ci.yml | 12 +--
.github/workflows/k8s-timer-ci.yml | 12 +--
CHANGELOG.md | 17 +---
Makefile | 2 +-
docs/en/latest/references/apisix_route_v2.md | 2 +-
go.mod | 2 +-
go.sum | 4 +-
pkg/providers/controller.go | 60 +++++++-------
test/e2e/go.mod | 2 +-
test/e2e/go.sum | 18 +----
test/e2e/suite-chore/etcd_consistency.go | 112 --------------------------
13 files changed, 64 insertions(+), 203 deletions(-)
diff --git a/.github/workflows/e2e-test-ci-v2-cron-dev.yml
b/.github/workflows/e2e-test-ci-v2-cron-dev.yml
index de34007b..b7a1fbc3 100644
--- a/.github/workflows/e2e-test-ci-v2-cron-dev.yml
+++ b/.github/workflows/e2e-test-ci-v2-cron-dev.yml
@@ -34,7 +34,7 @@ concurrency:
jobs:
changes:
if: ${{ (!github.event.pull_request.draft && github.event.schedule == '0 0
* * *') }}
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
outputs:
docs: ${{ steps.filter.outputs.docs }}
go: ${{ steps.filter.outputs.go }}
@@ -65,7 +65,7 @@ jobs:
- ".github/**"
build:
name: Build
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
needs: changes
if: needs.changes.outputs.go == 'true'
@@ -120,7 +120,7 @@ jobs:
| pigz > docker-dev.tar.gz
- name: cache
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v3
with:
name: docker-dev.tar.gz
path: docker-dev.tar.gz
@@ -128,7 +128,7 @@ jobs:
prepare:
needs: changes
if: needs.changes.outputs.go == 'true'
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
@@ -151,7 +151,7 @@ jobs:
- changes
- prepare
- build
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
strategy:
fail-fast: false # If false, GitHub will not cancels all in-progress
jobs in the matrix if any matrix job fails.
matrix:
@@ -173,7 +173,7 @@ jobs:
sudo cp ~/go/bin/ginkgo /usr/local/bin
- name: cache
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v3
with:
name: docker-dev.tar.gz
diff --git a/.github/workflows/e2e-test-ci-v2-cron.yml
b/.github/workflows/e2e-test-ci-v2-cron.yml
index 0c9fb269..287c3e85 100644
--- a/.github/workflows/e2e-test-ci-v2-cron.yml
+++ b/.github/workflows/e2e-test-ci-v2-cron.yml
@@ -33,7 +33,7 @@ concurrency:
jobs:
changes:
if: ${{ (!github.event.pull_request.draft &&
contains(github.event.pull_request.labels.*.name, 'area/test/apiv2')) ||
github.event.schedule == '0 0 * * *' }}
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
outputs:
docs: ${{ steps.filter.outputs.docs }}
go: ${{ steps.filter.outputs.go }}
@@ -64,7 +64,7 @@ jobs:
- ".github/**"
build:
name: Build
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
needs: changes
if: needs.changes.outputs.go == 'true'
@@ -119,7 +119,7 @@ jobs:
| pigz > docker-v2.tar.gz
- name: cache
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v3
with:
name: docker-v2.tar.gz
path: docker-v2.tar.gz
@@ -127,7 +127,7 @@ jobs:
prepare:
needs: changes
if: needs.changes.outputs.go == 'true'
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
@@ -150,7 +150,7 @@ jobs:
- changes
- prepare
- build
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
strategy:
fail-fast: false # If false, GitHub will not cancels all in-progress
jobs in the matrix if any matrix job fails.
matrix:
@@ -172,7 +172,7 @@ jobs:
sudo cp ~/go/bin/ginkgo /usr/local/bin
- name: cache
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v3
with:
name: docker-v2.tar.gz
diff --git a/.github/workflows/e2e-test-ci.yml
b/.github/workflows/e2e-test-ci.yml
index eb110456..bf5ae422 100644
--- a/.github/workflows/e2e-test-ci.yml
+++ b/.github/workflows/e2e-test-ci.yml
@@ -33,7 +33,7 @@ concurrency:
jobs:
changes:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
outputs:
docs: ${{ steps.filter.outputs.docs }}
go: ${{ steps.filter.outputs.go }}
@@ -64,7 +64,7 @@ jobs:
- ".github/**"
build:
name: Build
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
needs: changes
if: needs.changes.outputs.go == 'true'
@@ -120,7 +120,7 @@ jobs:
| pigz > docker.tar.gz
- name: cache
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v3
with:
name: docker.tar.gz
path: docker.tar.gz
@@ -128,7 +128,7 @@ jobs:
prepare:
needs: changes
if: needs.changes.outputs.go == 'true'
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
@@ -151,7 +151,7 @@ jobs:
- changes
- prepare
- build
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
strategy:
fail-fast: false # If false, GitHub will not cancels all in-progress
jobs in the matrix if any matrix job fails.
matrix:
@@ -175,7 +175,7 @@ jobs:
sudo cp ~/go/bin/ginkgo /usr/local/bin
- name: cache
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v3
with:
name: docker.tar.gz
diff --git a/.github/workflows/k8s-timer-ci.yml
b/.github/workflows/k8s-timer-ci.yml
index 87a26880..9632de0b 100644
--- a/.github/workflows/k8s-timer-ci.yml
+++ b/.github/workflows/k8s-timer-ci.yml
@@ -26,7 +26,7 @@ on:
jobs:
changes:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
outputs:
docs: ${{ steps.filter.outputs.docs }}
go: ${{ steps.filter.outputs.go }}
@@ -56,7 +56,7 @@ jobs:
- 'utils/**'
build:
name: Build
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
needs: changes
steps:
@@ -109,7 +109,7 @@ jobs:
| pigz > docker.tar.gz
- name: cache
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v3
with:
name: docker.tar.gz
path: docker.tar.gz
@@ -117,7 +117,7 @@ jobs:
prepare:
needs: changes
if: needs.changes.outputs.go == 'true'
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
@@ -131,7 +131,7 @@ jobs:
- changes
- prepare
- build
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
strategy:
fail-fast: false # If false, GitHub will not cancels all in-progress
jobs in the matrix if any matrix job fails.
matrix:
@@ -157,7 +157,7 @@ jobs:
sudo cp ~/go/bin/ginkgo /usr/local/bin
- name: cache
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v3
with:
name: docker.tar.gz
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f2b45cd7..733d92c2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,7 +19,6 @@
# Table of Contents
-- [1.8.4](#184)
- [1.8.3](#182)
- [1.8.2](#182)
- [1.8.1](#181)
@@ -43,21 +42,6 @@
- [0.2.0](#020)
- [0.1.0](#010)
-# 1.8.4
-
-## What's New
-
-- upgrade: etcd-adapter and add e2e test @Revolyssup (#2369)
-- chore: upgrade ubuntu from 20.04 to latest @Revolyssup (#2352)
-- chore: upgrade actions/upload-artifact and actions/download-artifact
@nic-6443 (#2328)
-- docs: update http[].match.exprs any -> all @acuteaura (#2270)
-- fix: attempt to shut down when provider init fails @acuteaura (#2263)
-
-## 👨🏽💻 Contributors
-
-Thank you to our contributors for making this release possible:
-@Revolyssup, @acuteaura and @nic-6443
-
# 1.8.3
## What's New
@@ -69,6 +53,7 @@ Thank you to our contributors for making this release
possible:
Thank you to our contributors for making this release possible:
@Revolyssup
+
# 1.8.2
## What's New
diff --git a/Makefile b/Makefile
index 3eb7cce1..26ac087a 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@
#
default: help
-VERSION ?= 1.8.3
+VERSION ?= 1.8.2
TARGET_APISIX_VERSION ?= "3.4.1-centos"
diff --git a/docs/en/latest/references/apisix_route_v2.md
b/docs/en/latest/references/apisix_route_v2.md
index 1cb8ebc3..0104efe5 100644
--- a/docs/en/latest/references/apisix_route_v2.md
+++ b/docs/en/latest/references/apisix_route_v2.md
@@ -48,7 +48,7 @@ The table below describes each of the attributes in the spec.
The fields `apiVer
| http[].match.hosts | array | List of hosts to
match the Route with. The Route will be used if any one of the hosts is
matched.
|
| http[].match.methods | array | List of HTTP
methods (`GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS`, `CONNECT`,
`TRACE`) to match the Route with. The Route will be used if any one of the
methods is matched. |
| http[].match.remoteAddrs | array | List of IP
addresses (CIDR format) to match the Route with. The Route will be used if any
one of the IP address is matched.
|
-| http[].match.exprs | array | List of
expressions to match the Route with. The Route will be used if all of the
expressions are matched.
|
+| http[].match.exprs | array | List of
expressions to match the Route with. The Route will be used if any one of the
expression is matched.
|
| http[].match.exprs[].subject | object | Subject for the
expression.
|
| http[].match.exprs[].subject.scope | string | Scope of the
subject. Can be one of `Header`, `Query`, `Cookie`, or `Path`.
|
| http[].match.exprs[].subject.name | string | Subject name.
Can be empty when the scope is `Path`.
|
diff --git a/go.mod b/go.mod
index 26f50d79..b92e2e44 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module github.com/apache/apisix-ingress-controller
go 1.20
require (
- github.com/api7/etcd-adapter v0.2.5
+ github.com/api7/etcd-adapter v0.2.4
github.com/api7/gopkg v0.2.0
github.com/gin-gonic/gin v1.9.1
github.com/hashicorp/go-memdb v1.3.4
diff --git a/go.sum b/go.sum
index 6968affa..650ed779 100644
--- a/go.sum
+++ b/go.sum
@@ -2,8 +2,8 @@ cloud.google.com/go v0.26.0/go.mod
h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
cloud.google.com/go v0.34.0/go.mod
h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1/go.mod
h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/antihax/optional v1.0.0/go.mod
h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
-github.com/api7/etcd-adapter v0.2.5
h1:uyXqDsIaI39I/1AT9/7iKSGU8icsKhpuOHFb17wkvJE=
-github.com/api7/etcd-adapter v0.2.5/go.mod
h1:JoLtq4IxiIw6Z+k9eRGHL0CDyfRvnNXGI0skV0EsSE8=
+github.com/api7/etcd-adapter v0.2.4
h1:VWdDPUJPai5IdxV5dwwZF9e7Ilw7sBWwaEeFzPO2fV4=
+github.com/api7/etcd-adapter v0.2.4/go.mod
h1:JoLtq4IxiIw6Z+k9eRGHL0CDyfRvnNXGI0skV0EsSE8=
github.com/api7/gopkg v0.2.0 h1:+5vw6Rt9IeEpJoL2JMZFDwGDhH4aaeUJize21/3Qdzc=
github.com/api7/gopkg v0.2.0/go.mod
h1:LlplmjGCrkcS3nyCYpTwkdLkuNlYRYAnI8XH1qwsICw=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
diff --git a/pkg/providers/controller.go b/pkg/providers/controller.go
index e50e0917..d8693221 100644
--- a/pkg/providers/controller.go
+++ b/pkg/providers/controller.go
@@ -16,7 +16,6 @@ package providers
import (
"context"
- "errors"
"fmt"
"os"
"sync"
@@ -184,18 +183,7 @@ func (c *Controller) Run(ctx context.Context) error {
return err
}
- err := c.run(rootCtx)
- if err != nil {
- log.Errorf("provider run returned error, exiting process: %s",
err)
-
- // attempt to give up leader status, should also release the
waitgroup and exit the process
- rootCancel()
- go func() {
- time.Sleep(time.Second * 5)
- log.Errorf("process has not quit 5s after provider
failure, forcing exit: %s", err)
- os.Exit(1)
- }()
- }
+ c.run(rootCtx)
wg.Wait()
return nil
@@ -394,7 +382,7 @@ func (c *Controller) initSharedInformers()
*providertypes.ListerInformer {
return listerInformer
}
-func (c *Controller) run(ctx context.Context) error {
+func (c *Controller) run(ctx context.Context) {
log.Infow("controller tries to leading ...",
zap.String("namespace", c.namespace),
zap.String("pod", c.name),
@@ -418,22 +406,29 @@ func (c *Controller) run(ctx context.Context) error {
CacheSynced: !c.cfg.EtcdServer.Enabled,
SSLKeyEncryptSalt: c.cfg.EtcdServer.SSLKeyEncryptSalt,
}
-
- // TODO: needs retry logic
err := c.apisix.AddCluster(ctx, clusterOpts)
if err != nil && err != apisix.ErrDuplicatedCluster {
+ // TODO give up the leader role
log.Errorf("failed to add default cluster: %s", err)
- return err
+ return
}
if err :=
c.apisix.Cluster(c.cfg.APISIX.DefaultClusterName).HasSynced(ctx); err != nil {
+ // TODO give up the leader role
log.Errorf("failed to wait the default cluster to be ready:
%s", err)
- return err
+
+ // re-create apisix cluster, used in next c.run
+ if err = c.apisix.UpdateCluster(ctx, clusterOpts); err != nil {
+ log.Errorf("failed to update default cluster: %s", err)
+ return
+ }
+ return
}
// Creation Phase
log.Info("creating controller")
+
c.informers = c.initSharedInformers()
common := &providertypes.Common{
ControllerNamespace: c.namespace,
@@ -448,12 +443,14 @@ func (c *Controller) run(ctx context.Context) error {
c.namespaceProvider, err = namespace.NewWatchingNamespaceProvider(ctx,
c.kubeClient, c.cfg, c.resourceSyncCh)
if err != nil {
- return err
+ ctx.Done()
+ return
}
c.podProvider, err = pod.NewProvider(common, c.namespaceProvider)
if err != nil {
- return err
+ ctx.Done()
+ return
}
c.translator = translation.NewTranslator(&translation.TranslatorOptions{
@@ -469,17 +466,20 @@ func (c *Controller) run(ctx context.Context) error {
c.apisixProvider, c.apisixTranslator, err =
apisixprovider.NewProvider(common, c.namespaceProvider, c.translator)
if err != nil {
- return err
+ ctx.Done()
+ return
}
c.ingressProvider, err = ingressprovider.NewProvider(common,
c.namespaceProvider, c.translator, c.apisixTranslator)
if err != nil {
- return err
+ ctx.Done()
+ return
}
c.kubeProvider, err = k8s.NewProvider(common, c.translator,
c.namespaceProvider, c.apisixProvider, c.ingressProvider)
if err != nil {
- return err
+ ctx.Done()
+ return
}
if c.cfg.Kubernetes.EnableGatewayAPI {
@@ -495,7 +495,8 @@ func (c *Controller) run(ctx context.Context) error {
ListerInformer: common.ListerInformer,
})
if err != nil {
- return err
+ ctx.Done()
+ return
}
}
@@ -504,14 +505,16 @@ func (c *Controller) run(ctx context.Context) error {
log.Info("init namespaces")
if err = c.namespaceProvider.Init(ctx); err != nil {
- return err
+ ctx.Done()
+ return
}
log.Info("wait for resource sync")
// Wait for resource sync
if ok := c.informers.StartAndWaitForCacheSync(ctx); !ok {
- return errors.New("StartAndWaitForCacheSync failed")
+ ctx.Done()
+ return
}
log.Info("init providers")
@@ -519,7 +522,8 @@ func (c *Controller) run(ctx context.Context) error {
// Compare resource
if !c.cfg.EtcdServer.Enabled {
if err = c.apisixProvider.Init(ctx); err != nil {
- return err
+ ctx.Done()
+ return
}
}
@@ -569,8 +573,6 @@ func (c *Controller) run(ctx context.Context) error {
log.Error("Start failed, abort...")
cancelFunc()
}
-
- return nil
}
func (c *Controller) checkClusterHealth(ctx context.Context, cancelFunc
context.CancelFunc) {
diff --git a/test/e2e/go.mod b/test/e2e/go.mod
index d4b5abfa..b2f1e80f 100644
--- a/test/e2e/go.mod
+++ b/test/e2e/go.mod
@@ -21,7 +21,7 @@ require (
github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2 //
indirect
github.com/ajg/form v1.5.1 // indirect
github.com/andybalholm/brotli v1.0.4 // indirect
- github.com/api7/etcd-adapter v0.2.5 // indirect
+ github.com/api7/etcd-adapter v0.2.4 // indirect
github.com/api7/gopkg v0.2.0 // indirect
github.com/aws/aws-sdk-go v1.40.56 // indirect
github.com/beorn7/perks v1.0.1 // indirect
diff --git a/test/e2e/go.sum b/test/e2e/go.sum
index 11472b21..58d3d1aa 100644
--- a/test/e2e/go.sum
+++ b/test/e2e/go.sum
@@ -8,14 +8,13 @@ github.com/ajg/form v1.5.1/go.mod
h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY
github.com/andybalholm/brotli v1.0.4
h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY=
github.com/andybalholm/brotli v1.0.4/go.mod
h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/antihax/optional v1.0.0/go.mod
h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
-github.com/api7/etcd-adapter v0.2.5
h1:uyXqDsIaI39I/1AT9/7iKSGU8icsKhpuOHFb17wkvJE=
-github.com/api7/etcd-adapter v0.2.5/go.mod
h1:JoLtq4IxiIw6Z+k9eRGHL0CDyfRvnNXGI0skV0EsSE8=
+github.com/api7/etcd-adapter v0.2.4
h1:VWdDPUJPai5IdxV5dwwZF9e7Ilw7sBWwaEeFzPO2fV4=
+github.com/api7/etcd-adapter v0.2.4/go.mod
h1:JoLtq4IxiIw6Z+k9eRGHL0CDyfRvnNXGI0skV0EsSE8=
github.com/api7/gopkg v0.2.0 h1:+5vw6Rt9IeEpJoL2JMZFDwGDhH4aaeUJize21/3Qdzc=
github.com/api7/gopkg v0.2.0/go.mod
h1:LlplmjGCrkcS3nyCYpTwkdLkuNlYRYAnI8XH1qwsICw=
github.com/api7/terratest v1.0.0
h1:Grg0xcvNpSRZa7QzjqfTPR3lfiHk13IdIBUrfUrDmw4=
github.com/api7/terratest v1.0.0/go.mod
h1:JGeIGgLbxbG9/Oqm06z6YXVr76CfomdmLkV564qov+8=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
-github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod
h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/aws/aws-sdk-go v1.40.56
h1:FM2yjR0UUYFzDTMx+mH9Vyw1k1EUUxsAFzk+BjkzANA=
github.com/aws/aws-sdk-go v1.40.56/go.mod
h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
@@ -39,9 +38,7 @@ github.com/client9/misspell v0.3.4/go.mod
h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod
h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod
h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/coreos/go-semver v0.3.0
h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
-github.com/coreos/go-semver v0.3.0/go.mod
h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd/v22 v22.3.2
h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=
-github.com/coreos/go-systemd/v22 v22.3.2/go.mod
h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod
h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0
h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod
h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
@@ -60,7 +57,6 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod
h1:6rpuAdCZL397s3pYoYcLgu1m
github.com/envoyproxy/go-control-plane
v0.9.9-0.20201210154907-fd9021fe5dad/go.mod
h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod
h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/evanphx/json-patch v5.6.0+incompatible
h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U=
-github.com/evanphx/json-patch v5.6.0+incompatible/go.mod
h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/fatih/color v1.9.0/go.mod
h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
github.com/fatih/color v1.15.0/go.mod
h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
@@ -69,7 +65,6 @@ github.com/fatih/structs v1.1.0/go.mod
h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga
github.com/fsnotify/fsnotify v1.4.7/go.mod
h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod
h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.6.0
h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
-github.com/fsnotify/fsnotify v1.6.0/go.mod
h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/gabriel-vasile/mimetype v1.4.2
h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
github.com/gabriel-vasile/mimetype v1.4.2/go.mod
h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
github.com/gavv/httpexpect/v2 v2.16.0
h1:Ty2favARiTYTOkCRZGX7ojXXjGyNAIohM1lZ3vqaEwI=
@@ -96,7 +91,6 @@ github.com/go-openapi/swag v0.22.4
h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogB
github.com/go-openapi/swag v0.22.4/go.mod
h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
github.com/go-playground/assert/v2 v2.0.1/go.mod
h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/assert/v2 v2.2.0
h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
-github.com/go-playground/assert/v2 v2.2.0/go.mod
h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.14.0/go.mod
h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
github.com/go-playground/locales v0.14.1
h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.1/go.mod
h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
@@ -183,7 +177,6 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod
h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
github.com/hashicorp/golang-lru v0.5.4
h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
github.com/hashicorp/golang-lru v0.5.4/go.mod
h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hokaccha/go-prettyjson v0.0.0-20211117102719-0474bc63780f
h1:7LYC+Yfkj3CTRcShK0KOL/w6iTiKyqqBA9a41Wnggw8=
-github.com/hokaccha/go-prettyjson v0.0.0-20211117102719-0474bc63780f/go.mod
h1:pFlLw2CfqZiIBOx6BuCeRLCrfxBJipTY0nIOF/VbGcI=
github.com/hpcloud/tail v1.0.0/go.mod
h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod
h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.3.15
h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM=
@@ -215,7 +208,6 @@ github.com/kr/pretty v0.1.0/go.mod
h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
github.com/kr/pretty v0.2.1/go.mod
h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0/go.mod
h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
-github.com/kr/pretty v0.3.1/go.mod
h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod
h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
@@ -266,7 +258,6 @@ github.com/onsi/ginkgo/v2 v2.17.1/go.mod
h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3Hig
github.com/onsi/gomega v1.7.1/go.mod
h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod
h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
-github.com/onsi/gomega v1.30.0/go.mod
h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/pelletier/go-toml/v2 v2.0.1/go.mod
h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
github.com/pelletier/go-toml/v2 v2.0.9
h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0=
github.com/pelletier/go-toml/v2 v2.0.9/go.mod
h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
@@ -293,7 +284,6 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod
h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L
github.com/rogpeppe/go-internal v1.6.1/go.mod
h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.0/go.mod
h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
github.com/rogpeppe/go-internal v1.10.0
h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
-github.com/rogpeppe/go-internal v1.10.0/go.mod
h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/russross/blackfriday/v2 v2.0.1/go.mod
h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/russross/blackfriday/v2 v2.1.0
h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod
h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
@@ -360,18 +350,14 @@ github.com/yudai/gojsondiff v1.0.0/go.mod
h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FB
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82
h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M=
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod
h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM=
github.com/yudai/pp v2.0.1+incompatible
h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI=
-github.com/yudai/pp v2.0.1+incompatible/go.mod
h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc=
github.com/yuin/goldmark v1.1.27/go.mod
h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod
h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs=
go.etcd.io/etcd/api/v3 v3.5.9/go.mod
h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k=
go.etcd.io/etcd/client/pkg/v3 v3.5.9
h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE=
-go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod
h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4=
go.etcd.io/etcd/client/v3 v3.5.9
h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E=
-go.etcd.io/etcd/client/v3 v3.5.9/go.mod
h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA=
go.uber.org/atomic v1.7.0/go.mod
h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
-go.uber.org/goleak v1.3.0/go.mod
h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.6.0/go.mod
h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod
h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
diff --git a/test/e2e/suite-chore/etcd_consistency.go
b/test/e2e/suite-chore/etcd_consistency.go
deleted file mode 100644
index 27da0597..00000000
--- a/test/e2e/suite-chore/etcd_consistency.go
+++ /dev/null
@@ -1,112 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You 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 chore
-
-import (
- "fmt"
- "net/http"
-
- "github.com/onsi/ginkgo/v2"
- "github.com/stretchr/testify/assert"
-
- "github.com/apache/apisix-ingress-controller/test/e2e/scaffold"
-)
-
-var _ = ginkgo.Describe("suite-chore: etcd revision", func() {
- s := scaffold.NewScaffold(&scaffold.Options{
- EnableEtcdServer: true,
- })
- ginkgo.It("etcd revision", func() {
- ginkgo.By("apply route", func() {
- backendSvc, backendSvcPort := s.DefaultHTTPBackend()
- ar := fmt.Sprintf(`
-apiVersion: apisix.apache.org/v2
-kind: ApisixRoute
-metadata:
- name: httpbin-route
-spec:
- http:
- - name: rule1
- match:
- hosts:
- - httpbin.org
- paths:
- - /ip
- backends:
- - serviceName: %s
- servicePort: %d
-`, backendSvc, backendSvcPort[0])
- assert.Nil(ginkgo.GinkgoT(),
s.CreateVersionedApisixResource(ar))
- assert.Nil(ginkgo.GinkgoT(),
s.EnsureNumApisixRoutesCreated(1), "checking number of routes")
- assert.Nil(ginkgo.GinkgoT(),
s.EnsureNumApisixUpstreamsCreated(1), "checking number of upstreams")
-
- s.NewAPISIXClient().GET("/ip").WithHeader("Host",
"httpbin.org").Expect().Status(http.StatusOK)
- })
- ginkgo.By("apply route again", func() {
- backendSvc, backendSvcPort := s.DefaultHTTPBackend()
- ar := fmt.Sprintf(`
-apiVersion: apisix.apache.org/v2
-kind: ApisixRoute
-metadata:
- name: httpbin-route-2
-spec:
- http:
- - name: rule2
- match:
- hosts:
- - httpbin.org
- paths:
- - /headers
- backends:
- - serviceName: %s
- servicePort: %d
-`, backendSvc, backendSvcPort[0])
- assert.Nil(ginkgo.GinkgoT(),
s.CreateVersionedApisixResource(ar))
- assert.Nil(ginkgo.GinkgoT(),
s.EnsureNumApisixRoutesCreated(2), "checking number of routes")
- assert.Nil(ginkgo.GinkgoT(),
s.EnsureNumApisixUpstreamsCreated(1), "checking number of upstreams")
-
- s.NewAPISIXClient().GET("/headers").WithHeader("Host",
"httpbin.org").Expect().Status(http.StatusOK)
- })
-
- ginkgo.By("restart ingress controller")
- s.RestartIngressControllerDeploy()
-
- ginkgo.By("apply route again and this should take effect",
func() {
- backendSvc, backendSvcPort := s.DefaultHTTPBackend()
- ar := fmt.Sprintf(`
-apiVersion: apisix.apache.org/v2
-kind: ApisixRoute
-metadata:
- name: httpbin-route-3
-spec:
- http:
- - name: rule3
- match:
- hosts:
- - httpbin.org
- paths:
- - /get
- backends:
- - serviceName: %s
- servicePort: %d
-`, backendSvc, backendSvcPort[0])
- assert.Nil(ginkgo.GinkgoT(),
s.CreateVersionedApisixResource(ar))
- assert.Nil(ginkgo.GinkgoT(),
s.EnsureNumApisixRoutesCreated(3), "checking number of routes")
- assert.Nil(ginkgo.GinkgoT(),
s.EnsureNumApisixUpstreamsCreated(1), "checking number of upstreams")
-
- s.NewAPISIXClient().GET("/get").WithHeader("Host",
"httpbin.org").Expect().Status(http.StatusOK)
- })
- })
-})