From 0ca48ab6379821b4d68bac3505a3b5102fca1af7 Mon Sep 17 00:00:00 2001 From: Clayton Gonsalves Date: Tue, 26 Sep 2023 13:05:21 +0200 Subject: [PATCH] address review comments --- apis/projectcontour/v1alpha1/contourconfig.go | 13 +++-- .../v1alpha1/zz_generated.deepcopy.go | 16 ++++++ .../5745-clayton-gonsalves-minor.md | 4 +- cmd/contour/serve.go | 8 +-- cmd/contour/servecontext.go | 4 +- examples/contour/01-crds.yaml | 28 ++++++---- examples/contour/02-role-contour.yaml | 8 +++ examples/gateway-provisioner/01-roles.yaml | 8 +++ examples/render/contour-deployment.yaml | 36 +++++++++---- .../render/contour-gateway-provisioner.yaml | 36 +++++++++---- examples/render/contour-gateway.yaml | 36 +++++++++---- examples/render/contour.yaml | 36 +++++++++---- internal/k8s/rbac.go | 3 ++ .../objects/rbac/clusterrole/cluster_role.go | 4 ++ .../xdscache/v3/endpointslicetranslator.go | 2 +- pkg/config/parameters.go | 13 +++-- .../docs/main/config/api-reference.html | 52 +++++++++++++++---- test/e2e/fixtures.go | 4 +- test/e2e/infra/infra_test.go | 4 +- 19 files changed, 237 insertions(+), 78 deletions(-) diff --git a/apis/projectcontour/v1alpha1/contourconfig.go b/apis/projectcontour/v1alpha1/contourconfig.go index aeba0b34074..51b8d0d7609 100644 --- a/apis/projectcontour/v1alpha1/contourconfig.go +++ b/apis/projectcontour/v1alpha1/contourconfig.go @@ -85,10 +85,8 @@ type ContourConfigurationSpec struct { // Tracing defines properties for exporting trace data to OpenTelemetry. Tracing *TracingConfig `json:"tracing,omitempty"` - // useEndpointSlice configures contour to fetch endpoint data - // from k8s endpoint slices. defaults to false and reading endpoint - // data from the k8s endpoints. - UseEndpointSlice bool `json:"useEndpointSlice,omitempty"` + // FeatureFlags defines toggle for new contour features. + FeatureFlags FeatureFlags `json:"featureFlags,omitempty"` } // XDSServerType is the type of xDS server implementation. @@ -864,3 +862,10 @@ type ContourConfigurationList struct { metav1.ListMeta `json:"metadata,omitempty"` Items []ContourConfiguration `json:"items"` } + +type FeatureFlags struct { + // useEndpointSlice configures contour to fetch endpoint data + // from k8s endpoint slices. defaults to false and reading endpoint + // data from the k8s endpoints. + UseEndpointSlice bool `json:"useEndpointSlice,omitempty"` +} diff --git a/apis/projectcontour/v1alpha1/zz_generated.deepcopy.go b/apis/projectcontour/v1alpha1/zz_generated.deepcopy.go index d889c429aa5..b9afd80ebeb 100644 --- a/apis/projectcontour/v1alpha1/zz_generated.deepcopy.go +++ b/apis/projectcontour/v1alpha1/zz_generated.deepcopy.go @@ -199,6 +199,7 @@ func (in *ContourConfigurationSpec) DeepCopyInto(out *ContourConfigurationSpec) *out = new(TracingConfig) (*in).DeepCopyInto(*out) } + out.FeatureFlags = in.FeatureFlags } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContourConfigurationSpec. @@ -827,6 +828,21 @@ func (in *ExtensionServiceTarget) DeepCopy() *ExtensionServiceTarget { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeatureFlags) DeepCopyInto(out *FeatureFlags) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureFlags. +func (in *FeatureFlags) DeepCopy() *FeatureFlags { + if in == nil { + return nil + } + out := new(FeatureFlags) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GatewayConfig) DeepCopyInto(out *GatewayConfig) { *out = *in diff --git a/changelogs/unreleased/5745-clayton-gonsalves-minor.md b/changelogs/unreleased/5745-clayton-gonsalves-minor.md index 6652fe74d59..d0760fe0174 100644 --- a/changelogs/unreleased/5745-clayton-gonsalves-minor.md +++ b/changelogs/unreleased/5745-clayton-gonsalves-minor.md @@ -1,4 +1,4 @@ Add Kubernetes Endpoint Slice support. -This change optionally enables Contour to consume the kuberentes endpointslice API to determine the endpoints to configure Envoy with. -Note: This change is off by default and is gated by the config flag `useEndpointSlice`. +This change optionally enables Contour to consume the kubernetes endpointslice API to determine the endpoints to configure Envoy with. +Note: This change is off by default and is gated by the feature flag `useEndpointSlice`. diff --git a/cmd/contour/serve.go b/cmd/contour/serve.go index d339c99e2f3..b61c6a25134 100644 --- a/cmd/contour/serve.go +++ b/cmd/contour/serve.go @@ -457,7 +457,7 @@ func (s *Server) doServe() error { // Endpoints updates are handled directly by the EndpointsTranslator/EndpointSliceTranslator due to the high update volume. var endpointHandler EndpointsTranslator - if contourConfiguration.UseEndpointSlice { + if contourConfiguration.FeatureFlags.UseEndpointSlice { endpointHandler = xdscache_v3.NewEndpointSliceTranslator(s.log.WithField("context", "endpointstranslator")) } else { endpointHandler = xdscache_v3.NewEndpointsTranslator(s.log.WithField("context", "endpointstranslator")) @@ -600,19 +600,19 @@ func (s *Server) doServe() error { } // Inform on endpoints/endpointSlices. - if contourConfiguration.UseEndpointSlice { + if contourConfiguration.FeatureFlags.UseEndpointSlice { if err := informOnResource(&discoveryv1.EndpointSlice{}, &contour.EventRecorder{ Next: endpointHandler, Counter: contourMetrics.EventHandlerOperations, }, s.mgr.GetCache()); err != nil { - s.log.WithError(err).WithField("resource", "endpoints").Fatal("failed to create informer") + s.log.WithError(err).WithField("resource", "endpointslices").Fatal("failed to create informer") } } else { if err := informOnResource(&corev1.Endpoints{}, &contour.EventRecorder{ Next: endpointHandler, Counter: contourMetrics.EventHandlerOperations, }, s.mgr.GetCache()); err != nil { - s.log.WithError(err).WithField("resource", "endpoints").Fatal("failed to create informer") + s.log.WithError(err).WithField("resource", "endpointslices").Fatal("failed to create informer") } } diff --git a/cmd/contour/servecontext.go b/cmd/contour/servecontext.go index 84d51d86256..ef2bf86f777 100644 --- a/cmd/contour/servecontext.go +++ b/cmd/contour/servecontext.go @@ -588,7 +588,9 @@ func (ctx *serveContext) convertToContourConfigurationSpec() contour_api_v1alpha Policy: policy, Metrics: &contourMetrics, Tracing: tracingConfig, - UseEndpointSlice: ctx.Config.UseEndpointSlice, + FeatureFlags: contour_api_v1alpha1.FeatureFlags{ + UseEndpointSlice: ctx.Config.FeatureFlags.UseEndpointSlice, + }, } xdsServerType := contour_api_v1alpha1.ContourServerType diff --git a/examples/contour/01-crds.yaml b/examples/contour/01-crds.yaml index 3c22a8892b2..d9ecbab3b25 100644 --- a/examples/contour/01-crds.yaml +++ b/examples/contour/01-crds.yaml @@ -448,6 +448,15 @@ spec: type: string type: object type: object + featureFlags: + description: FeatureFlags defines toggle for new contour features. + properties: + useEndpointSlice: + description: useEndpointSlice configures contour to fetch endpoint + data from k8s endpoint slices. defaults to false and reading + endpoint data from the k8s endpoints. + type: boolean + type: object gateway: description: Gateway contains parameters for the gateway-api Gateway that Contour is configured to serve traffic. @@ -947,11 +956,6 @@ spec: required: - extensionService type: object - useEndpointSlice: - description: useEndpointSlice configures contour to fetch endpoint - data from k8s endpoint slices. defaults to false and reading endpoint - data from the k8s endpoints. - type: boolean xdsServer: description: XDSServer contains parameters for the xDS server. properties: @@ -3894,6 +3898,15 @@ spec: type: string type: object type: object + featureFlags: + description: FeatureFlags defines toggle for new contour features. + properties: + useEndpointSlice: + description: useEndpointSlice configures contour to fetch + endpoint data from k8s endpoint slices. defaults to false + and reading endpoint data from the k8s endpoints. + type: boolean + type: object gateway: description: Gateway contains parameters for the gateway-api Gateway that Contour is configured to serve traffic. @@ -4405,11 +4418,6 @@ spec: required: - extensionService type: object - useEndpointSlice: - description: useEndpointSlice configures contour to fetch endpoint - data from k8s endpoint slices. defaults to false and reading - endpoint data from the k8s endpoints. - type: boolean xdsServer: description: XDSServer contains parameters for the xDS server. properties: diff --git a/examples/contour/02-role-contour.yaml b/examples/contour/02-role-contour.yaml index 589f3244763..35e9386e719 100644 --- a/examples/contour/02-role-contour.yaml +++ b/examples/contour/02-role-contour.yaml @@ -18,6 +18,14 @@ rules: - get - list - watch +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch - apiGroups: - gateway.networking.k8s.io resources: diff --git a/examples/gateway-provisioner/01-roles.yaml b/examples/gateway-provisioner/01-roles.yaml index 178405f701d..b43bba73e28 100644 --- a/examples/gateway-provisioner/01-roles.yaml +++ b/examples/gateway-provisioner/01-roles.yaml @@ -59,6 +59,14 @@ rules: - create - get - update +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch - apiGroups: - gateway.networking.k8s.io resources: diff --git a/examples/render/contour-deployment.yaml b/examples/render/contour-deployment.yaml index e0db97b030a..3d1c8184a92 100644 --- a/examples/render/contour-deployment.yaml +++ b/examples/render/contour-deployment.yaml @@ -667,6 +667,15 @@ spec: type: string type: object type: object + featureFlags: + description: FeatureFlags defines toggle for new contour features. + properties: + useEndpointSlice: + description: useEndpointSlice configures contour to fetch endpoint + data from k8s endpoint slices. defaults to false and reading + endpoint data from the k8s endpoints. + type: boolean + type: object gateway: description: Gateway contains parameters for the gateway-api Gateway that Contour is configured to serve traffic. @@ -1166,11 +1175,6 @@ spec: required: - extensionService type: object - useEndpointSlice: - description: useEndpointSlice configures contour to fetch endpoint - data from k8s endpoint slices. defaults to false and reading endpoint - data from the k8s endpoints. - type: boolean xdsServer: description: XDSServer contains parameters for the xDS server. properties: @@ -4113,6 +4117,15 @@ spec: type: string type: object type: object + featureFlags: + description: FeatureFlags defines toggle for new contour features. + properties: + useEndpointSlice: + description: useEndpointSlice configures contour to fetch + endpoint data from k8s endpoint slices. defaults to false + and reading endpoint data from the k8s endpoints. + type: boolean + type: object gateway: description: Gateway contains parameters for the gateway-api Gateway that Contour is configured to serve traffic. @@ -4624,11 +4637,6 @@ spec: required: - extensionService type: object - useEndpointSlice: - description: useEndpointSlice configures contour to fetch endpoint - data from k8s endpoint slices. defaults to false and reading - endpoint data from the k8s endpoints. - type: boolean xdsServer: description: XDSServer contains parameters for the xDS server. properties: @@ -8382,6 +8390,14 @@ rules: - get - list - watch +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch - apiGroups: - gateway.networking.k8s.io resources: diff --git a/examples/render/contour-gateway-provisioner.yaml b/examples/render/contour-gateway-provisioner.yaml index 11a52ea20f5..4e27a862537 100644 --- a/examples/render/contour-gateway-provisioner.yaml +++ b/examples/render/contour-gateway-provisioner.yaml @@ -462,6 +462,15 @@ spec: type: string type: object type: object + featureFlags: + description: FeatureFlags defines toggle for new contour features. + properties: + useEndpointSlice: + description: useEndpointSlice configures contour to fetch endpoint + data from k8s endpoint slices. defaults to false and reading + endpoint data from the k8s endpoints. + type: boolean + type: object gateway: description: Gateway contains parameters for the gateway-api Gateway that Contour is configured to serve traffic. @@ -961,11 +970,6 @@ spec: required: - extensionService type: object - useEndpointSlice: - description: useEndpointSlice configures contour to fetch endpoint - data from k8s endpoint slices. defaults to false and reading endpoint - data from the k8s endpoints. - type: boolean xdsServer: description: XDSServer contains parameters for the xDS server. properties: @@ -3908,6 +3912,15 @@ spec: type: string type: object type: object + featureFlags: + description: FeatureFlags defines toggle for new contour features. + properties: + useEndpointSlice: + description: useEndpointSlice configures contour to fetch + endpoint data from k8s endpoint slices. defaults to false + and reading endpoint data from the k8s endpoints. + type: boolean + type: object gateway: description: Gateway contains parameters for the gateway-api Gateway that Contour is configured to serve traffic. @@ -4419,11 +4432,6 @@ spec: required: - extensionService type: object - useEndpointSlice: - description: useEndpointSlice configures contour to fetch endpoint - data from k8s endpoint slices. defaults to false and reading - endpoint data from the k8s endpoints. - type: boolean xdsServer: description: XDSServer contains parameters for the xDS server. properties: @@ -19140,6 +19148,14 @@ rules: - create - get - update +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch - apiGroups: - gateway.networking.k8s.io resources: diff --git a/examples/render/contour-gateway.yaml b/examples/render/contour-gateway.yaml index 859d38ba4e1..b95b535a228 100644 --- a/examples/render/contour-gateway.yaml +++ b/examples/render/contour-gateway.yaml @@ -673,6 +673,15 @@ spec: type: string type: object type: object + featureFlags: + description: FeatureFlags defines toggle for new contour features. + properties: + useEndpointSlice: + description: useEndpointSlice configures contour to fetch endpoint + data from k8s endpoint slices. defaults to false and reading + endpoint data from the k8s endpoints. + type: boolean + type: object gateway: description: Gateway contains parameters for the gateway-api Gateway that Contour is configured to serve traffic. @@ -1172,11 +1181,6 @@ spec: required: - extensionService type: object - useEndpointSlice: - description: useEndpointSlice configures contour to fetch endpoint - data from k8s endpoint slices. defaults to false and reading endpoint - data from the k8s endpoints. - type: boolean xdsServer: description: XDSServer contains parameters for the xDS server. properties: @@ -4119,6 +4123,15 @@ spec: type: string type: object type: object + featureFlags: + description: FeatureFlags defines toggle for new contour features. + properties: + useEndpointSlice: + description: useEndpointSlice configures contour to fetch + endpoint data from k8s endpoint slices. defaults to false + and reading endpoint data from the k8s endpoints. + type: boolean + type: object gateway: description: Gateway contains parameters for the gateway-api Gateway that Contour is configured to serve traffic. @@ -4630,11 +4643,6 @@ spec: required: - extensionService type: object - useEndpointSlice: - description: useEndpointSlice configures contour to fetch endpoint - data from k8s endpoint slices. defaults to false and reading - endpoint data from the k8s endpoints. - type: boolean xdsServer: description: XDSServer contains parameters for the xDS server. properties: @@ -8388,6 +8396,14 @@ rules: - get - list - watch +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch - apiGroups: - gateway.networking.k8s.io resources: diff --git a/examples/render/contour.yaml b/examples/render/contour.yaml index 56a698bbe45..9d04f7af4d3 100644 --- a/examples/render/contour.yaml +++ b/examples/render/contour.yaml @@ -667,6 +667,15 @@ spec: type: string type: object type: object + featureFlags: + description: FeatureFlags defines toggle for new contour features. + properties: + useEndpointSlice: + description: useEndpointSlice configures contour to fetch endpoint + data from k8s endpoint slices. defaults to false and reading + endpoint data from the k8s endpoints. + type: boolean + type: object gateway: description: Gateway contains parameters for the gateway-api Gateway that Contour is configured to serve traffic. @@ -1166,11 +1175,6 @@ spec: required: - extensionService type: object - useEndpointSlice: - description: useEndpointSlice configures contour to fetch endpoint - data from k8s endpoint slices. defaults to false and reading endpoint - data from the k8s endpoints. - type: boolean xdsServer: description: XDSServer contains parameters for the xDS server. properties: @@ -4113,6 +4117,15 @@ spec: type: string type: object type: object + featureFlags: + description: FeatureFlags defines toggle for new contour features. + properties: + useEndpointSlice: + description: useEndpointSlice configures contour to fetch + endpoint data from k8s endpoint slices. defaults to false + and reading endpoint data from the k8s endpoints. + type: boolean + type: object gateway: description: Gateway contains parameters for the gateway-api Gateway that Contour is configured to serve traffic. @@ -4624,11 +4637,6 @@ spec: required: - extensionService type: object - useEndpointSlice: - description: useEndpointSlice configures contour to fetch endpoint - data from k8s endpoint slices. defaults to false and reading - endpoint data from the k8s endpoints. - type: boolean xdsServer: description: XDSServer contains parameters for the xDS server. properties: @@ -8382,6 +8390,14 @@ rules: - get - list - watch +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch - apiGroups: - gateway.networking.k8s.io resources: diff --git a/internal/k8s/rbac.go b/internal/k8s/rbac.go index f61ead80180..2eccadecc89 100644 --- a/internal/k8s/rbac.go +++ b/internal/k8s/rbac.go @@ -27,3 +27,6 @@ package k8s // Add RBAC policy to support leader election. // +kubebuilder:rbac:groups="",resources=events,verbs=create;get;update,namespace=projectcontour // +kubebuilder:rbac:groups="coordination.k8s.io",resources=leases,verbs=create;get;update,namespace=projectcontour + +// Add RBAC policy for endpoint slices +// +kubebuilder:rbac:groups="discovery.k8s.io",resources=endpointslices,verbs=list;get;watch diff --git a/internal/provisioner/objects/rbac/clusterrole/cluster_role.go b/internal/provisioner/objects/rbac/clusterrole/cluster_role.go index 3eeb3457048..4641a2af794 100644 --- a/internal/provisioner/objects/rbac/clusterrole/cluster_role.go +++ b/internal/provisioner/objects/rbac/clusterrole/cluster_role.go @@ -22,6 +22,7 @@ import ( "github.com/projectcontour/contour/internal/provisioner/model" "github.com/projectcontour/contour/internal/provisioner/objects" corev1 "k8s.io/api/core/v1" + discoveryv1 "k8s.io/api/discovery/v1" networkingv1 "k8s.io/api/networking/v1" rbacv1 "k8s.io/api/rbac/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -75,6 +76,9 @@ func desiredClusterRole(name string, contour *model.Contour) *rbacv1.ClusterRole // Core Contour-watched resources. policyRuleFor(corev1.GroupName, getListWatch, "secrets", "endpoints", "services", "namespaces"), + // Discovery Contour-watched resources. + policyRuleFor(discoveryv1.GroupName, getListWatch, "endpointslices"), + // Gateway API resources. // Note, ReferenceGrant does not currently have a .status field so it's omitted from the status rule. policyRuleFor(gatewayv1alpha2.GroupName, getListWatch, "gatewayclasses", "gateways", "httproutes", "tlsroutes", "grpcroutes", "tcproutes", "referencegrants"), diff --git a/internal/xdscache/v3/endpointslicetranslator.go b/internal/xdscache/v3/endpointslicetranslator.go index 3c272b7e429..98e4d7c2e28 100644 --- a/internal/xdscache/v3/endpointslicetranslator.go +++ b/internal/xdscache/v3/endpointslicetranslator.go @@ -34,7 +34,7 @@ import ( "k8s.io/client-go/tools/cache" ) -// RecalculateEndpointsSlice generates a slice of LoadBalancingEndpoint +// RecalculateEndpoints generates a slice of LoadBalancingEndpoint // resources by matching the given service port to the given discoveryv1.EndpointSlice. // endpointSliceMap may be nil, in which case, the result is also nil. func (c *EndpointSliceCache) RecalculateEndpoints(port, healthPort v1.ServicePort, endpointSliceMap map[string]*discoveryv1.EndpointSlice) []*LoadBalancingEndpoint { diff --git a/pkg/config/parameters.go b/pkg/config/parameters.go index e9754f6c0ec..15bba912124 100644 --- a/pkg/config/parameters.go +++ b/pkg/config/parameters.go @@ -652,10 +652,8 @@ type Parameters struct { // Tracing holds the relevant configuration for exporting trace data to OpenTelemetry. Tracing *Tracing `yaml:"tracing,omitempty"` - // useEndpointSlice configures contour to fetch endpoint data - // from k8s endpoint slices. defaults to false and reading endpoint - // data from the k8s endpoints. - UseEndpointSlice bool `yaml:"useEndpointSlice,omitempty"` + // FeatureFlags defines toggle for new contour features. + FeatureFlags FeatureFlags `yaml:"featureFlags,omitempty"` } // Tracing defines properties for exporting trace data to OpenTelemetry. @@ -823,6 +821,13 @@ type MetricsServerParameters struct { CABundle string `yaml:"ca-certificate-path,omitempty"` } +type FeatureFlags struct { + // useEndpointSlice configures contour to fetch endpoint data + // from k8s endpoint slices. defaults to false and reading endpoint + // data from the k8s endpoints. + UseEndpointSlice bool `yaml:"useEndpointSlice,omitempty"` +} + func (p *MetricsParameters) Validate() error { if err := p.Contour.Validate(); err != nil { return fmt.Errorf("metrics.contour: %v", err) diff --git a/site/content/docs/main/config/api-reference.html b/site/content/docs/main/config/api-reference.html index a066b8cf58a..66d79446edb 100644 --- a/site/content/docs/main/config/api-reference.html +++ b/site/content/docs/main/config/api-reference.html @@ -5127,16 +5127,16 @@

ContourConfiguration -useEndpointSlice +featureFlags
-bool + +FeatureFlags + -

useEndpointSlice configures contour to fetch endpoint data -from k8s endpoint slices. defaults to false and reading endpoint -data from the k8s endpoints.

+

FeatureFlags defines toggle for new contour features.

@@ -5883,16 +5883,16 @@

ContourConfiguratio -useEndpointSlice +featureFlags
-bool + +FeatureFlags + -

useEndpointSlice configures contour to fetch endpoint data -from k8s endpoint slices. defaults to false and reading endpoint -data from the k8s endpoints.

+

FeatureFlags defines toggle for new contour features.

@@ -7432,6 +7432,38 @@

ExtensionServiceTarge +

FeatureFlags +

+

+(Appears on: +ContourConfigurationSpec) +

+

+

+ + + + + + + + + + + + + +
FieldDescription
+useEndpointSlice +
+ +bool + +
+

useEndpointSlice configures contour to fetch endpoint data +from k8s endpoint slices. defaults to false and reading endpoint +data from the k8s endpoints.

+

GatewayConfig

diff --git a/test/e2e/fixtures.go b/test/e2e/fixtures.go index 4680710be7c..ee05cad913d 100644 --- a/test/e2e/fixtures.go +++ b/test/e2e/fixtures.go @@ -575,7 +575,9 @@ func DefaultContourConfiguration() *contour_api_v1alpha1.ContourConfiguration { Address: listenAllAddress(), Port: 8000, }, - UseEndpointSlice: UseEndpointSlicesFromEnv(), + FeatureFlags: contour_api_v1alpha1.FeatureFlags{ + UseEndpointSlice: UseEndpointSlicesFromEnv(), + }, Envoy: &contour_api_v1alpha1.EnvoyConfig{ DefaultHTTPVersions: []contour_api_v1alpha1.HTTPVersionType{ "HTTP/1.1", "HTTP/2", diff --git a/test/e2e/infra/infra_test.go b/test/e2e/infra/infra_test.go index c93fa55aa09..ac905cb7853 100644 --- a/test/e2e/infra/infra_test.go +++ b/test/e2e/infra/infra_test.go @@ -155,7 +155,9 @@ var _ = Describe("Infra", func() { return func(namespace string) { Context("with endpoint slice enabled", func() { BeforeEach(func() { - contourConfig.UseEndpointSlice = true + contourConfig.FeatureFlags = config.FeatureFlags{ + UseEndpointSlice: true, + } }) body(namespace)