From a08e9912d1bb22d65f148b92845e56044acb0075 Mon Sep 17 00:00:00 2001 From: Daneyon Hansen Date: Tue, 7 Jan 2020 17:27:08 -0800 Subject: [PATCH] Adds Routes field to RouteSelector of Gateway api type --- api/v1alpha1/gateway_types.go | 9 +++++++++ api/v1alpha1/zz_generated.deepcopy.go | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/api/v1alpha1/gateway_types.go b/api/v1alpha1/gateway_types.go index 61d5b29e3a..b0ae05dd27 100644 --- a/api/v1alpha1/gateway_types.go +++ b/api/v1alpha1/gateway_types.go @@ -183,6 +183,15 @@ type ListenerTLS struct { // RouteSelector provides a mechanism to associate routes with this Gateway. type RouteSelector struct { + // Routes specifies what routes to associate with this Gateway. If defined, + // NamespaceSelector and LabelSelector are ignored and only the specified + // routes are associated with this Gateway. + // + // If undefined, all routes or routes matching NamespaceSelector and/or + // LabelSelector are associated with this Gateway. + // + // +optional + Routes []core.TypedLocalObjectReference `json:"routes"` // NamespaceSelector specifies a set of namespace labels used for selecting // routes to associate with this Gateway. // diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 5e3dff15c6..59cd1fad3c 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -624,6 +624,13 @@ func (in *ListenerTLS) DeepCopy() *ListenerTLS { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RouteSelector) DeepCopyInto(out *RouteSelector) { *out = *in + if in.Routes != nil { + in, out := &in.Routes, &out.Routes + *out = make([]v1.TypedLocalObjectReference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.NamespaceSelector != nil { in, out := &in.NamespaceSelector, &out.NamespaceSelector *out = new(metav1.LabelSelector)