Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Upgrade to Gateway API v1 #2148

Closed
wants to merge 46 commits into from
Closed
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
87edfcf
fix: remove path validation
Revolyssup Jan 19, 2024
093df03
Merge remote-tracking branch 'upstream/master'
Revolyssup Jan 24, 2024
8b322a5
chore: Upgrade to Gateway API v1
Revolyssup Jan 25, 2024
a71d49b
add license and fix go version
Revolyssup Jan 25, 2024
77cfe81
go mod tidy
Revolyssup Jan 25, 2024
681b1b5
go version fix
Revolyssup Jan 25, 2024
465394b
initialise gateway according to ingress version
Revolyssup Jan 25, 2024
1ee3b64
add logs
Jan 28, 2024
d78e492
initialise gateway lister
Jan 29, 2024
8e9edc9
fix e2e
Jan 29, 2024
1ad47a3
add logs
Jan 29, 2024
f92373a
fix onDelete
Jan 29, 2024
9533f01
remove string log
Jan 29, 2024
5b955da
refactor and change test
Jan 29, 2024
89a120f
fix lint and add e2e test
Jan 29, 2024
12b2b0c
fix lint
Jan 29, 2024
c9c2c3d
fix test
Jan 29, 2024
7d96b32
change crd
Jan 29, 2024
c997a8d
change gateway version
Revolyssup Jan 29, 2024
20830fc
change gateway version
Revolyssup Jan 29, 2024
e0a4025
change k8s version
Revolyssup Jan 29, 2024
8616fc7
remove test
Revolyssup Jan 29, 2024
a44b17b
revert
Revolyssup Jan 29, 2024
53c31c7
revert
Revolyssup Jan 29, 2024
7d70e76
add e2e test for k8s version 1.24
Revolyssup Jan 30, 2024
ab539cc
fix ci
Revolyssup Jan 30, 2024
de43616
change ci name
Revolyssup Jan 30, 2024
d84d1a5
use k8s1.25
Revolyssup Jan 30, 2024
f3a30ca
use 1.29
Revolyssup Jan 30, 2024
990f1c3
fix e2e
Revolyssup Jan 30, 2024
51b258b
fix e2e
Revolyssup Jan 30, 2024
72e214c
fix e2e
Revolyssup Jan 30, 2024
81943fb
fix e2e
Revolyssup Jan 30, 2024
a28d2af
add logs for checking
Revolyssup Jan 31, 2024
fd054ad
add env variabel in make e2e
Revolyssup Jan 31, 2024
892bb9b
fix case sensitive env variable
Revolyssup Jan 31, 2024
667790b
fix case sensitive env variable
Revolyssup Jan 31, 2024
0cea53e
fix command description
Revolyssup Jan 31, 2024
40f70f9
remove comments and logs
Revolyssup Jan 31, 2024
22db8c3
fix failing unit test
Revolyssup Jan 31, 2024
a8645cc
Merge branch 'master' into revolyssup/gateway
Revolyssup Feb 1, 2024
3cf8174
change flag to --gateway-api-version
Feb 2, 2024
616f53e
use k8s client to get server version
Revolyssup Feb 8, 2024
53bd174
Merge branch 'revolyssup/gateway' of github.com:Revolyssup/apisix-ing…
Revolyssup Feb 8, 2024
0ab281d
use k8s client to get server version
Revolyssup Feb 8, 2024
31757e5
fix nil panic
Revolyssup Feb 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/ingress/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ For example, no available LB exists in the bare metal environment.`)
cmd.PersistentFlags().StringVar(&cfg.Kubernetes.IngressClass, "ingress-class", config.IngressClassApisixAndAll, "apisix-and-all is a special value, it handles Ingress resources with ingressClassName=apisix and all CRDs, the class of an Ingress object is set using the field IngressClassName in Kubernetes clusters version v1.18.0 or higher or the annotation \"kubernetes.io/ingress.class\" (deprecated)")
cmd.PersistentFlags().StringVar(&cfg.Kubernetes.ElectionID, "election-id", config.IngressAPISIXLeader, "election id used for campaign the controller leader")
cmd.PersistentFlags().StringVar(&cfg.Kubernetes.IngressVersion, "ingress-version", config.IngressNetworkingV1, "the supported ingress api group version, can be \"networking/v1beta1\", \"networking/v1\" (for Kubernetes version v1.19.0 or higher) and \"extensions/v1beta1\"")
cmd.PersistentFlags().StringVar(&cfg.Kubernetes.GatewayVersion, "gateway-version", config.GatewayNetworkingV1, "the supported gateway api group version, can be \"gateway/v1beta1\", \"networking/v1\" (for Kubernetes version v1.19.0 or higher) and \"extensions/v1beta1\"")
cmd.PersistentFlags().StringVar(&cfg.Kubernetes.APIVersion, "api-version", config.DefaultAPIVersion, config.APIVersionDescribe)
cmd.PersistentFlags().BoolVar(&cfg.Kubernetes.WatchEndpointSlices, "watch-endpointslices", false, "whether to watch endpointslices rather than endpoints")
cmd.PersistentFlags().BoolVar(&cfg.Kubernetes.EnableGatewayAPI, "enable-gateway-api", false, "whether to enable support for Gateway API")
Expand Down
46 changes: 23 additions & 23 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ require (
github.com/gin-gonic/gin v1.9.1
github.com/hashicorp/go-memdb v1.3.4
github.com/hashicorp/go-multierror v1.1.1
github.com/imdario/mergo v0.3.15
github.com/imdario/mergo v0.3.16
github.com/incubator4/go-resty-expr v0.1.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.16.0
github.com/prometheus/client_model v0.4.0
github.com/prometheus/client_golang v1.17.0
github.com/prometheus/client_model v0.5.0
github.com/slok/kubewebhook/v2 v2.5.0
github.com/spf13/cobra v1.7.0
github.com/stretchr/testify v1.8.4
Expand All @@ -25,11 +25,11 @@ require (
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.28.4
k8s.io/apimachinery v0.28.4
k8s.io/client-go v0.28.2
k8s.io/code-generator v0.28.2
sigs.k8s.io/controller-runtime v0.16.2
sigs.k8s.io/gateway-api v0.8.0
sigs.k8s.io/yaml v1.3.0
k8s.io/client-go v0.28.3
k8s.io/code-generator v0.28.3
sigs.k8s.io/controller-runtime v0.16.3
sigs.k8s.io/gateway-api v1.0.0
sigs.k8s.io/yaml v1.4.0
)

require (
Expand All @@ -38,9 +38,9 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
Expand All @@ -56,9 +56,9 @@ require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
Expand All @@ -72,14 +72,14 @@ require (
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pelletier/go-toml/v2 v2.0.9 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/spf13/pflag v1.0.5 // indirect
Expand All @@ -91,14 +91,14 @@ require (
go.etcd.io/etcd/api/v3 v3.5.9 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.12.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
golang.org/x/tools v0.14.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20230815205213-6bfd019c3878 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230815205213-6bfd019c3878 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 // indirect
Expand All @@ -107,10 +107,10 @@ require (
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/gengo v0.0.0-20230306165830-ab3349d207d4 // indirect
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect
)
Loading
Loading