From 8403b55d01693e86c0f19a9d22f8dc39edb96ec5 Mon Sep 17 00:00:00 2001 From: Mike Beaumont Date: Thu, 26 Oct 2023 11:44:19 +0200 Subject: [PATCH 1/8] chore(deps): bump sigs.k8s.io/gateway-api from v0.8.1 to v1.0.0-rc2 Signed-off-by: Mike Beaumont --- go.mod | 2 +- go.sum | 4 ++-- test/e2e/gateway/gatewayapi/conformance_test.go | 2 +- test/framework/k8s.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 7d4a21736903..b761e7eeda71 100644 --- a/go.mod +++ b/go.mod @@ -84,7 +84,7 @@ require ( sigs.k8s.io/controller-runtime v0.16.3 sigs.k8s.io/controller-tools v0.13.0 // When updating this also update version in: test/framework/k8s.go - sigs.k8s.io/gateway-api v0.8.1 + sigs.k8s.io/gateway-api v1.0.0-rc2 sigs.k8s.io/yaml v1.3.0 ) diff --git a/go.sum b/go.sum index bfb1821779ea..707e9f7b79ab 100644 --- a/go.sum +++ b/go.sum @@ -693,8 +693,8 @@ sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigw sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= sigs.k8s.io/controller-tools v0.13.0 h1:NfrvuZ4bxyolhDBt/rCZhDnx3M2hzlhgo5n3Iv2RykI= sigs.k8s.io/controller-tools v0.13.0/go.mod h1:5vw3En2NazbejQGCeWKRrE7q4P+CW8/klfVqP8QZkgA= -sigs.k8s.io/gateway-api v0.8.1 h1:Bo4NMAQFYkQZnHXOfufbYwbPW7b3Ic5NjpbeW6EJxuU= -sigs.k8s.io/gateway-api v0.8.1/go.mod h1:0PteDrsrgkRmr13nDqFWnev8tOysAVrwnvfFM55tSVg= +sigs.k8s.io/gateway-api v1.0.0-rc2 h1:+7rq7j5fehUkMkgnJyL90mtXrVnz8aj5SXsRqIEW3Mk= +sigs.k8s.io/gateway-api v1.0.0-rc2/go.mod h1:+QpYENjk9s31/abu2Pv5BpK2v88UQDK2aeQCwCvy6ck= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= diff --git a/test/e2e/gateway/gatewayapi/conformance_test.go b/test/e2e/gateway/gatewayapi/conformance_test.go index 5a3dd2b533a2..c7ec0c40bce8 100644 --- a/test/e2e/gateway/gatewayapi/conformance_test.go +++ b/test/e2e/gateway/gatewayapi/conformance_test.go @@ -92,7 +92,7 @@ func TestConformance(t *testing.T) { suite.SupportGateway, suite.SupportGatewayPort8080, suite.SupportReferenceGrant, - suite.SupportHTTPResponseHeaderModification, + suite.SupportHTTPRouteResponseHeaderModification, suite.SupportHTTPRoute, suite.SupportHTTPRouteHostRewrite, suite.SupportHTTPRouteMethodMatching, diff --git a/test/framework/k8s.go b/test/framework/k8s.go index 79e03888c210..152b394b7a1b 100644 --- a/test/framework/k8s.go +++ b/test/framework/k8s.go @@ -56,7 +56,7 @@ func GatewayAPICRDs(cluster Cluster) error { return k8s.RunKubectlE( cluster.GetTesting(), cluster.GetKubectlOptions(), - "apply", "-f", "https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.8.1/experimental-install.yaml") + "apply", "-f", "https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0-rc2/experimental-install.yaml") } func UpdateKubeObject( From 2d350ebe1dff79c14c47617455802dfcf5dd2d24 Mon Sep 17 00:00:00 2001 From: Mike Beaumont Date: Mon, 30 Oct 2023 13:27:07 +0100 Subject: [PATCH 2/8] fix: imports Signed-off-by: Mike Beaumont --- .../gatewayapi/attachment/attachment.go | 7 +- .../gatewayapi/attachment/attachment_test.go | 13 ++-- .../gatewayapi/gateway_class_controller.go | 13 ++-- .../gatewayapi/gateway_controller.go | 3 +- .../gatewayapi/gateway_conversion.go | 67 ++++++++++--------- .../gatewayapi/gateway_conversion_test.go | 47 ++++++------- .../controllers/gatewayapi/gateway_status.go | 21 +++--- .../gatewayapi/http_route_controller.go | 3 +- .../gatewayapi/http_route_conversion.go | 31 ++++----- .../gatewayapi/mesh_http_route_conversion.go | 19 +++--- .../gateway/gatewayapi/conformance_test.go | 6 +- 11 files changed, 121 insertions(+), 109 deletions(-) diff --git a/pkg/plugins/runtime/k8s/controllers/gatewayapi/attachment/attachment.go b/pkg/plugins/runtime/k8s/controllers/gatewayapi/attachment/attachment.go index b43e6bb541c5..72530d389164 100644 --- a/pkg/plugins/runtime/k8s/controllers/gatewayapi/attachment/attachment.go +++ b/pkg/plugins/runtime/k8s/controllers/gatewayapi/attachment/attachment.go @@ -11,6 +11,7 @@ import ( kube_labels "k8s.io/apimachinery/pkg/labels" kube_types "k8s.io/apimachinery/pkg/types" kube_client "sigs.k8s.io/controller-runtime/pkg/client" + gatewayapi_v1 "sigs.k8s.io/gateway-api/apis/v1" gatewayapi "sigs.k8s.io/gateway-api/apis/v1beta1" "github.com/kumahq/kuma/pkg/plugins/runtime/k8s/controllers/gatewayapi/common" @@ -48,7 +49,7 @@ func findRouteListenerAttachment( // From determines whether we are permitted to attach to this ParentRef switch *ns.From { - case gatewayapi.NamespacesFromSelector: + case gatewayapi_v1.NamespacesFromSelector: // TODO, the gateway controller/webhook should verify this isn't an // error selector, err := kube_meta.LabelSelectorAsSelector(ns.Selector) @@ -61,13 +62,13 @@ func findRouteListenerAttachment( } else { listeners[l.Name] = Allowed } - case gatewayapi.NamespacesFromSame: + case gatewayapi_v1.NamespacesFromSame: if gateway.Namespace != routeNs.GetName() { listeners[l.Name] = NotPermitted } else { listeners[l.Name] = Allowed } - case gatewayapi.NamespacesFromAll: + case gatewayapi_v1.NamespacesFromAll: listeners[l.Name] = Allowed } } diff --git a/pkg/plugins/runtime/k8s/controllers/gatewayapi/attachment/attachment_test.go b/pkg/plugins/runtime/k8s/controllers/gatewayapi/attachment/attachment_test.go index 1103d2981ae9..0dfc1531f7d2 100644 --- a/pkg/plugins/runtime/k8s/controllers/gatewayapi/attachment/attachment_test.go +++ b/pkg/plugins/runtime/k8s/controllers/gatewayapi/attachment/attachment_test.go @@ -10,6 +10,7 @@ import ( kube_runtime "k8s.io/apimachinery/pkg/runtime" kube_client "sigs.k8s.io/controller-runtime/pkg/client" kube_client_fake "sigs.k8s.io/controller-runtime/pkg/client/fake" + gatewayapi_v1 "sigs.k8s.io/gateway-api/apis/v1" gatewayapi "sigs.k8s.io/gateway-api/apis/v1beta1" "github.com/kumahq/kuma/pkg/plugins/bootstrap/k8s" @@ -299,8 +300,8 @@ var _ = Describe("NoMatchingParent support", func() { var ( defaultNs = "default" otherNs = "other" - fromAll = gatewayapi.NamespacesFromAll - fromSame = gatewayapi.NamespacesFromSame + fromAll = gatewayapi_v1.NamespacesFromAll + fromSame = gatewayapi_v1.NamespacesFromSame gatewayGroup = gatewayapi.Group(gatewayapi.GroupName) gatewayKind = gatewayapi.Kind("Gateway") simpleHostname = gatewayapi.Hostname("simple.local") @@ -308,7 +309,7 @@ var ( listenerProgrammed = []kube_meta.Condition{ { - Type: string(gatewayapi.ListenerConditionProgrammed), + Type: string(gatewayapi_v1.ListenerConditionProgrammed), Status: kube_meta.ConditionTrue, }, } @@ -318,7 +319,7 @@ var ( simpleListener = gatewayapi.Listener{ Name: simpleListenerName, Port: gatewayapi.PortNumber(80), - Protocol: gatewayapi.HTTPProtocolType, + Protocol: gatewayapi_v1.HTTPProtocolType, AllowedRoutes: &gatewayapi.AllowedRoutes{ Namespaces: &gatewayapi.RouteNamespaces{ From: &fromSame, @@ -329,7 +330,7 @@ var ( wildcardListener = gatewayapi.Listener{ Name: wildcardListenerName, Port: gatewayapi.PortNumber(80), - Protocol: gatewayapi.HTTPProtocolType, + Protocol: gatewayapi_v1.HTTPProtocolType, Hostname: &anyTestHostname, AllowedRoutes: &gatewayapi.AllowedRoutes{ Namespaces: &gatewayapi.RouteNamespaces{ @@ -342,7 +343,7 @@ var ( allNsListener = gatewayapi.Listener{ Name: allNsListenerName, Port: gatewayapi.PortNumber(80), - Protocol: gatewayapi.HTTPProtocolType, + Protocol: gatewayapi_v1.HTTPProtocolType, Hostname: &simpleHostname, AllowedRoutes: &gatewayapi.AllowedRoutes{ Namespaces: &gatewayapi.RouteNamespaces{ diff --git a/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_class_controller.go b/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_class_controller.go index 3dd51118911c..ccc66cdc5f2c 100644 --- a/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_class_controller.go +++ b/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_class_controller.go @@ -16,6 +16,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" kube_handler "sigs.k8s.io/controller-runtime/pkg/handler" kube_reconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" + gatewayapi_v1 "sigs.k8s.io/gateway-api/apis/v1" gatewayapi "sigs.k8s.io/gateway-api/apis/v1beta1" mesh_k8s "github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/api/v1alpha1" @@ -59,9 +60,9 @@ func (r *GatewayClassReconciler) Reconcile(ctx context.Context, req kube_ctrl.Re } if len(gateways.Items) > 0 { - controllerutil.AddFinalizer(class, gatewayapi.GatewayClassFinalizerGatewaysExist) + controllerutil.AddFinalizer(class, gatewayapi_v1.GatewayClassFinalizerGatewaysExist) } else { - controllerutil.RemoveFinalizer(class, gatewayapi.GatewayClassFinalizerGatewaysExist) + controllerutil.RemoveFinalizer(class, gatewayapi_v1.GatewayClassFinalizerGatewaysExist) } if err := r.Update(ctx, class); err != nil { @@ -78,9 +79,9 @@ func (r *GatewayClassReconciler) Reconcile(ctx context.Context, req kube_ctrl.Re if condition == nil { condition = &kube_meta.Condition{ - Type: string(gatewayapi.GatewayClassConditionStatusAccepted), + Type: string(gatewayapi_v1.GatewayClassConditionStatusAccepted), Status: kube_meta.ConditionTrue, - Reason: string(gatewayapi.GatewayClassReasonAccepted), + Reason: string(gatewayapi_v1.GatewayClassReasonAccepted), } } @@ -111,9 +112,9 @@ func getParametersRef( } condition := kube_meta.Condition{ - Type: string(gatewayapi.GatewayClassConditionStatusAccepted), + Type: string(gatewayapi_v1.GatewayClassConditionStatusAccepted), Status: kube_meta.ConditionFalse, - Reason: string(gatewayapi.GatewayClassReasonInvalidParameters), + Reason: string(gatewayapi_v1.GatewayClassReasonInvalidParameters), } if parametersRef.Group != gatewayapi.Group(mesh_k8s.GroupVersion.Group) || parametersRef.Kind != "MeshGatewayConfig" { diff --git a/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_controller.go b/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_controller.go index 96cce3b5f9da..00601b1eaa7e 100644 --- a/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_controller.go +++ b/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_controller.go @@ -17,6 +17,7 @@ import ( kube_controllerutil "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" kube_handler "sigs.k8s.io/controller-runtime/pkg/handler" kube_reconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" + gatewayapi_v1 "sigs.k8s.io/gateway-api/apis/v1" gatewayapi "sigs.k8s.io/gateway-api/apis/v1beta1" mesh_proto "github.com/kumahq/kuma/api/mesh/v1alpha1" @@ -67,7 +68,7 @@ func (r *GatewayReconciler) Reconcile(ctx context.Context, req kube_ctrl.Request return kube_ctrl.Result{}, nil } - if !kube_apimeta.IsStatusConditionTrue(class.Status.Conditions, string(gatewayapi.GatewayClassConditionStatusAccepted)) { + if !kube_apimeta.IsStatusConditionTrue(class.Status.Conditions, string(gatewayapi_v1.GatewayClassConditionStatusAccepted)) { return kube_ctrl.Result{}, nil } diff --git a/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_conversion.go b/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_conversion.go index 81e0aec0eb87..040e519575b9 100644 --- a/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_conversion.go +++ b/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_conversion.go @@ -11,6 +11,7 @@ import ( kube_meta "k8s.io/apimachinery/pkg/apis/meta/v1" kube_types "k8s.io/apimachinery/pkg/types" kube_client "sigs.k8s.io/controller-runtime/pkg/client" + gatewayapi_v1 "sigs.k8s.io/gateway-api/apis/v1" gatewayapi "sigs.k8s.io/gateway-api/apis/v1beta1" mesh_proto "github.com/kumahq/kuma/api/mesh/v1alpha1" @@ -24,8 +25,8 @@ type ListenerConditions map[gatewayapi.SectionName][]kube_meta.Condition func validProtocol(crossMesh bool, protocol gatewayapi.ProtocolType) bool { switch protocol { - case gatewayapi.HTTPProtocolType, gatewayapi.HTTPSProtocolType: - return !crossMesh || protocol == gatewayapi.HTTPProtocolType + case gatewayapi_v1.HTTPProtocolType, gatewayapi_v1.HTTPSProtocolType: + return !crossMesh || protocol == gatewayapi_v1.HTTPProtocolType default: } @@ -44,15 +45,15 @@ func ValidateListeners(crossMesh bool, listeners []gatewayapi.Listener) ([]gatew listenerConditions[listener] = append( listenerConditions[listener], kube_meta.Condition{ - Type: string(gatewayapi.ListenerConditionAccepted), + Type: string(gatewayapi_v1.ListenerConditionAccepted), Status: kube_meta.ConditionFalse, Reason: string(reason), Message: message, }, kube_meta.Condition{ - Type: string(gatewayapi.ListenerConditionProgrammed), + Type: string(gatewayapi_v1.ListenerConditionProgrammed), Status: kube_meta.ConditionFalse, - Reason: string(gatewayapi.ListenerReasonInvalid), + Reason: string(gatewayapi_v1.ListenerReasonInvalid), Message: "detached", }, ) @@ -66,15 +67,15 @@ func ValidateListeners(crossMesh bool, listeners []gatewayapi.Listener) ([]gatew listenerConditions[listener] = append( listenerConditions[listener], kube_meta.Condition{ - Type: string(gatewayapi.ListenerConditionConflicted), + Type: string(gatewayapi_v1.ListenerConditionConflicted), Status: kube_meta.ConditionTrue, Reason: string(reason), Message: message, }, kube_meta.Condition{ - Type: string(gatewayapi.ListenerConditionProgrammed), + Type: string(gatewayapi_v1.ListenerConditionProgrammed), Status: kube_meta.ConditionFalse, - Reason: string(gatewayapi.ListenerReasonInvalid), + Reason: string(gatewayapi_v1.ListenerReasonInvalid), Message: "conflicts found", }, ) @@ -118,7 +119,7 @@ func ValidateListeners(crossMesh bool, listeners []gatewayapi.Listener) ([]gatew } appendDetachedCondition( l.Name, - gatewayapi.ListenerReasonUnsupportedProtocol, + gatewayapi_v1.ListenerReasonUnsupportedProtocol, message, ) continue @@ -135,7 +136,7 @@ func ValidateListeners(crossMesh bool, listeners []gatewayapi.Listener) ([]gatew if num := portHostnames[hostnamePort]; num > 1 { appendConflictedCondition( l.Name, - gatewayapi.ListenerReasonHostnameConflict, + gatewayapi_v1.ListenerReasonHostnameConflict, fmt.Sprintf("multiple listeners for %s:%d", *hn, l.Port), ) continue @@ -145,7 +146,7 @@ func ValidateListeners(crossMesh bool, listeners []gatewayapi.Listener) ([]gatew if protocols := portProtocols[l.Port]; len(protocols) > 1 { appendConflictedCondition( l.Name, - gatewayapi.ListenerReasonProtocolConflict, + gatewayapi_v1.ListenerReasonProtocolConflict, fmt.Sprintf("multiple listeners on %d with conflicting protocols", l.Port), ) continue @@ -191,9 +192,9 @@ func (r *GatewayReconciler) gapiToKumaGateway( // TODO admission webhook should prevent this listenerConditions[l.Name] = append(listenerConditions[l.Name], kube_meta.Condition{ - Type: string(gatewayapi.ListenerConditionProgrammed), + Type: string(gatewayapi_v1.ListenerConditionProgrammed), Status: kube_meta.ConditionFalse, - Reason: string(gatewayapi.ListenerReasonInvalid), + Reason: string(gatewayapi_v1.ListenerReasonInvalid), Message: fmt.Sprintf("unexpected protocol %s", l.Protocol), }, ) @@ -210,9 +211,9 @@ func (r *GatewayReconciler) gapiToKumaGateway( if len(unsupportedRouteGroupKinds) > 0 { listenerConditions[l.Name] = append(listenerConditions[l.Name], kube_meta.Condition{ - Type: string(gatewayapi.ListenerConditionResolvedRefs), + Type: string(gatewayapi_v1.ListenerConditionResolvedRefs), Status: kube_meta.ConditionFalse, - Reason: string(gatewayapi.ListenerReasonInvalidRouteKinds), + Reason: string(gatewayapi_v1.ListenerReasonInvalidRouteKinds), Message: fmt.Sprintf("unexpected RouteGroupKind %q", strings.Join(unsupportedRouteGroupKinds, ", ")), }, ) @@ -276,14 +277,14 @@ func (r *GatewayReconciler) handleCertRefs(ctx context.Context, mesh string, gat return nil, nil, err } else if !permitted { return nil, &certRefCondition{ - reason: string(gatewayapi.ListenerReasonRefNotPermitted), + reason: string(gatewayapi_v1.ListenerReasonRefNotPermitted), message: fmt.Sprintf("reference to %s not permitted by any ReferenceGrant", name), }, nil } if *certRef.Kind != "Secret" || *certRef.Group != "" { return nil, &certRefCondition{ - reason: string(gatewayapi.ListenerReasonInvalidCertificateRef), + reason: string(gatewayapi_v1.ListenerReasonInvalidCertificateRef), message: fmt.Sprintf("invalid reference to %s/%s", *certRef.Group, *certRef.Kind), }, nil } @@ -292,7 +293,7 @@ func (r *GatewayReconciler) handleCertRefs(ctx context.Context, mesh string, gat if err := r.Client.Get(ctx, policyRef.NamespacedNameReferredTo(), secret); err != nil { if kube_apierrs.IsNotFound(err) { return nil, &certRefCondition{ - reason: string(gatewayapi.ListenerReasonInvalidCertificateRef), + reason: string(gatewayapi_v1.ListenerReasonInvalidCertificateRef), message: fmt.Sprintf("invalid reference to %s", name), }, nil } @@ -303,7 +304,7 @@ func (r *GatewayReconciler) handleCertRefs(ctx context.Context, mesh string, gat data, err := convertSecret(secret) if err != nil { return nil, &certRefCondition{ - reason: string(gatewayapi.ListenerReasonInvalidCertificateRef), + reason: string(gatewayapi_v1.ListenerReasonInvalidCertificateRef), message: err.Error(), }, nil } @@ -314,7 +315,7 @@ func (r *GatewayReconciler) handleCertRefs(ctx context.Context, mesh string, gat }) } - if l.TLS.Mode != nil && *l.TLS.Mode == gatewayapi.TLSModePassthrough { + if l.TLS.Mode != nil && *l.TLS.Mode == gatewayapi_v1.TLSModePassthrough { return nil, nil, nil // todo admission webhook should prevent this } @@ -342,23 +343,23 @@ func handleConditions(conditions []kube_meta.Condition, unresolvableCertRef *cer conditions = append( conditions, kube_meta.Condition{ - Type: string(gatewayapi.ListenerConditionAccepted), + Type: string(gatewayapi_v1.ListenerConditionAccepted), Status: kube_meta.ConditionTrue, - Reason: string(gatewayapi.ListenerReasonAccepted), + Reason: string(gatewayapi_v1.ListenerReasonAccepted), }, kube_meta.Condition{ - Type: string(gatewayapi.ListenerConditionConflicted), + Type: string(gatewayapi_v1.ListenerConditionConflicted), Status: kube_meta.ConditionFalse, - Reason: string(gatewayapi.ListenerReasonNoConflicts), + Reason: string(gatewayapi_v1.ListenerReasonNoConflicts), }, ) var resolvedRefConditions []kube_meta.Condition - if unresolvableCertRef != nil && !kube_apimeta.IsStatusConditionFalse(conditions, string(gatewayapi.ListenerConditionResolvedRefs)) { + if unresolvableCertRef != nil && !kube_apimeta.IsStatusConditionFalse(conditions, string(gatewayapi_v1.ListenerConditionResolvedRefs)) { kube_apimeta.SetStatusCondition(&conditions, kube_meta.Condition{ - Type: string(gatewayapi.ListenerConditionResolvedRefs), + Type: string(gatewayapi_v1.ListenerConditionResolvedRefs), Status: kube_meta.ConditionFalse, Reason: unresolvableCertRef.reason, Message: unresolvableCertRef.message, @@ -366,27 +367,27 @@ func handleConditions(conditions []kube_meta.Condition, unresolvableCertRef *cer ) } - if !kube_apimeta.IsStatusConditionFalse(conditions, string(gatewayapi.ListenerConditionResolvedRefs)) { + if !kube_apimeta.IsStatusConditionFalse(conditions, string(gatewayapi_v1.ListenerConditionResolvedRefs)) { kube_apimeta.SetStatusCondition(&conditions, kube_meta.Condition{ - Type: string(gatewayapi.ListenerConditionResolvedRefs), + Type: string(gatewayapi_v1.ListenerConditionResolvedRefs), Status: kube_meta.ConditionTrue, - Reason: string(gatewayapi.ListenerReasonResolvedRefs), + Reason: string(gatewayapi_v1.ListenerReasonResolvedRefs), }, ) kube_apimeta.SetStatusCondition(&conditions, kube_meta.Condition{ - Type: string(gatewayapi.ListenerConditionProgrammed), + Type: string(gatewayapi_v1.ListenerConditionProgrammed), Status: kube_meta.ConditionTrue, - Reason: string(gatewayapi.ListenerReasonProgrammed), + Reason: string(gatewayapi_v1.ListenerReasonProgrammed), }, ) } else { kube_apimeta.SetStatusCondition(&conditions, kube_meta.Condition{ - Type: string(gatewayapi.ListenerConditionProgrammed), + Type: string(gatewayapi_v1.ListenerConditionProgrammed), Status: kube_meta.ConditionFalse, - Reason: string(gatewayapi.ListenerReasonInvalid), + Reason: string(gatewayapi_v1.ListenerReasonInvalid), Message: "unable to resolve refs", }, ) diff --git a/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_conversion_test.go b/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_conversion_test.go index 6d77e5816f99..7d23a70fa200 100644 --- a/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_conversion_test.go +++ b/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_conversion_test.go @@ -5,6 +5,7 @@ import ( . "github.com/onsi/gomega" . "github.com/onsi/gomega/gstruct" kube_meta "k8s.io/apimachinery/pkg/apis/meta/v1" + gatewayapi_v1 "sigs.k8s.io/gateway-api/apis/v1" gatewayapi "sigs.k8s.io/gateway-api/apis/v1beta1" k8s_gatewayapi "github.com/kumahq/kuma/pkg/plugins/runtime/k8s/controllers/gatewayapi" @@ -12,11 +13,11 @@ import ( var _ = Describe("ValidateListeners", func() { It("works with one simple listener", func() { - same := gatewayapi.NamespacesFromSame + same := gatewayapi_v1.NamespacesFromSame listeners := []gatewayapi.Listener{ { Name: gatewayapi.SectionName("prod"), - Protocol: gatewayapi.HTTPProtocolType, + Protocol: gatewayapi_v1.HTTPProtocolType, Port: gatewayapi.PortNumber(80), AllowedRoutes: &gatewayapi.AllowedRoutes{ Namespaces: &gatewayapi.RouteNamespaces{ @@ -32,11 +33,11 @@ var _ = Describe("ValidateListeners", func() { Expect(conditions).To(BeEmpty()) }) It("works with conflicting protocols", func() { - same := gatewayapi.NamespacesFromSame + same := gatewayapi_v1.NamespacesFromSame listeners := []gatewayapi.Listener{ { Name: gatewayapi.SectionName("prod-1"), - Protocol: gatewayapi.HTTPProtocolType, + Protocol: gatewayapi_v1.HTTPProtocolType, Port: gatewayapi.PortNumber(80), AllowedRoutes: &gatewayapi.AllowedRoutes{ Namespaces: &gatewayapi.RouteNamespaces{ @@ -46,7 +47,7 @@ var _ = Describe("ValidateListeners", func() { }, { Name: gatewayapi.SectionName("prod-2"), - Protocol: gatewayapi.HTTPSProtocolType, + Protocol: gatewayapi_v1.HTTPSProtocolType, Port: gatewayapi.PortNumber(80), AllowedRoutes: &gatewayapi.AllowedRoutes{ Namespaces: &gatewayapi.RouteNamespaces{ @@ -61,12 +62,12 @@ var _ = Describe("ValidateListeners", func() { protocolConflicted := ContainElements( MatchFields(IgnoreExtras, Fields{ - "Type": Equal(string(gatewayapi.ListenerConditionConflicted)), + "Type": Equal(string(gatewayapi_v1.ListenerConditionConflicted)), "Status": Equal(kube_meta.ConditionTrue), - "Reason": Equal(string(gatewayapi.ListenerReasonProtocolConflict)), + "Reason": Equal(string(gatewayapi_v1.ListenerReasonProtocolConflict)), }), MatchFields(IgnoreExtras, Fields{ - "Type": Equal(string(gatewayapi.ListenerConditionProgrammed)), + "Type": Equal(string(gatewayapi_v1.ListenerConditionProgrammed)), "Status": Equal(kube_meta.ConditionFalse), }), ) @@ -78,13 +79,13 @@ var _ = Describe("ValidateListeners", func() { ) }) It("works with non-conflicting differing hostnames", func() { - same := gatewayapi.NamespacesFromSame + same := gatewayapi_v1.NamespacesFromSame foo := gatewayapi.Hostname("foo.com") bar := gatewayapi.Hostname("bar.com") listeners := []gatewayapi.Listener{ { Name: gatewayapi.SectionName("prod-1"), - Protocol: gatewayapi.HTTPProtocolType, + Protocol: gatewayapi_v1.HTTPProtocolType, Hostname: &foo, Port: gatewayapi.PortNumber(80), AllowedRoutes: &gatewayapi.AllowedRoutes{ @@ -95,7 +96,7 @@ var _ = Describe("ValidateListeners", func() { }, { Name: gatewayapi.SectionName("prod-2"), - Protocol: gatewayapi.HTTPProtocolType, + Protocol: gatewayapi_v1.HTTPProtocolType, Hostname: &bar, Port: gatewayapi.PortNumber(80), AllowedRoutes: &gatewayapi.AllowedRoutes{ @@ -113,11 +114,11 @@ var _ = Describe("ValidateListeners", func() { Expect(conditions).To(BeEmpty()) }) It("enforces HTTP and cross-mesh", func() { - same := gatewayapi.NamespacesFromSame + same := gatewayapi_v1.NamespacesFromSame listeners := []gatewayapi.Listener{ { Name: gatewayapi.SectionName("valid-mesh"), - Protocol: gatewayapi.HTTPProtocolType, + Protocol: gatewayapi_v1.HTTPProtocolType, Port: gatewayapi.PortNumber(80), AllowedRoutes: &gatewayapi.AllowedRoutes{ Namespaces: &gatewayapi.RouteNamespaces{ @@ -127,7 +128,7 @@ var _ = Describe("ValidateListeners", func() { }, { Name: gatewayapi.SectionName("invalid-mesh"), - Protocol: gatewayapi.HTTPSProtocolType, + Protocol: gatewayapi_v1.HTTPSProtocolType, Port: gatewayapi.PortNumber(80), AllowedRoutes: &gatewayapi.AllowedRoutes{ Namespaces: &gatewayapi.RouteNamespaces{ @@ -144,12 +145,12 @@ var _ = Describe("ValidateListeners", func() { invalid := ContainElements( MatchFields(IgnoreExtras, Fields{ - "Type": Equal(string(gatewayapi.ListenerConditionAccepted)), + "Type": Equal(string(gatewayapi_v1.ListenerConditionAccepted)), "Status": Equal(kube_meta.ConditionFalse), - "Reason": Equal(string(gatewayapi.ListenerReasonUnsupportedProtocol)), + "Reason": Equal(string(gatewayapi_v1.ListenerReasonUnsupportedProtocol)), }), MatchFields(IgnoreExtras, Fields{ - "Type": Equal(string(gatewayapi.ListenerConditionProgrammed)), + "Type": Equal(string(gatewayapi_v1.ListenerConditionProgrammed)), "Status": Equal(kube_meta.ConditionFalse), }), ) @@ -160,12 +161,12 @@ var _ = Describe("ValidateListeners", func() { ) }) It("works with multiple listeners for same hostname:port conflict", func() { - same := gatewayapi.NamespacesFromSame + same := gatewayapi_v1.NamespacesFromSame foo := gatewayapi.Hostname("foo.com") listeners := []gatewayapi.Listener{ { Name: gatewayapi.SectionName("prod-1"), - Protocol: gatewayapi.HTTPProtocolType, + Protocol: gatewayapi_v1.HTTPProtocolType, Hostname: &foo, Port: gatewayapi.PortNumber(80), AllowedRoutes: &gatewayapi.AllowedRoutes{ @@ -176,7 +177,7 @@ var _ = Describe("ValidateListeners", func() { }, { Name: gatewayapi.SectionName("prod-2"), - Protocol: gatewayapi.HTTPProtocolType, + Protocol: gatewayapi_v1.HTTPProtocolType, Hostname: &foo, Port: gatewayapi.PortNumber(80), AllowedRoutes: &gatewayapi.AllowedRoutes{ @@ -192,12 +193,12 @@ var _ = Describe("ValidateListeners", func() { hostnameConflicted := ContainElements( MatchFields(IgnoreExtras, Fields{ - "Type": Equal(string(gatewayapi.ListenerConditionConflicted)), + "Type": Equal(string(gatewayapi_v1.ListenerConditionConflicted)), "Status": Equal(kube_meta.ConditionTrue), - "Reason": Equal(string(gatewayapi.ListenerReasonHostnameConflict)), + "Reason": Equal(string(gatewayapi_v1.ListenerReasonHostnameConflict)), }), MatchFields(IgnoreExtras, Fields{ - "Type": Equal(string(gatewayapi.ListenerConditionProgrammed)), + "Type": Equal(string(gatewayapi_v1.ListenerConditionProgrammed)), "Status": Equal(kube_meta.ConditionFalse), }), ) diff --git a/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_status.go b/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_status.go index dd2f0a67c847..573e358d573d 100644 --- a/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_status.go +++ b/pkg/plugins/runtime/k8s/controllers/gatewayapi/gateway_status.go @@ -9,6 +9,7 @@ import ( kube_apimeta "k8s.io/apimachinery/pkg/api/meta" kube_meta "k8s.io/apimachinery/pkg/apis/meta/v1" kube_client "sigs.k8s.io/controller-runtime/pkg/client" + gatewayapi_v1 "sigs.k8s.io/gateway-api/apis/v1" gatewayapi "sigs.k8s.io/gateway-api/apis/v1beta1" mesh_k8s "github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/api/v1alpha1" @@ -40,7 +41,7 @@ func (r *GatewayReconciler) updateStatus( return nil } -func gatewayAddresses(instance *mesh_k8s.MeshGatewayInstance) []gatewayapi.GatewayStatusAddress { +func gatewayAddresses(instance *mesh_k8s.MeshGatewayInstance) []gatewayapi_v1.GatewayStatusAddress { if instance == nil { return nil } @@ -48,18 +49,18 @@ func gatewayAddresses(instance *mesh_k8s.MeshGatewayInstance) []gatewayapi.Gatew ipType := gatewayapi.IPAddressType hostnameType := gatewayapi.HostnameAddressType - var addrs []gatewayapi.GatewayStatusAddress + var addrs []gatewayapi_v1.GatewayStatusAddress if lb := instance.Status.LoadBalancer; lb != nil { for _, addr := range instance.Status.LoadBalancer.Ingress { if addr.IP != "" { - addrs = append(addrs, gatewayapi.GatewayStatusAddress{ + addrs = append(addrs, gatewayapi_v1.GatewayStatusAddress{ Type: &ipType, Value: addr.IP, }) } if addr.Hostname != "" { - addrs = append(addrs, gatewayapi.GatewayStatusAddress{ + addrs = append(addrs, gatewayapi_v1.GatewayStatusAddress{ Type: &hostnameType, Value: addr.Hostname, }) @@ -200,23 +201,23 @@ func mergeGatewayStatus( gateway.Status.Listeners = mergeGatewayListenerStatuses(gateway, listenerConditions, attachedListeners) programmedStatus := kube_meta.ConditionTrue - programmedReason := string(gatewayapi.GatewayReasonProgrammed) + programmedReason := string(gatewayapi_v1.GatewayReasonProgrammed) for _, listener := range gateway.Status.Listeners { - if !kube_apimeta.IsStatusConditionTrue(listener.Conditions, string(gatewayapi.ListenerConditionProgrammed)) { + if !kube_apimeta.IsStatusConditionTrue(listener.Conditions, string(gatewayapi_v1.ListenerConditionProgrammed)) { programmedStatus = kube_meta.ConditionFalse - programmedReason = string(gatewayapi.GatewayReasonInvalid) + programmedReason = string(gatewayapi_v1.GatewayReasonInvalid) } } conditions := []kube_meta.Condition{ { - Type: string(gatewayapi.GatewayConditionAccepted), + Type: string(gatewayapi_v1.GatewayConditionAccepted), Status: kube_meta.ConditionTrue, - Reason: string(gatewayapi.GatewayReasonAccepted), + Reason: string(gatewayapi_v1.GatewayReasonAccepted), }, { - Type: string(gatewayapi.GatewayConditionProgrammed), + Type: string(gatewayapi_v1.GatewayConditionProgrammed), Status: programmedStatus, Reason: programmedReason, }, diff --git a/pkg/plugins/runtime/k8s/controllers/gatewayapi/http_route_controller.go b/pkg/plugins/runtime/k8s/controllers/gatewayapi/http_route_controller.go index bbe3aea8be3d..475f76d809e7 100644 --- a/pkg/plugins/runtime/k8s/controllers/gatewayapi/http_route_controller.go +++ b/pkg/plugins/runtime/k8s/controllers/gatewayapi/http_route_controller.go @@ -17,6 +17,7 @@ import ( kube_client "sigs.k8s.io/controller-runtime/pkg/client" kube_handler "sigs.k8s.io/controller-runtime/pkg/handler" kube_reconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" + gatewayapi_v1 "sigs.k8s.io/gateway-api/apis/v1" gatewayapi "sigs.k8s.io/gateway-api/apis/v1beta1" mesh_proto "github.com/kumahq/kuma/api/mesh/v1alpha1" @@ -182,7 +183,7 @@ func (r *HTTPRouteReconciler) gapiToKumaRoutes( case attachment.NoHostnameIntersection: reason = string(gatewayapi.RouteReasonNoMatchingListenerHostname) case attachment.NoMatchingParent: - reason = string(gatewayapi.RouteReasonNoMatchingParent) + reason = string(gatewayapi_v1.RouteReasonNoMatchingParent) } notAcceptedConditions[ref] = reason } diff --git a/pkg/plugins/runtime/k8s/controllers/gatewayapi/http_route_conversion.go b/pkg/plugins/runtime/k8s/controllers/gatewayapi/http_route_conversion.go index 17c37f0e5ece..a5f30cf77968 100644 --- a/pkg/plugins/runtime/k8s/controllers/gatewayapi/http_route_conversion.go +++ b/pkg/plugins/runtime/k8s/controllers/gatewayapi/http_route_conversion.go @@ -11,6 +11,7 @@ import ( kube_apimeta "k8s.io/apimachinery/pkg/api/meta" kube_meta "k8s.io/apimachinery/pkg/apis/meta/v1" kube_client "sigs.k8s.io/controller-runtime/pkg/client" + gatewayapi_v1 "sigs.k8s.io/gateway-api/apis/v1" gatewayapi "sigs.k8s.io/gateway-api/apis/v1beta1" mesh_proto "github.com/kumahq/kuma/api/mesh/v1alpha1" @@ -67,7 +68,7 @@ func (r *HTTPRouteReconciler) gapiToKumaRule( } switch filter.Type { - case gatewayapi.HTTPRouteFilterRequestRedirect: + case gatewayapi_v1.HTTPRouteFilterRequestRedirect: foundBackendlessFilter = true } @@ -275,11 +276,11 @@ func gapiToKumaMatch(match gatewayapi.HTTPRouteMatch) (*mesh_proto.MeshGatewayRo } switch *p.Type { - case gatewayapi.PathMatchExact: + case gatewayapi_v1.PathMatchExact: path.Match = mesh_proto.MeshGatewayRoute_HttpRoute_Match_Path_EXACT - case gatewayapi.PathMatchPathPrefix: + case gatewayapi_v1.PathMatchPathPrefix: path.Match = mesh_proto.MeshGatewayRoute_HttpRoute_Match_Path_PREFIX - case gatewayapi.PathMatchRegularExpression: + case gatewayapi_v1.PathMatchRegularExpression: path.Match = mesh_proto.MeshGatewayRoute_HttpRoute_Match_Path_REGEX } @@ -294,9 +295,9 @@ func gapiToKumaMatch(match gatewayapi.HTTPRouteMatch) (*mesh_proto.MeshGatewayRo } switch *header.Type { - case gatewayapi.HeaderMatchExact: + case gatewayapi_v1.HeaderMatchExact: kumaHeader.Match = mesh_proto.MeshGatewayRoute_HttpRoute_Match_Header_EXACT - case gatewayapi.HeaderMatchRegularExpression: + case gatewayapi_v1.HeaderMatchRegularExpression: kumaHeader.Match = mesh_proto.MeshGatewayRoute_HttpRoute_Match_Header_REGEX } @@ -310,9 +311,9 @@ func gapiToKumaMatch(match gatewayapi.HTTPRouteMatch) (*mesh_proto.MeshGatewayRo } switch *query.Type { - case gatewayapi.QueryParamMatchExact: + case gatewayapi_v1.QueryParamMatchExact: kumaQuery.Match = mesh_proto.MeshGatewayRoute_HttpRoute_Match_Query_EXACT - case gatewayapi.QueryParamMatchRegularExpression: + case gatewayapi_v1.QueryParamMatchRegularExpression: kumaQuery.Match = mesh_proto.MeshGatewayRoute_HttpRoute_Match_Query_REGEX } @@ -326,11 +327,11 @@ func pathRewriteToKuma(modifier gatewayapi.HTTPPathModifier) *mesh_proto.MeshGat rewrite := mesh_proto.MeshGatewayRoute_HttpRoute_Filter_Rewrite{} switch modifier.Type { - case gatewayapi.FullPathHTTPPathModifier: + case gatewayapi_v1.FullPathHTTPPathModifier: rewrite.Path = &mesh_proto.MeshGatewayRoute_HttpRoute_Filter_Rewrite_ReplaceFull{ ReplaceFull: *modifier.ReplaceFullPath, } - case gatewayapi.PrefixMatchHTTPPathModifier: + case gatewayapi_v1.PrefixMatchHTTPPathModifier: rewrite.Path = &mesh_proto.MeshGatewayRoute_HttpRoute_Filter_Rewrite_ReplacePrefixMatch{ ReplacePrefixMatch: *modifier.ReplacePrefixMatch, } @@ -347,7 +348,7 @@ func (r *HTTPRouteReconciler) gapiToKumaFilters( var conditions []kube_meta.Condition switch filter.Type { - case gatewayapi.HTTPRouteFilterRequestHeaderModifier: + case gatewayapi_v1.HTTPRouteFilterRequestHeaderModifier: filter := filter.RequestHeaderModifier var headerFilter mesh_proto.MeshGatewayRoute_HttpRoute_Filter_HeaderFilter @@ -367,7 +368,7 @@ func (r *HTTPRouteReconciler) gapiToKumaFilters( RequestHeader: &headerFilter, }, }) - case gatewayapi.HTTPRouteFilterRequestMirror: + case gatewayapi_v1.HTTPRouteFilterRequestMirror: filter := filter.RequestMirror // For mirrors we skip unresolved refs @@ -390,7 +391,7 @@ func (r *HTTPRouteReconciler) gapiToKumaFilters( Mirror: &mirror, }, }) - case gatewayapi.HTTPRouteFilterRequestRedirect: + case gatewayapi_v1.HTTPRouteFilterRequestRedirect: filter := filter.RequestRedirect redirect := mesh_proto.MeshGatewayRoute_HttpRoute_Filter_Redirect{} @@ -432,7 +433,7 @@ func (r *HTTPRouteReconciler) gapiToKumaFilters( Redirect: &redirect, }, }) - case gatewayapi.HTTPRouteFilterURLRewrite: + case gatewayapi_v1.HTTPRouteFilterURLRewrite: filter := filter.URLRewrite if filter.Hostname != nil { @@ -456,7 +457,7 @@ func (r *HTTPRouteReconciler) gapiToKumaFilters( } kumaFilters = append(kumaFilters, &filter) } - case gatewayapi.HTTPRouteFilterResponseHeaderModifier: + case gatewayapi_v1.HTTPRouteFilterResponseHeaderModifier: filter := filter.ResponseHeaderModifier var headerFilter mesh_proto.MeshGatewayRoute_HttpRoute_Filter_HeaderFilter diff --git a/pkg/plugins/runtime/k8s/controllers/gatewayapi/mesh_http_route_conversion.go b/pkg/plugins/runtime/k8s/controllers/gatewayapi/mesh_http_route_conversion.go index 8e39e3321150..7c124de8e93d 100644 --- a/pkg/plugins/runtime/k8s/controllers/gatewayapi/mesh_http_route_conversion.go +++ b/pkg/plugins/runtime/k8s/controllers/gatewayapi/mesh_http_route_conversion.go @@ -11,6 +11,7 @@ import ( kube_meta "k8s.io/apimachinery/pkg/apis/meta/v1" kube_types "k8s.io/apimachinery/pkg/types" kube_client "sigs.k8s.io/controller-runtime/pkg/client" + gatewayapi_v1 "sigs.k8s.io/gateway-api/apis/v1" gatewayapi "sigs.k8s.io/gateway-api/apis/v1beta1" common_api "github.com/kumahq/kuma/api/common/v1alpha1" @@ -205,12 +206,12 @@ func (r *HTTPRouteReconciler) gapiToKumaMeshMatch(gapiMatch gatewayapi.HTTPRoute for _, gapiParam := range gapiMatch.QueryParams { var param v1alpha1.QueryParamsMatch switch *gapiParam.Type { - case gatewayapi.QueryParamMatchExact: + case gatewayapi_v1.QueryParamMatchExact: param = v1alpha1.QueryParamsMatch{ Type: v1alpha1.ExactQueryMatch, Value: gapiParam.Value, } - case gatewayapi.QueryParamMatchRegularExpression: + case gatewayapi_v1.QueryParamMatchRegularExpression: param = v1alpha1.QueryParamsMatch{ Type: v1alpha1.RegularExpressionQueryMatch, Value: gapiParam.Value, @@ -242,12 +243,12 @@ func fromGAPIHeaders(gapiHeaders []gatewayapi.HTTPHeader) []v1alpha1.HeaderKeyVa func fromGAPIPath(gapiPath gatewayapi.HTTPPathModifier) (v1alpha1.PathRewrite, bool) { switch gapiPath.Type { - case gatewayapi.FullPathHTTPPathModifier: + case gatewayapi_v1.FullPathHTTPPathModifier: return v1alpha1.PathRewrite{ Type: v1alpha1.ReplaceFullPathType, ReplaceFullPath: gapiPath.ReplaceFullPath, }, true - case gatewayapi.PrefixMatchHTTPPathModifier: + case gatewayapi_v1.PrefixMatchHTTPPathModifier: return v1alpha1.PathRewrite{ Type: v1alpha1.ReplacePrefixMatchType, ReplacePrefixMatch: gapiPath.ReplacePrefixMatch, @@ -264,7 +265,7 @@ func (r *HTTPRouteReconciler) gapiToKumaMeshFilter( gapiFilter gatewayapi.HTTPRouteFilter, ) (v1alpha1.Filter, []kube_meta.Condition, bool) { switch gapiFilter.Type { - case gatewayapi.HTTPRouteFilterRequestHeaderModifier: + case gatewayapi_v1.HTTPRouteFilterRequestHeaderModifier: modifier := gapiFilter.RequestHeaderModifier return v1alpha1.Filter{ Type: v1alpha1.RequestHeaderModifierType, @@ -274,7 +275,7 @@ func (r *HTTPRouteReconciler) gapiToKumaMeshFilter( Remove: modifier.Remove, }, }, nil, true - case gatewayapi.HTTPRouteFilterResponseHeaderModifier: + case gatewayapi_v1.HTTPRouteFilterResponseHeaderModifier: modifier := gapiFilter.ResponseHeaderModifier return v1alpha1.Filter{ Type: v1alpha1.ResponseHeaderModifierType, @@ -284,7 +285,7 @@ func (r *HTTPRouteReconciler) gapiToKumaMeshFilter( Remove: modifier.Remove, }, }, nil, true - case gatewayapi.HTTPRouteFilterRequestRedirect: + case gatewayapi_v1.HTTPRouteFilterRequestRedirect: redirect := gapiFilter.RequestRedirect var path *v1alpha1.PathRewrite @@ -306,7 +307,7 @@ func (r *HTTPRouteReconciler) gapiToKumaMeshFilter( StatusCode: redirect.StatusCode, }, }, nil, true - case gatewayapi.HTTPRouteFilterURLRewrite: + case gatewayapi_v1.HTTPRouteFilterURLRewrite: rewrite := gapiFilter.URLRewrite var path *v1alpha1.PathRewrite @@ -325,7 +326,7 @@ func (r *HTTPRouteReconciler) gapiToKumaMeshFilter( Path: path, }, }, nil, true - case gatewayapi.HTTPRouteFilterRequestMirror: + case gatewayapi_v1.HTTPRouteFilterRequestMirror: mirror := gapiFilter.RequestMirror ref, refCondition, err := r.uncheckedGapiToKumaRef(ctx, mesh, routeNamespace, mirror.BackendRef) diff --git a/test/e2e/gateway/gatewayapi/conformance_test.go b/test/e2e/gateway/gatewayapi/conformance_test.go index c7ec0c40bce8..ad49c6d5dbad 100644 --- a/test/e2e/gateway/gatewayapi/conformance_test.go +++ b/test/e2e/gateway/gatewayapi/conformance_test.go @@ -9,7 +9,8 @@ import ( "k8s.io/apimachinery/pkg/util/sets" clientgo_kube "k8s.io/client-go/kubernetes" "sigs.k8s.io/controller-runtime/pkg/client" - apis_gatewayapi "sigs.k8s.io/gateway-api/apis/v1beta1" + gatewayapi_v1 "sigs.k8s.io/gateway-api/apis/v1" + gatewayapi "sigs.k8s.io/gateway-api/apis/v1beta1" conformanceapis "sigs.k8s.io/gateway-api/conformance/apis/v1alpha1" "sigs.k8s.io/gateway-api/conformance/tests" "sigs.k8s.io/gateway-api/conformance/utils/suite" @@ -73,7 +74,8 @@ func TestConformance(t *testing.T) { client, err := client.New(clientConfig, client.Options{}) g.Expect(err).ToNot(HaveOccurred()) - g.Expect(apis_gatewayapi.AddToScheme(client.Scheme())).To(Succeed()) + g.Expect(gatewayapi.AddToScheme(client.Scheme())).To(Succeed()) + g.Expect(gatewayapi_v1.AddToScheme(client.Scheme())).To(Succeed()) clientset, err := clientgo_kube.NewForConfig(clientConfig) g.Expect(err).ToNot(HaveOccurred()) From d5541b91e4464c192f5421ed7bc3b6c0a0b3dcd3 Mon Sep 17 00:00:00 2001 From: Mike Beaumont Date: Thu, 26 Oct 2023 16:25:56 +0200 Subject: [PATCH 3/8] fix(helm): use correct GatewayClass version Signed-off-by: Mike Beaumont --- deployments/charts/kuma/templates/gateway-class.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/deployments/charts/kuma/templates/gateway-class.yaml b/deployments/charts/kuma/templates/gateway-class.yaml index 0de15581cc3f..09d8a74a1861 100644 --- a/deployments/charts/kuma/templates/gateway-class.yaml +++ b/deployments/charts/kuma/templates/gateway-class.yaml @@ -1,4 +1,12 @@ -{{- if and .Values.experimental.gatewayAPI (.Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1beta1/GatewayClass") }} +{{- if and .Values.experimental.gatewayAPI (.Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1/GatewayClass") }} +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: GatewayClass +metadata: + name: kuma +spec: + controllerName: "gateways.kuma.io/controller" +{{- else if and .Values.experimental.gatewayAPI (.Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1beta1/GatewayClass") }} --- apiVersion: gateway.networking.k8s.io/v1beta1 kind: GatewayClass From fbe4ae2a2ffbd6bc3beae46f813687bb1cc93f52 Mon Sep 17 00:00:00 2001 From: Mike Beaumont Date: Fri, 27 Oct 2023 09:42:47 +0200 Subject: [PATCH 4/8] test(e2e): don't test that the webhook is installed Signed-off-by: Mike Beaumont --- test/e2e_env/kubernetes/gateway/gatewayapi.go | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/test/e2e_env/kubernetes/gateway/gatewayapi.go b/test/e2e_env/kubernetes/gateway/gatewayapi.go index 85e348079fbe..83d06d539ed7 100644 --- a/test/e2e_env/kubernetes/gateway/gatewayapi.go +++ b/test/e2e_env/kubernetes/gateway/gatewayapi.go @@ -505,28 +505,4 @@ data: }, "30s", "1s").Should(Succeed()) }) }) - - Context("Upstream validation", func() { - It("should validate Gateway", func() { - gateway := fmt.Sprintf(` -apiVersion: gateway.networking.k8s.io/v1beta1 -kind: Gateway -metadata: - name: kuma-validate - namespace: %s - annotations: - kuma.io/mesh: %s -spec: - gatewayClassName: kuma - listeners: - - name: proxy - port: 10080 - protocol: TCP - hostname: xyz.io -`, namespace, meshName) - - err := k8s.KubectlApplyFromStringE(kubernetes.Cluster.GetTesting(), kubernetes.Cluster.GetKubectlOptions(), gateway) - Expect(err).To(HaveOccurred()) - }) - }) } From 3aa155d95f1cdeb8f43e783cb4993aca21dc7df8 Mon Sep 17 00:00:00 2001 From: Mike Beaumont Date: Mon, 30 Oct 2023 13:35:17 +0100 Subject: [PATCH 5/8] docs(UPGRADE): add note about eventually deprecating v1beta1 Signed-off-by: Mike Beaumont --- UPGRADE.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UPGRADE.md b/UPGRADE.md index be44fccaf5c9..d4fddc20a921 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -43,6 +43,11 @@ These endpoints are getting replaced to achieve more coherency on the API: While you can use the old API they will be removed in a future version +### Gateway API + +We support `v1` resources and `v1.0.0` of `gateway-api`. `v1beta1` resources are +still supported but support for these WILL be removed in a future release. + ## Upgrade to `2.4.x` ### Configuration change From 94024aaa5154527cb040ca7153b6d1304d752684 Mon Sep 17 00:00:00 2001 From: Mike Beaumont Date: Tue, 31 Oct 2023 21:31:15 +0100 Subject: [PATCH 6/8] chore: v1.0.0 Signed-off-by: Mike Beaumont --- go.mod | 28 ++++++++++---------- go.sum | 59 +++++++++++++++++++++---------------------- test/framework/k8s.go | 2 +- 3 files changed, 44 insertions(+), 45 deletions(-) diff --git a/go.mod b/go.mod index 3844869d0bbc..3fcb20b12ec1 100644 --- a/go.mod +++ b/go.mod @@ -61,7 +61,7 @@ require ( go.opentelemetry.io/proto/otlp v1.0.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.26.0 - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 + golang.org/x/exp v0.0.0-20231006140011-7918f672742d golang.org/x/net v0.17.0 golang.org/x/sys v0.13.0 golang.org/x/text v0.13.0 @@ -78,13 +78,13 @@ require ( k8s.io/apimachinery v0.28.3 k8s.io/client-go v0.28.3 k8s.io/klog/v2 v2.100.1 - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 k8s.io/kubectl v0.28.3 - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 + k8s.io/utils v0.0.0-20230726121419-3b25d923346b sigs.k8s.io/controller-runtime v0.16.3 sigs.k8s.io/controller-tools v0.13.0 // When updating this also update version in: test/framework/k8s.go - sigs.k8s.io/gateway-api v1.0.0-rc2 + sigs.k8s.io/gateway-api v1.0.0 sigs.k8s.io/yaml v1.4.0 ) @@ -112,16 +112,16 @@ require ( github.com/docker/docker v24.0.7+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/evanphx/json-patch v5.6.0+incompatible // indirect + github.com/evanphx/json-patch v5.7.0+incompatible // indirect github.com/fatih/color v1.15.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonpointer v0.20.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/swag v0.22.4 // indirect github.com/go-sql-driver/mysql v1.6.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gobuffalo/flect v1.0.2 // indirect @@ -190,13 +190,13 @@ require ( go.opentelemetry.io/otel/metric v1.19.0 // indirect go.uber.org/atomic v1.10.0 // indirect golang.org/x/crypto v0.14.0 // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/oauth2 v0.12.0 // indirect - golang.org/x/sync v0.3.0 // indirect + golang.org/x/mod v0.13.0 // indirect + golang.org/x/oauth2 v0.13.0 // indirect + golang.org/x/sync v0.4.0 // indirect golang.org/x/term v0.13.0 // indirect - golang.org/x/tools v0.13.0 // indirect + golang.org/x/tools v0.14.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/appengine v1.6.7 // indirect + google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect @@ -204,5 +204,5 @@ require ( gotest.tools/v3 v3.5.0 // indirect k8s.io/component-base v0.28.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect ) diff --git a/go.sum b/go.sum index 940a620a2476..0b0ad759cd98 100644 --- a/go.sum +++ b/go.sum @@ -102,8 +102,8 @@ github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= -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/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= +github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exaring/otelpgx v0.5.2 h1:joqpJoz/HJD2hP4Rdk6CVM9O7oCQ5zWAkTalTen0ShE= @@ -115,8 +115,8 @@ github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx github.com/frankban/quicktest v1.14.5/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= @@ -133,12 +133,14 @@ github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= +github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= @@ -163,7 +165,6 @@ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -499,8 +500,8 @@ golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4 golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -509,15 +510,14 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= @@ -532,8 +532,8 @@ golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= -golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= +golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= +golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -541,8 +541,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -571,7 +571,6 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -587,10 +586,10 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= @@ -607,8 +606,8 @@ golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -619,8 +618,8 @@ gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= @@ -687,21 +686,21 @@ k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/kubectl v0.28.3 h1:H1Peu1O3EbN9zHkJCcvhiJ4NUj6lb88sGPO5wrWIM6k= k8s.io/kubectl v0.28.3/go.mod h1:RDAudrth/2wQ3Sg46fbKKl4/g+XImzvbsSRZdP2RiyE= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= sigs.k8s.io/controller-tools v0.13.0 h1:NfrvuZ4bxyolhDBt/rCZhDnx3M2hzlhgo5n3Iv2RykI= sigs.k8s.io/controller-tools v0.13.0/go.mod h1:5vw3En2NazbejQGCeWKRrE7q4P+CW8/klfVqP8QZkgA= -sigs.k8s.io/gateway-api v1.0.0-rc2 h1:+7rq7j5fehUkMkgnJyL90mtXrVnz8aj5SXsRqIEW3Mk= -sigs.k8s.io/gateway-api v1.0.0-rc2/go.mod h1:+QpYENjk9s31/abu2Pv5BpK2v88UQDK2aeQCwCvy6ck= +sigs.k8s.io/gateway-api v1.0.0 h1:iPTStSv41+d9p0xFydll6d7f7MOBGuqXM6p2/zVYMAs= +sigs.k8s.io/gateway-api v1.0.0/go.mod h1:4cUgr0Lnp5FZ0Cdq8FdRwCvpiWws7LVhLHGIudLlf4c= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/test/framework/k8s.go b/test/framework/k8s.go index 152b394b7a1b..1d31e35a58b4 100644 --- a/test/framework/k8s.go +++ b/test/framework/k8s.go @@ -56,7 +56,7 @@ func GatewayAPICRDs(cluster Cluster) error { return k8s.RunKubectlE( cluster.GetTesting(), cluster.GetKubectlOptions(), - "apply", "-f", "https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0-rc2/experimental-install.yaml") + "apply", "-f", "https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/experimental-install.yaml") } func UpdateKubeObject( From 601ddbb52edd791bd3b698aec1ff47a710ea2ff7 Mon Sep 17 00:00:00 2001 From: Mike Beaumont Date: Tue, 31 Oct 2023 21:46:04 +0100 Subject: [PATCH 7/8] chore: get rid of k8s.io/utils usage Signed-off-by: Mike Beaumont --- .../runtime/k8s/controllers/pod_controller_test.go | 10 +++++----- .../runtime/k8s/controllers/pod_converter_test.go | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pkg/plugins/runtime/k8s/controllers/pod_controller_test.go b/pkg/plugins/runtime/k8s/controllers/pod_controller_test.go index de4fee4d0b47..4540213363ba 100644 --- a/pkg/plugins/runtime/k8s/controllers/pod_controller_test.go +++ b/pkg/plugins/runtime/k8s/controllers/pod_controller_test.go @@ -11,7 +11,6 @@ import ( kube_types "k8s.io/apimachinery/pkg/types" kube_intstr "k8s.io/apimachinery/pkg/util/intstr" kube_record "k8s.io/client-go/tools/record" - utilpointer "k8s.io/utils/pointer" kube_ctrl "sigs.k8s.io/controller-runtime" kube_client "sigs.k8s.io/controller-runtime/pkg/client" kube_client_fake "sigs.k8s.io/controller-runtime/pkg/client/fake" @@ -27,6 +26,7 @@ import ( "github.com/kumahq/kuma/pkg/plugins/resources/memory" . "github.com/kumahq/kuma/pkg/plugins/runtime/k8s/controllers" "github.com/kumahq/kuma/pkg/plugins/runtime/k8s/metadata" + "github.com/kumahq/kuma/pkg/util/pointer" ) var _ = Describe("PodReconciler", func() { @@ -235,7 +235,7 @@ var _ = Describe("PodReconciler", func() { Type: kube_intstr.Int, IntVal: 8080, }, - AppProtocol: utilpointer.String("http"), + AppProtocol: pointer.To("http"), }, { Protocol: "TCP", @@ -585,7 +585,7 @@ var _ = Describe("PodReconciler", func() { Namespace: "demo", Name: "dp-1", OwnerReferences: []kube_meta.OwnerReference{{ - Controller: utilpointer.Bool(true), + Controller: pointer.To(true), Kind: "Pod", Name: "dp-1", }}, @@ -602,7 +602,7 @@ var _ = Describe("PodReconciler", func() { Namespace: "demo", Name: "dp-2", OwnerReferences: []kube_meta.OwnerReference{{ - Controller: utilpointer.Bool(true), + Controller: pointer.To(true), Kind: "Pod", Name: "dp-2", }}, @@ -619,7 +619,7 @@ var _ = Describe("PodReconciler", func() { Namespace: "demo", Name: "dp-3", OwnerReferences: []kube_meta.OwnerReference{{ - Controller: utilpointer.Bool(true), + Controller: pointer.To(true), Kind: "Pod", Name: "dp-3", }}, diff --git a/pkg/plugins/runtime/k8s/controllers/pod_converter_test.go b/pkg/plugins/runtime/k8s/controllers/pod_converter_test.go index 896f3e2df482..7083e24ae2ba 100644 --- a/pkg/plugins/runtime/k8s/controllers/pod_converter_test.go +++ b/pkg/plugins/runtime/k8s/controllers/pod_converter_test.go @@ -14,7 +14,6 @@ import ( kube_core "k8s.io/api/core/v1" kube_meta "k8s.io/apimachinery/pkg/apis/meta/v1" kube_intstr "k8s.io/apimachinery/pkg/util/intstr" - utilpointer "k8s.io/utils/pointer" kube_client "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" @@ -23,6 +22,7 @@ import ( mesh_k8s "github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/api/v1alpha1" . "github.com/kumahq/kuma/pkg/plugins/runtime/k8s/controllers" . "github.com/kumahq/kuma/pkg/test/matchers" + "github.com/kumahq/kuma/pkg/util/pointer" util_proto "github.com/kumahq/kuma/pkg/util/proto" util_yaml "github.com/kumahq/kuma/pkg/util/yaml" ) @@ -622,7 +622,7 @@ var _ = Describe("InboundTagsForService(..)", func() { "app": "example", "version": "0.1", }, - appProtocol: utilpointer.String("http"), + appProtocol: pointer.To("http"), expected: map[string]string{ "app": "example", "version": "0.1", @@ -832,7 +832,7 @@ var _ = Describe("ProtocolTagFor(..)", func() { expected: "tcp", // we want Kuma's default behavior to be explicit to a user }), Entry("appProtocol has an empty value", testCase{ - appProtocol: utilpointer.String(""), + appProtocol: pointer.To(""), expected: "tcp", // we want Kuma's default behavior to be explicit to a user }), Entry("no appProtocol but with `.service.kuma.io/protocol` annotation", testCase{ @@ -843,19 +843,19 @@ var _ = Describe("ProtocolTagFor(..)", func() { expected: "http", // we want to support both ways of providing protocol }), Entry("appProtocol has an unknown value", testCase{ - appProtocol: utilpointer.String("not-yet-supported-protocol"), + appProtocol: pointer.To("not-yet-supported-protocol"), expected: "tcp", // we want Kuma's behavior to be straightforward to a user (appProtocol is not Kuma specific) }), Entry("appProtocol has a lowercase value", testCase{ - appProtocol: utilpointer.String("HtTp"), + appProtocol: pointer.To("HtTp"), expected: "http", // we want Kuma's behavior to be straightforward to a user (copy appProtocol lowercase value) }), Entry("appProtocol has a known value: http", testCase{ - appProtocol: utilpointer.String("http"), + appProtocol: pointer.To("http"), expected: "http", }), Entry("appProtocol has a known value: tcp", testCase{ - appProtocol: utilpointer.String("tcp"), + appProtocol: pointer.To("tcp"), expected: "tcp", }), Entry("no appProtocol and no `.service.kuma.io/protocol`", testCase{ From 487a8b3a90e5370e3b50004514a99bf7e7e960c8 Mon Sep 17 00:00:00 2001 From: Mike Beaumont Date: Thu, 2 Nov 2023 16:41:10 +0100 Subject: [PATCH 8/8] chore: update with conformance test Signed-off-by: Mike Beaumont --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3fcb20b12ec1..c3753e98a71d 100644 --- a/go.mod +++ b/go.mod @@ -84,7 +84,7 @@ require ( sigs.k8s.io/controller-runtime v0.16.3 sigs.k8s.io/controller-tools v0.13.0 // When updating this also update version in: test/framework/k8s.go - sigs.k8s.io/gateway-api v1.0.0 + sigs.k8s.io/gateway-api v1.0.1-0.20231102153103-51c32c3e070a sigs.k8s.io/yaml v1.4.0 ) diff --git a/go.sum b/go.sum index 0b0ad759cd98..39706405041c 100644 --- a/go.sum +++ b/go.sum @@ -696,8 +696,8 @@ sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigw sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= sigs.k8s.io/controller-tools v0.13.0 h1:NfrvuZ4bxyolhDBt/rCZhDnx3M2hzlhgo5n3Iv2RykI= sigs.k8s.io/controller-tools v0.13.0/go.mod h1:5vw3En2NazbejQGCeWKRrE7q4P+CW8/klfVqP8QZkgA= -sigs.k8s.io/gateway-api v1.0.0 h1:iPTStSv41+d9p0xFydll6d7f7MOBGuqXM6p2/zVYMAs= -sigs.k8s.io/gateway-api v1.0.0/go.mod h1:4cUgr0Lnp5FZ0Cdq8FdRwCvpiWws7LVhLHGIudLlf4c= +sigs.k8s.io/gateway-api v1.0.1-0.20231102153103-51c32c3e070a h1:VAFaAFeQ6VBlmAn7NArWOiZi7Zl0H8RyokEszFh8wO0= +sigs.k8s.io/gateway-api v1.0.1-0.20231102153103-51c32c3e070a/go.mod h1:4cUgr0Lnp5FZ0Cdq8FdRwCvpiWws7LVhLHGIudLlf4c= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk=