@@ -22,6 +22,7 @@ import (
2222 "sigs.k8s.io/controller-runtime/pkg/predicate"
2323 "sigs.k8s.io/controller-runtime/pkg/reconcile"
2424 "sigs.k8s.io/controller-runtime/pkg/source"
25+ gatewayv1 "sigs.k8s.io/gateway-api/apis/v1"
2526 gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
2627
2728 "github.com/kong/kubernetes-ingress-controller/v2/internal/annotations"
@@ -36,7 +37,7 @@ import (
3637// Vars & Consts
3738// -----------------------------------------------------------------------------
3839
39- var gatewayV1beta1Group = gatewayapi .Group (gatewayv1beta1 .GroupName )
40+ var gatewayV1Group = gatewayapi .Group (gatewayv1 .GroupName )
4041
4142// -----------------------------------------------------------------------------
4243// Gateway Controller - GatewayReconciler
@@ -329,7 +330,7 @@ func referenceGrantHasGatewayFrom(obj client.Object) bool {
329330// Reconcile is part of the main kubernetes reconciliation loop which aims to
330331// move the current state of the cluster closer to the desired state.
331332func (r * GatewayReconciler ) Reconcile (ctx context.Context , req ctrl.Request ) (ctrl.Result , error ) {
332- log := r .Log .WithValues ("GatewayV1Beta1Gateway " , req .NamespacedName )
333+ log := r .Log .WithValues ("GatewayV1Gateway " , req .NamespacedName )
333334
334335 // gather the gateway object based on the reconciliation trigger. It's possible for the object
335336 // to be gone at this point in which case it will be ignored.
@@ -646,8 +647,8 @@ func (r *GatewayReconciler) determineL4ListenersFromService(
646647 addresses := make ([]gatewayapi.GatewayAddress , 0 , len (svc .Spec .ClusterIPs ))
647648 listeners := make ([]gatewayapi.Listener , 0 , len (svc .Spec .Ports ))
648649 protocolToRouteGroupKind := map [corev1.Protocol ]gatewayapi.RouteGroupKind {
649- corev1 .ProtocolTCP : {Group : & gatewayV1beta1Group , Kind : gatewayapi .Kind ("TCPRoute" )},
650- corev1 .ProtocolUDP : {Group : & gatewayV1beta1Group , Kind : gatewayapi .Kind ("UDPRoute" )},
650+ corev1 .ProtocolTCP : {Group : & gatewayV1Group , Kind : gatewayapi .Kind ("TCPRoute" )},
651+ corev1 .ProtocolUDP : {Group : & gatewayV1Group , Kind : gatewayapi .Kind ("UDPRoute" )},
651652 }
652653
653654 for _ , port := range svc .Spec .Ports {
@@ -742,7 +743,7 @@ func (r *GatewayReconciler) determineListenersFromDataPlane(
742743 listener .Protocol = gatewayapi .TLSProtocolType
743744 listener .AllowedRoutes = & gatewayapi.AllowedRoutes {
744745 Kinds : []gatewayapi.RouteGroupKind {
745- {Group : & gatewayV1beta1Group , Kind : (gatewayapi .Kind )("TLSRoute" )},
746+ {Group : & gatewayV1Group , Kind : (gatewayapi .Kind )("TLSRoute" )},
746747 },
747748 }
748749 }
@@ -752,14 +753,14 @@ func (r *GatewayReconciler) determineListenersFromDataPlane(
752753 listener .Protocol = gatewayapi .HTTPSProtocolType
753754 listener .AllowedRoutes = & gatewayapi.AllowedRoutes {
754755 Kinds : []gatewayapi.RouteGroupKind {
755- {Group : & gatewayV1beta1Group , Kind : (gatewayapi .Kind )("HTTPRoute" )},
756+ {Group : & gatewayV1Group , Kind : (gatewayapi .Kind )("HTTPRoute" )},
756757 },
757758 }
758759 } else {
759760 listener .Protocol = gatewayapi .HTTPProtocolType
760761 listener .AllowedRoutes = & gatewayapi.AllowedRoutes {
761762 Kinds : []gatewayapi.RouteGroupKind {
762- {Group : & gatewayV1beta1Group , Kind : (gatewayapi .Kind )("HTTPRoute" )},
763+ {Group : & gatewayV1Group , Kind : (gatewayapi .Kind )("HTTPRoute" )},
763764 },
764765 }
765766 }
0 commit comments