Skip to content

Commit

Permalink
release: add release notes for 1.8.1 and cherry pick commits (#2211)
Browse files Browse the repository at this point in the history
* docs: clarify usage of external service discovery (#2124)

* feat: add plugin_config_namespace parameter to ApisixRoute (#2137)

* feat: add plugin_config_namespace parameter to ApisixRoute

Add plugin_config_namespace parameter to ApisixRoute resource to allow cross namespace discovery.

* fix indentation

Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>

* remove route.yaml

Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>

* fix e2e test

Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>

* update gomod gosum

* fix e2e test

Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>

* fix e2e test

Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>

* Update pkg/providers/apisix/apisix_route.go

Co-authored-by: Gallardot <gallardot@apache.org>

* create namespace

* refactor test

* refactor test

* fix e2e

* fix e2e

* update crd

* Add EOL

Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>

---------

Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>
Co-authored-by: Gallardot <gallardot@apache.org>

* fix: remove path validation (#2140)

* docs: update NOTICE (#2149)

* refactor(cmd/ingress): invert signal ctx logic (#2139)

* refactor(cmd/ingress): invert signal ctx logic

this commit changes the signal handling in cmd/ingress to be wrapped in
a context, and inverts which goroutine runs the controller and
which watches for the context to be cancelled, which allows some
scaffolding (`sync.WaitGroup`) to be removed and now properly handles
the controller exiting with `nil` (as it does when leader election
fails)

* test: failing flaky unit test (#2151)

* fix: failing flaky unit test

* chore(ci): remove tao12345666333 and lingsamuel in reviewers (#2150)

* chore(deps): bump github.com/onsi/ginkgo/v2 in /test/e2e (#2177)

Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.13.2 to 2.16.0.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](onsi/ginkgo@v2.13.2...v2.16.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump k8s.io/apimachinery from 0.29.0 to 0.29.2 in /test/e2e (#2161)

Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.29.0 to 0.29.2.
- [Commits](kubernetes/apimachinery@v0.29.0...v0.29.2)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump k8s.io/api from 0.29.0 to 0.29.2 in /test/e2e (#2163)

Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.29.0 to 0.29.2.
- [Commits](kubernetes/api@v0.29.0...v0.29.2)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump go.uber.org/zap from 1.26.0 to 1.27.0 in /test/e2e (#2172)

Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.26.0 to 1.27.0.
- [Release notes](https://github.com/uber-go/zap/releases)
- [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md)
- [Commits](uber-go/zap@v1.26.0...v1.27.0)

---
updated-dependencies:
- dependency-name: go.uber.org/zap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump k8s.io/client-go from 0.29.0 to 0.29.2 in /test/e2e (#2162)

Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.29.0 to 0.29.2.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](kubernetes/client-go@v0.29.0...v0.29.2)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump k8s.io/apimachinery from 0.29.2 to 0.29.3 in /test/e2e (#2185)

Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.29.2 to 0.29.3.
- [Commits](kubernetes/apimachinery@v0.29.2...v0.29.3)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: upgrade etcd-adapter to latest version (#2205)

* chore(deps): bump github.com/spf13/cobra from 1.7.0 to 1.8.0 (#2196)

Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](spf13/cobra@v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/onsi/ginkgo/v2 in /test/e2e (#2195)

Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.16.0 to 2.17.1.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](onsi/ginkgo@v2.16.0...v2.17.1)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: use force=true to hard delete the apisix resource (#2210)

Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>

* chore: remove redundant logs and improve logs for users (#2206)

* chore: remove redundant logs and improve error when upstream is created

Co-authored-by: AlinsRan <alinsran333@gmail.com>


---------

Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Gallardot <gallardot@apache.org>
Co-authored-by: Leigang Zhang <71714656+zll600@users.noreply.github.com>
Co-authored-by: Aurelia <aurelia@acuteaura.net>
Co-authored-by: AlinsRan <alinsran333@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
6 people committed Apr 12, 2024
1 parent c8309af commit 4d42c9a
Show file tree
Hide file tree
Showing 35 changed files with 383 additions and 125 deletions.
6 changes: 0 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ updates:
labels:
- "area/dependencies"
reviewers:
- "tao12345666333"
- "lingsamuel"
- "AlinsRan"
- "Gallardot"
- "Revolyssup"
Expand All @@ -38,8 +36,6 @@ updates:
labels:
- "area/dependencies"
reviewers:
- "tao12345666333"
- "lingsamuel"
- "AlinsRan"
- "Gallardot"
- "Revolyssup"
Expand All @@ -50,8 +46,6 @@ updates:
labels:
- "area/dependencies"
reviewers:
- "tao12345666333"
- "lingsamuel"
- "AlinsRan"
- "Gallardot"
- "Revolyssup"
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
pull_request:
branches:
- master
- 1.8.0
- v1.8.0
schedule:
- cron: '25 5 * * 5'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
pull_request:
branches:
- master
- 1.8.0
- v1.8.0

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test-ci-v2-cron-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
push:
branches:
- master
- 1.8.0
- v1.8.0

concurrency:
group: ${{ github.workflow }}-dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test-ci-v2-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
pull_request:
branches:
- master
- 1.8.0
- v1.8.0

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
pull_request:
branches:
- master
- 1.8.0
- v1.8.0

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/goimports-reviser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
pull_request:
branches:
- master
- 1.8.0
- v1.8.0
jobs:
changes:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
pull_request:
branches:
- master
- 1.8.0
- v1.8.0

jobs:
changes:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
pull_request:
branches:
- master
- 1.8.0
- v1.8.0

jobs:
check-license:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
pull_request:
branches:
- master
- 1.8.0
- v1.8.0
jobs:
changes:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spell-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
pull_request:
branches:
- master
- 1.8.0
- v1.8.0
jobs:
misspell:
name: runner / misspell
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
pull_request:
branches:
- master
- 1.8.0
- v1.8.0
jobs:
changes:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify-codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
pull_request:
branches:
- master
- 1.8.0
- v1.8.0
jobs:
changes:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yamllint-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
pull_request:
branches:
- master
- 1.8.0
- v1.8.0
jobs:
changes:
runs-on: ubuntu-latest
Expand Down
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,37 @@
- [0.2.0](#020)
- [0.1.0](#010)

# 1.8.1

## What's New

- chore: remove redundant logs and improve logs for users @Revolyssup (#2206)
- fix: use force=true to hard delete the apisix resource @Revolyssup (#2210)
- chore: upgrade etcd-adapter to latest version @Revolyssup (#2205)
- chore(ci): remove tao12345666333 and lingsamuel in reviewers @AlinsRan (#2150)
- test: failing flaky unit test @Revolyssup (#2151)
- refactor(cmd/ingress): invert signal ctx logic @acuteaura (#2139)
- chore: update NOTICE to 2024 @zll600 (#2149)
- fix: remove path validation @Revolyssup (#2140)
- feat: add plugin_config_namespace parameter to ApisixRoute @Revolyssup (#2137)
- docs: clarify usage of external service discovery @Revolyssup (#2124)

## 🧰 Maintenance

- chore(deps): bump github.com/onsi/ginkgo/v2 from 2.16.0 to 2.17.1 in /test/e2e @dependabot (#2195)
- chore(deps): bump github.com/spf13/cobra from 1.7.0 to 1.8.0 @dependabot (#2196)
- chore(deps): bump k8s.io/apimachinery from 0.29.2 to 0.29.3 in /test/e2e @dependabot (#2185)
- chore(deps): bump k8s.io/client-go from 0.29.0 to 0.29.2 in /test/e2e @dependabot (#2162)
- chore(deps): bump go.uber.org/zap from 1.26.0 to 1.27.0 in /test/e2e @dependabot (#2172)
- chore(deps): bump k8s.io/api from 0.29.0 to 0.29.2 in /test/e2e @dependabot (#2163)
- chore(deps): bump k8s.io/apimachinery from 0.29.0 to 0.29.2 in /test/e2e @dependabot (#2161)
- chore(deps): bump github.com/onsi/ginkgo/v2 from 2.13.2 to 2.16.0 in /test/e2e @dependabot (#2177)

## 👨🏽‍💻 Contributors

Thank you to our contributors for making this release possible:
@AlinsRan, @Revolyssup, @acuteaura, @dependabot, @dependabot[bot] and @zll600

# 1.8.0

## What's New
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
default: help

VERSION ?= 1.8.0
VERSION ?= 1.8.1


TARGET_APISIX_VERSION ?= "3.4.1-centos"
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Apache APISIX
Copyright 2019-2023 The Apache Software Foundation
Copyright 2019-2024 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
42 changes: 20 additions & 22 deletions cmd/ingress/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
package ingress

import (
"context"
"encoding/json"
"fmt"
"os"
"os/signal"
"strings"
"sync"
"syscall"
"time"

Expand All @@ -42,13 +42,19 @@ func dief(template string, args ...interface{}) {
os.Exit(1)
}

func waitForSignal(stopCh chan struct{}) {
sigCh := make(chan os.Signal, 1)
signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)

sig := <-sigCh
log.Infof("signal %d (%s) received", sig, sig.String())
close(stopCh)
func contextWithSignalCancel(ctx context.Context, signals ...os.Signal) context.Context {
newCtx, cancel := context.WithCancel(ctx)
go func() {
sigCh := make(chan os.Signal, 1)
signal.Notify(sigCh, signals...)

sig := <-sigCh
log.Infof("signal %d (%s) received", sig, sig.String())
signal.Stop(sigCh)
close(sigCh)
cancel()
}()
return newCtx
}

// NewIngressCommand creates the ingress sub command for apisix-ingress-controller.
Expand Down Expand Up @@ -118,8 +124,8 @@ the apisix cluster and others are created`,
dief("failed to initialize logging: %s", err)
}
log.DefaultLogger = logger
log.Info("init apisix ingress controller")

log.Info("init apisix ingress controller")
log.Info("version:\n", version.Long())

// We should make sure that the cfg that's logged out is sanitized.
Expand All @@ -132,25 +138,17 @@ the apisix cluster and others are created`,
}
log.Info("use configuration\n", string(data))

stop := make(chan struct{})
ctx := contextWithSignalCancel(context.Background(), syscall.SIGINT, syscall.SIGTERM)

ingress, err := controller.NewController(cfg)
if err != nil {
dief("failed to create ingress controller: %s", err)
}
wg := sync.WaitGroup{}
wg.Add(1)
go func() {
defer wg.Done()

log.Info("start ingress controller")

if err := ingress.Run(stop); err != nil {
dief("failed to run ingress controller: %s", err)
}
}()
if err := ingress.Run(ctx); err != nil {
dief("failed to run ingress controller: %s", err)
}

waitForSignal(stop)
wg.Wait()
log.Info("apisix ingress controller exited")
},
}
Expand Down
1 change: 1 addition & 0 deletions docs/en/latest/references/apisix_route_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ The table below describes each of the attributes in the spec. The fields `apiVer
| http[].match.exprs[].set | array | Set to compare the subject with. Only used when the operator is `In` or `NotIn`. Can use either this or `http[].match.exprs[].value`. |
| http[].websocket | boolean | When set to `true` enables websocket proxy. |
| http[].plugin_config_name | string | Existing Plugin Config name to use in the Route. |
| http[].plugin_config_namespace | string | Namespace in which to look for `plugin_config_name` Route. |
| http[].backends | object | List of backend services. If there are more than one, a weight based traffic split policy would be applied. |
| http[].backends[].serviceName | string | Name of the backend service. The service and the `ApisixRoute` resource should be created in the same namespace. |
| http[].backends[].servicePort | integer or string | Port number or the name defined in the service object of the backend. |
Expand Down
15 changes: 15 additions & 0 deletions docs/en/latest/tutorials/external-service-discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,18 @@ discovery:
```

After applying the above configuration, we can try to access `httpbin.default.svc.cluster.local` directly through APISIX.

:::note
The above discovery configuration needs to be configured at the time of installation and cannot be edited later. For example, if you're installing via helm chart, make sure that you use the below configuration to override default helm values.

```yaml
apisix:
discovery:
enabled: true
registry:
dns:
servers:
- "172.17.0.11:53" # replace with your server addresses
```

:::
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/apache/apisix-ingress-controller
go 1.20

require (
github.com/api7/etcd-adapter v0.2.3
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
Expand All @@ -14,7 +14,7 @@ require (
github.com/prometheus/client_golang v1.16.0
github.com/prometheus/client_model v0.4.0
github.com/slok/kubewebhook/v2 v2.5.0
github.com/spf13/cobra v1.7.0
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.8.4
github.com/xeipuuv/gojsonschema v1.2.0
go.uber.org/multierr v1.11.0
Expand Down
10 changes: 5 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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.3 h1:nb2IDli/d9WlhtObhYUtJUXs+IfGMTcXRc5Fu9IBgtk=
github.com/api7/etcd-adapter v0.2.3/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=
Expand All @@ -21,7 +21,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/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4=
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
Expand Down Expand Up @@ -199,8 +199,8 @@ github.com/slok/kubewebhook/v2 v2.5.0/go.mod h1:TcQS+Ae0TDiiwm9glxum6AFvtumR33qd
github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js=
github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0=
github.com/sony/sonyflake v1.1.0/go.mod h1:LORtCywH/cq10ZbyfhKrHYgAUGH7mOBa76enV9txy/Y=
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
3 changes: 2 additions & 1 deletion pkg/apisix/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ func (c *cluster) updateResource(ctx context.Context, url, resource string, body
}

func (c *cluster) deleteResource(ctx context.Context, url, resource string) error {
url = url + "?force=true"
log.Debugw("deleting resource in cluster",
zap.String("cluster_name", c.name),
zap.String("name", resource),
Expand Down Expand Up @@ -1161,7 +1162,7 @@ func (c *cluster) GetUpstream(ctx context.Context, baseUrl, id string) (*v1.Upst
resp, err := c.getResource(ctx, url, "upstream")
if err != nil {
if err == cache.ErrNotFound {
log.Warnw("upstream not found",
log.Debugw("upstream not found",
zap.String("id", id),
zap.String("url", url),
zap.String("cluster", c.name),
Expand Down
10 changes: 6 additions & 4 deletions pkg/kube/apisix/apis/config/v2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ type ApisixRouteHTTP struct {
// Upstreams refer to ApisixUpstream CRD
Upstreams []ApisixRouteUpstreamReference `json:"upstreams,omitempty" yaml:"upstreams,omitempty"`

Websocket bool `json:"websocket" yaml:"websocket"`
PluginConfigName string `json:"plugin_config_name,omitempty" yaml:"plugin_config_name,omitempty"`
Plugins []ApisixRoutePlugin `json:"plugins,omitempty" yaml:"plugins,omitempty"`
Authentication ApisixRouteAuthentication `json:"authentication,omitempty" yaml:"authentication,omitempty"`
Websocket bool `json:"websocket" yaml:"websocket"`
PluginConfigName string `json:"plugin_config_name,omitempty" yaml:"plugin_config_name,omitempty"`
//By default, PluginConfigNamespace will be the same as the namespace of ApisixRoute
PluginConfigNamespace string `json:"plugin_config_namespace,omitempty" yaml:"plugin_config_namespace,omitempty"`
Plugins []ApisixRoutePlugin `json:"plugins,omitempty" yaml:"plugins,omitempty"`
Authentication ApisixRouteAuthentication `json:"authentication,omitempty" yaml:"authentication,omitempty"`
}

// ApisixRouteHTTPBackend represents an HTTP backend (a Kubernetes Service).
Expand Down
Loading

0 comments on commit 4d42c9a

Please sign in to comment.