From ca2d181e957d7675f965bb2ee0943020bcf5963c Mon Sep 17 00:00:00 2001 From: James Peach Date: Mon, 4 Sep 2023 12:21:06 +1000 Subject: [PATCH] Fix lint warnings on deprecated wellknown names. Since we deprecated wellknown names in #763, fix the lint warnings that resulted by removing our internal use of the package. Signed-off-by: James Peach --- internal/example/resource.go | 5 ++--- pkg/test/resource/v3/resource.go | 13 ++++++------- pkg/wellknown/wellknown.go | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/internal/example/resource.go b/internal/example/resource.go index 35cf7bb1d2..20556e0d2b 100644 --- a/internal/example/resource.go +++ b/internal/example/resource.go @@ -30,7 +30,6 @@ import ( "github.com/envoyproxy/go-control-plane/pkg/cache/types" "github.com/envoyproxy/go-control-plane/pkg/cache/v3" "github.com/envoyproxy/go-control-plane/pkg/resource/v3" - "github.com/envoyproxy/go-control-plane/pkg/wellknown" ) const ( @@ -118,7 +117,7 @@ func makeHTTPListener(listenerName string, route string) *listener.Listener { }, }, HttpFilters: []*hcm.HttpFilter{{ - Name: wellknown.Router, + Name: "http-router", ConfigType: &hcm.HttpFilter_TypedConfig{TypedConfig: routerConfig}, }}, } @@ -142,7 +141,7 @@ func makeHTTPListener(listenerName string, route string) *listener.Listener { }, FilterChains: []*listener.FilterChain{{ Filters: []*listener.Filter{{ - Name: wellknown.HTTPConnectionManager, + Name: "http-connection-manager", ConfigType: &listener.Filter_TypedConfig{ TypedConfig: pbst, }, diff --git a/pkg/test/resource/v3/resource.go b/pkg/test/resource/v3/resource.go index d93a6d94c3..942f8c7beb 100644 --- a/pkg/test/resource/v3/resource.go +++ b/pkg/test/resource/v3/resource.go @@ -38,7 +38,6 @@ import ( "github.com/envoyproxy/go-control-plane/pkg/cache/types" "github.com/envoyproxy/go-control-plane/pkg/cache/v3" "github.com/envoyproxy/go-control-plane/pkg/resource/v3" - "github.com/envoyproxy/go-control-plane/pkg/wellknown" ) const ( @@ -268,11 +267,11 @@ func buildHTTPConnectionManager() *hcm.HttpConnectionManager { CodecType: hcm.HttpConnectionManager_AUTO, StatPrefix: "http", HttpFilters: []*hcm.HttpFilter{{ - Name: wellknown.Router, + Name: "http-router", ConfigType: &hcm.HttpFilter_TypedConfig{TypedConfig: routerConfig}, }}, AccessLog: []*alf.AccessLog{{ - Name: wellknown.HTTPGRPCAccessLog, + Name: "access-logger", ConfigType: &alf.AccessLog_TypedConfig{ TypedConfig: alsConfigPbst, }, @@ -374,7 +373,7 @@ func MakeScopedRouteHTTPListener(mode string, listenerName string, port uint32) { Filters: []*listener.Filter{ { - Name: wellknown.HTTPConnectionManager, + Name: "http-connection-manager", ConfigType: &listener.Filter_TypedConfig{ TypedConfig: pbst, }, @@ -431,7 +430,7 @@ func MakeScopedRouteHTTPListenerForRoute(mode string, listenerName string, port { Filters: []*listener.Filter{ { - Name: wellknown.HTTPConnectionManager, + Name: "http-connection-manager", ConfigType: &listener.Filter_TypedConfig{ TypedConfig: pbst, }, @@ -461,7 +460,7 @@ func MakeTCPListener(listenerName string, port uint32, clusterName string) *list { Filters: []*listener.Filter{ { - Name: wellknown.TCPProxy, + Name: "tcp-proxy", ConfigType: &listener.Filter_TypedConfig{ TypedConfig: pbst, }, @@ -506,7 +505,7 @@ func MakeExtensionConfig(mode string, extensionConfigName string, route string) }, }, HttpFilters: []*hcm.HttpFilter{{ - Name: wellknown.Router, + Name: "http-router", ConfigType: &hcm.HttpFilter_TypedConfig{TypedConfig: routerConfig}, }}, } diff --git a/pkg/wellknown/wellknown.go b/pkg/wellknown/wellknown.go index 61aed7dea4..4d2f5b6e3d 100644 --- a/pkg/wellknown/wellknown.go +++ b/pkg/wellknown/wellknown.go @@ -14,7 +14,7 @@ // Package wellknown contains common names for filters, listeners, etc. // -// Deprecated: Envoy no longer requires specific names when configuring +// Deprecated. Envoy no longer requires specific names when configuring // filters or other properties, since it inspects the Protobuf type URL // to decide how to the decode a message. Because of this, no new names // are being added to this package.