gateway-api: upgrade from v0.4.3 to v0.5.0

This commit is contained in:
Andy Bursavich 2022-07-13 10:41:26 -07:00
parent 146ffa506f
commit a7a56b9380
13 changed files with 158 additions and 57 deletions

54
go.mod
View File

@ -13,8 +13,6 @@ require (
github.com/IBM/networking-go-sdk v0.32.0
github.com/StackExchange/dnscontrol v0.2.8
github.com/akamai/AkamaiOPEN-edgegrid-golang v1.1.1
github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 // indirect
github.com/alecthomas/colour v0.1.0 // indirect
github.com/alecthomas/kingpin v2.2.5+incompatible
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1742
github.com/ans-group/sdk-go v1.8.1
@ -46,11 +44,15 @@ require (
github.com/oracle/oci-go-sdk v24.3.0+incompatible
github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014
github.com/pkg/errors v0.9.1
github.com/pluralsh/gqlclient v1.1.6
github.com/projectcontour/contour v1.21.1
github.com/prometheus/client_golang v1.12.2
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210127161313-bd30bebeac4f
github.com/sirupsen/logrus v1.9.0
github.com/stretchr/testify v1.8.0
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.344
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.344
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.344
github.com/transip/gotransip/v6 v6.17.0
github.com/ultradns/ultradns-sdk-go v0.0.0-20200616202852-e62052662f60
github.com/vinyldns/go-vinyldns v0.0.0-20200211145900-fe8a3d82e556
@ -69,6 +71,7 @@ require (
k8s.io/api v0.24.4
k8s.io/apimachinery v0.24.4
k8s.io/client-go v0.24.1
sigs.k8s.io/gateway-api v0.5.0
)
require (
@ -78,6 +81,11 @@ require (
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/Masterminds/semver v1.4.2 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/Yamashou/gqlgenc v0.11.0 // indirect
github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 // indirect
github.com/alecthomas/colour v0.1.0 // indirect
github.com/alecthomas/repr v0.0.0-20200325044227-4184120f674c // indirect
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
@ -90,12 +98,16 @@ require (
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/go-openapi/errors v0.19.8 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
github.com/go-openapi/strfmt v0.20.2 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
github.com/go-playground/locales v0.13.0 // indirect
github.com/go-playground/universal-translator v0.17.0 // indirect
github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect
@ -105,9 +117,11 @@ require (
github.com/golang-jwt/jwt/v4 v4.0.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
github.com/googleapis/gax-go/v2 v2.4.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
@ -123,13 +137,18 @@ require (
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/jinzhu/copier v0.3.2 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/leodido/go-urn v1.2.0 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.4.3 // 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/nxadm/tail v1.4.8 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/openshift/gssapi v0.0.0-20161010215902-5fb4217df13b // indirect
@ -138,14 +157,14 @@ require (
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/schollz/progressbar/v3 v3.8.6 // indirect
github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9 // indirect
github.com/smartystreets/gunit v1.3.4 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.344
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.344
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.344
github.com/terra-farm/udnssdk v1.3.5 // indirect
github.com/vektah/gqlparser/v2 v2.5.0 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.2 // indirect
go.mongodb.org/mongo-driver v1.5.1 // indirect
go.opencensus.io v0.23.0 // indirect
@ -173,33 +192,10 @@ require (
k8s.io/klog/v2 v2.60.1 // indirect
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
sigs.k8s.io/controller-runtime v0.11.0 // indirect
sigs.k8s.io/gateway-api v0.4.3
sigs.k8s.io/controller-runtime v0.12.1 // indirect
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
require github.com/pluralsh/gqlclient v1.1.6
require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/Yamashou/gqlgenc v0.11.0 // indirect
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/schollz/progressbar/v3 v3.8.6 // indirect
github.com/vektah/gqlparser/v2 v2.5.0 // indirect
)
replace k8s.io/klog/v2 => github.com/Raffo/knolog v0.0.0-20211016155154-e4d5e0cc970a

8
go.sum
View File

@ -1121,8 +1121,8 @@ github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y
github.com/onsi/gomega v1.10.5/go.mod h1:gza4q3jKQJijlu05nKWRCW/GavJumGt8aNRxWg7mt48=
github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY=
github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0=
github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE=
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
@ -2421,15 +2421,17 @@ sigs.k8s.io/controller-runtime v0.6.1/go.mod h1:XRYBPdbf5XJu9kpS84VJiZ7h/u1hF3gE
sigs.k8s.io/controller-runtime v0.8.3/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU=
sigs.k8s.io/controller-runtime v0.9.2/go.mod h1:TxzMCHyEUpaeuOiZx/bIdc2T81vfs/aKdvJt9wuu0zk=
sigs.k8s.io/controller-runtime v0.9.6/go.mod h1:q6PpkM5vqQubEKUKOM6qr06oXGzOBcCby1DA9FbyZeA=
sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ=
sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA=
sigs.k8s.io/controller-runtime v0.12.1 h1:4BJY01xe9zKQti8oRjj/NeHKRXthf1YkYJAgLONFFoI=
sigs.k8s.io/controller-runtime v0.12.1/go.mod h1:BKhxlA4l7FPK4AQcsuL4X6vZeWnKDXez/vp1Y8dxTU0=
sigs.k8s.io/controller-tools v0.3.1-0.20200517180335-820a4a27ea84/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI=
sigs.k8s.io/controller-tools v0.5.0/go.mod h1:JTsstrMpxs+9BUj6eGuAaEb6SDSPTeVtUyp0jmnAM/I=
sigs.k8s.io/controller-tools v0.6.0/go.mod h1:baRMVPrctU77F+rfAuH2uPqW93k6yQnZA2dhUOr7ihc=
sigs.k8s.io/controller-tools v0.6.2/go.mod h1:oaeGpjXn6+ZSEIQkUe/+3I40PNiDYp9aeawbt3xTgJ8=
sigs.k8s.io/gateway-api v0.3.0/go.mod h1:Wb8bx7QhGVZxOSEU3i9vw/JqTB5Nlai9MLMYVZeDmRQ=
sigs.k8s.io/gateway-api v0.4.3 h1:9kdHAcfkyP7jVMSFshc8EYEKNLlFM7hbZL8vCKcMwps=
sigs.k8s.io/gateway-api v0.4.3/go.mod h1:r3eiNP+0el+NTLwaTfOrCNXy8TukC+dIM3ggc+fbNWk=
sigs.k8s.io/gateway-api v0.5.0 h1:ze+k9fJqvmL8s1t3e4q1ST8RnN+f09dEv+gfacahlAE=
sigs.k8s.io/gateway-api v0.5.0/go.mod h1:x0AP6gugkFV8fC/oTlnOMU0pnmuzIR8LfIPRVUjxSqA=
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs=
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y=
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY=

View File

@ -33,9 +33,9 @@ import (
coreinformers "k8s.io/client-go/informers/core/v1"
cache "k8s.io/client-go/tools/cache"
"sigs.k8s.io/gateway-api/apis/v1alpha2"
gateway "sigs.k8s.io/gateway-api/pkg/client/clientset/gateway/versioned"
informers "sigs.k8s.io/gateway-api/pkg/client/informers/gateway/externalversions"
informers_v1a2 "sigs.k8s.io/gateway-api/pkg/client/informers/gateway/externalversions/apis/v1alpha2"
gateway "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned"
informers "sigs.k8s.io/gateway-api/pkg/client/informers/externalversions"
informers_v1a2 "sigs.k8s.io/gateway-api/pkg/client/informers/externalversions/apis/v1alpha2"
"sigs.k8s.io/external-dns/endpoint"
)
@ -321,9 +321,18 @@ func (c *gatewayRouteResolver) resolve(rt gatewayRoute) (map[string]endpoint.Tar
section := sectionVal(ref.SectionName, "")
listeners := gw.listeners[section]
for i := range listeners {
// Confirm that the protocols match and the Listener allows the Route (based on namespace and kind).
lis := &listeners[i]
if !gwProtocolMatches(rt.Protocol(), lis.Protocol) || !c.routeIsAllowed(gw.gateway, lis, rt) {
// Confirm that the Listener and Route protocols match.
if !gwProtocolMatches(rt.Protocol(), lis.Protocol) {
continue
}
// Confirm that the Listener and Route ports match, if specified.
// EXPERIMENTAL: https://gateway-api.sigs.k8s.io/geps/gep-957/
if ref.Port != nil && *ref.Port != lis.Port {
continue
}
// Confirm that the Listener allows the Route (based on namespace and kind).
if !c.routeIsAllowed(gw.gateway, lis, rt) {
continue
}
// Find all overlapping hostnames between the Route and Listener.
@ -442,7 +451,7 @@ func (c *gatewayRouteResolver) routeIsAllowed(gw *v1alpha2.Gateway, lis *v1alpha
func gwRouteIsAccepted(conds []metav1.Condition) bool {
for _, c := range conds {
if v1alpha2.RouteConditionType(c.Type) == v1alpha2.ConditionRouteAccepted {
if v1alpha2.RouteConditionType(c.Type) == v1alpha2.RouteConditionAccepted {
return c.Status == metav1.ConditionTrue
}
}

View File

@ -20,8 +20,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"sigs.k8s.io/gateway-api/apis/v1alpha2"
informers "sigs.k8s.io/gateway-api/pkg/client/informers/gateway/externalversions"
informers_v1a2 "sigs.k8s.io/gateway-api/pkg/client/informers/gateway/externalversions/apis/v1alpha2"
informers "sigs.k8s.io/gateway-api/pkg/client/informers/externalversions"
informers_v1a2 "sigs.k8s.io/gateway-api/pkg/client/informers/externalversions/apis/v1alpha2"
)
// NewGatewayHTTPRouteSource creates a new Gateway HTTPRoute source with the given config.

View File

@ -27,7 +27,7 @@ import (
kubefake "k8s.io/client-go/kubernetes/fake"
"sigs.k8s.io/external-dns/endpoint"
"sigs.k8s.io/gateway-api/apis/v1alpha2"
gatewayfake "sigs.k8s.io/gateway-api/pkg/client/clientset/gateway/versioned/fake"
gatewayfake "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/fake"
)
func mustGetLabelSelector(s string) labels.Selector {
@ -47,14 +47,14 @@ func gatewayStatus(ips ...string) v1alpha2.GatewayStatus {
return v1alpha2.GatewayStatus{Addresses: addrs}
}
func routeStatus(refs ...v1alpha2.ParentRef) v1alpha2.RouteStatus {
func routeStatus(refs ...v1alpha2.ParentReference) v1alpha2.RouteStatus {
var v v1alpha2.RouteStatus
for _, ref := range refs {
v.Parents = append(v.Parents, v1alpha2.RouteParentStatus{
ParentRef: ref,
Conditions: []metav1.Condition{
{
Type: string(v1alpha2.ConditionRouteAccepted),
Type: string(v1alpha2.RouteConditionAccepted),
Status: metav1.ConditionTrue,
},
},
@ -63,19 +63,33 @@ func routeStatus(refs ...v1alpha2.ParentRef) v1alpha2.RouteStatus {
return v
}
func httpRouteStatus(refs ...v1alpha2.ParentRef) v1alpha2.HTTPRouteStatus {
func httpRouteStatus(refs ...v1alpha2.ParentReference) v1alpha2.HTTPRouteStatus {
return v1alpha2.HTTPRouteStatus{RouteStatus: routeStatus(refs...)}
}
func gatewayParentRef(namespace, name string) v1alpha2.ParentRef {
type parentRefOption func(*v1alpha2.ParentReference)
func withSectionName(name v1alpha2.SectionName) parentRefOption {
return func(ref *v1alpha2.ParentReference) { ref.SectionName = &name }
}
func withPortNumber(port v1alpha2.PortNumber) parentRefOption {
return func(ref *v1alpha2.ParentReference) { ref.Port = &port }
}
func gatewayParentRef(namespace, name string, options ...parentRefOption) v1alpha2.ParentReference {
group := v1alpha2.Group("gateway.networking.k8s.io")
kind := v1alpha2.Kind("Gateway")
return v1alpha2.ParentRef{
ref := v1alpha2.ParentReference{
Group: &group,
Kind: &kind,
Name: v1alpha2.ObjectName(name),
Namespace: (*v1alpha2.Namespace)(&namespace),
}
for _, opt := range options {
opt(&ref)
}
return ref
}
func newTestEndpoint(dnsName, recordType string, targets ...string) *endpoint.Endpoint {
@ -422,6 +436,86 @@ func TestGatewayHTTPRouteSourceEndpoints(t *testing.T) {
newTestEndpoint("bar.example.internal", "A", "1.2.3.4"),
},
},
{
title: "SectionNameMatch",
config: Config{},
namespaces: namespaces("default"),
gateways: []*v1alpha2.Gateway{{
ObjectMeta: objectMeta("default", "test"),
Spec: v1alpha2.GatewaySpec{
Listeners: []v1alpha2.Listener{
{
Name: "foo",
Protocol: v1alpha2.HTTPProtocolType,
Hostname: hostnamePtr("foo.example.internal"),
},
{
Name: "bar",
Protocol: v1alpha2.HTTPProtocolType,
Hostname: hostnamePtr("bar.example.internal"),
},
},
},
Status: gatewayStatus("1.2.3.4"),
}},
routes: []*v1alpha2.HTTPRoute{{
ObjectMeta: objectMeta("default", "test"),
Spec: v1alpha2.HTTPRouteSpec{
Hostnames: hostnames("*.example.internal"),
},
Status: httpRouteStatus(
gatewayParentRef("default", "test", withSectionName("foo")),
),
}},
endpoints: []*endpoint.Endpoint{
newTestEndpoint("foo.example.internal", "A", "1.2.3.4"),
},
},
{
// EXPERIMENTAL: https://gateway-api.sigs.k8s.io/geps/gep-957/
title: "PortNumberMatch",
config: Config{},
namespaces: namespaces("default"),
gateways: []*v1alpha2.Gateway{{
ObjectMeta: objectMeta("default", "test"),
Spec: v1alpha2.GatewaySpec{
Listeners: []v1alpha2.Listener{
{
Name: "foo",
Protocol: v1alpha2.HTTPProtocolType,
Hostname: hostnamePtr("foo.example.internal"),
Port: 80,
},
{
Name: "bar",
Protocol: v1alpha2.HTTPProtocolType,
Hostname: hostnamePtr("bar.example.internal"),
Port: 80,
},
{
Name: "qux",
Protocol: v1alpha2.HTTPProtocolType,
Hostname: hostnamePtr("qux.example.internal"),
Port: 8080,
},
},
},
Status: gatewayStatus("1.2.3.4"),
}},
routes: []*v1alpha2.HTTPRoute{{
ObjectMeta: objectMeta("default", "test"),
Spec: v1alpha2.HTTPRouteSpec{
Hostnames: hostnames("*.example.internal"),
},
Status: httpRouteStatus(
gatewayParentRef("default", "test", withPortNumber(80)),
),
}},
endpoints: []*endpoint.Endpoint{
newTestEndpoint("foo.example.internal", "A", "1.2.3.4"),
newTestEndpoint("bar.example.internal", "A", "1.2.3.4"),
},
},
{
title: "WildcardInGateway",
config: Config{},

View File

@ -20,8 +20,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"sigs.k8s.io/gateway-api/apis/v1alpha2"
informers "sigs.k8s.io/gateway-api/pkg/client/informers/gateway/externalversions"
informers_v1a2 "sigs.k8s.io/gateway-api/pkg/client/informers/gateway/externalversions/apis/v1alpha2"
informers "sigs.k8s.io/gateway-api/pkg/client/informers/externalversions"
informers_v1a2 "sigs.k8s.io/gateway-api/pkg/client/informers/externalversions/apis/v1alpha2"
)
// NewGatewayTCPRouteSource creates a new Gateway TCPRoute source with the given config.

View File

@ -26,7 +26,7 @@ import (
kubefake "k8s.io/client-go/kubernetes/fake"
"sigs.k8s.io/external-dns/endpoint"
"sigs.k8s.io/gateway-api/apis/v1alpha2"
gatewayfake "sigs.k8s.io/gateway-api/pkg/client/clientset/gateway/versioned/fake"
gatewayfake "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/fake"
)
func TestGatewayTCPRouteSourceEndpoints(t *testing.T) {

View File

@ -20,8 +20,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"sigs.k8s.io/gateway-api/apis/v1alpha2"
informers "sigs.k8s.io/gateway-api/pkg/client/informers/gateway/externalversions"
informers_v1a2 "sigs.k8s.io/gateway-api/pkg/client/informers/gateway/externalversions/apis/v1alpha2"
informers "sigs.k8s.io/gateway-api/pkg/client/informers/externalversions"
informers_v1a2 "sigs.k8s.io/gateway-api/pkg/client/informers/externalversions/apis/v1alpha2"
)
// NewGatewayTLSRouteSource creates a new Gateway TLSRoute source with the given config.

View File

@ -26,7 +26,7 @@ import (
kubefake "k8s.io/client-go/kubernetes/fake"
"sigs.k8s.io/external-dns/endpoint"
"sigs.k8s.io/gateway-api/apis/v1alpha2"
gatewayfake "sigs.k8s.io/gateway-api/pkg/client/clientset/gateway/versioned/fake"
gatewayfake "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/fake"
)
func TestGatewayTLSRouteSourceEndpoints(t *testing.T) {

View File

@ -20,8 +20,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"sigs.k8s.io/gateway-api/apis/v1alpha2"
informers "sigs.k8s.io/gateway-api/pkg/client/informers/gateway/externalversions"
informers_v1a2 "sigs.k8s.io/gateway-api/pkg/client/informers/gateway/externalversions/apis/v1alpha2"
informers "sigs.k8s.io/gateway-api/pkg/client/informers/externalversions"
informers_v1a2 "sigs.k8s.io/gateway-api/pkg/client/informers/externalversions/apis/v1alpha2"
)
// NewGatewayUDPRouteSource creates a new Gateway UDPRoute source with the given config.

View File

@ -26,7 +26,7 @@ import (
kubefake "k8s.io/client-go/kubernetes/fake"
"sigs.k8s.io/external-dns/endpoint"
"sigs.k8s.io/gateway-api/apis/v1alpha2"
gatewayfake "sigs.k8s.io/gateway-api/pkg/client/clientset/gateway/versioned/fake"
gatewayfake "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/fake"
)
func TestGatewayUDPRouteSourceEndpoints(t *testing.T) {

View File

@ -35,7 +35,7 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
gateway "sigs.k8s.io/gateway-api/pkg/client/clientset/gateway/versioned"
gateway "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned"
)
// ErrSourceNotFound is returned when a requested source doesn't exist.

View File

@ -33,7 +33,7 @@ import (
fakeDynamic "k8s.io/client-go/dynamic/fake"
"k8s.io/client-go/kubernetes"
fakeKube "k8s.io/client-go/kubernetes/fake"
gateway "sigs.k8s.io/gateway-api/pkg/client/clientset/gateway/versioned"
gateway "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned"
)
type MockClientGenerator struct {