Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NET-6317 - update usage of deprecated fields: http2_protocol_options and access_log_path #19940

Merged
merged 4 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/19940.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
xds: remove usages of deprecated Envoy fields: `envoy.config.cluster.v3.Cluster.http2_protocol_options`, `envoy.config.bootstrap.v3.Admin.access_log_path`
```
9 changes: 8 additions & 1 deletion command/connect/envoy/bootstrap_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,14 @@ func appendTelemetryCollectorConfig(args *BootstrapTplArgs, telemetryCollectorBi
args.StaticClustersJSON += fmt.Sprintf(`{
"name": "consul_telemetry_collector_loopback",
"type": "STATIC",
"http2_protocol_options": {},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"explicit_http_config": {
"http2_protocol_options": {}
}
}
},
"loadAssignment": {
"clusterName": "consul_telemetry_collector_loopback",
"endpoints": [
Expand Down
9 changes: 8 additions & 1 deletion command/connect/envoy/bootstrap_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,14 @@ const (
expectedTelemetryCollectorCluster = `{
"name": "consul_telemetry_collector_loopback",
"type": "STATIC",
"http2_protocol_options": {},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"explicit_http_config": {
"http2_protocol_options": {}
}
}
},
"loadAssignment": {
"clusterName": "consul_telemetry_collector_loopback",
"endpoints": [
Expand Down
19 changes: 17 additions & 2 deletions command/connect/envoy/bootstrap_tpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,15 @@ type GRPC struct {
const bootstrapTemplate = `{
"admin": {
{{- if (not .AdminAccessLogConfig) }}
"access_log_path": "{{ .AdminAccessLogPath }}",
"access_log": [
{
"name": "envoy.access_loggers.file",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "{{ .AdminAccessLogPath }}"
}
}
],
{{- end}}
{{- if .AdminAccessLogConfig }}
"access_log": [
Expand Down Expand Up @@ -220,7 +228,14 @@ const bootstrapTemplate = `{
}
},
{{- end }}
"http2_protocol_options": {},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"explicit_http_config": {
"http2_protocol_options": {}
}
}
},
"loadAssignment": {
"clusterName": "{{ .LocalAgentClusterName }}",
"endpoints": [
Expand Down
10 changes: 9 additions & 1 deletion command/connect/envoy/envoy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,15 @@ func TestGenerateConfig(t *testing.T) {
"envoy_bootstrap_json_tpl": `
{
"admin": {
"access_log_path": "/dev/null",
"access_log": [
{
"name": "envoy.access_loggers.file",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/dev/null"
}
}
],
"address": {
"socket_address": {
"address": "{{ .AdminBindAddress }}",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"admin": {
"access_log_path": "/dev/null",
"access_log": [
{
"name": "envoy.access_loggers.file",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/dev/null"
}
}
],
"address": {
"socket_address": {
"address": "127.0.0.1",
Expand Down Expand Up @@ -46,7 +54,14 @@
}
}
},
"http2_protocol_options": {},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"explicit_http_config": {
"http2_protocol_options": {}
}
}
},
"loadAssignment": {
"clusterName": "local_agent",
"endpoints": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"admin": {
"access_log_path": "/dev/null",
"access_log": [
{
"name": "envoy.access_loggers.file",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/dev/null"
}
}
],
"address": {
"socket_address": {
"address": "127.0.0.1",
Expand Down Expand Up @@ -33,7 +41,14 @@
"ignore_health_on_host_removal": false,
"connect_timeout": "1s",
"type": "STATIC",
"http2_protocol_options": {},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"explicit_http_config": {
"http2_protocol_options": {}
}
}
},
"loadAssignment": {
"clusterName": "local_agent",
"endpoints": [
Expand Down
19 changes: 17 additions & 2 deletions command/connect/envoy/testdata/access-log-path.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"admin": {
"access_log_path": "/some/path/access.log",
"access_log": [
{
"name": "envoy.access_loggers.file",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/some/path/access.log"
}
}
],
"address": {
"socket_address": {
"address": "127.0.0.1",
Expand Down Expand Up @@ -33,7 +41,14 @@
"ignore_health_on_host_removal": false,
"connect_timeout": "1s",
"type": "STATIC",
"http2_protocol_options": {},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"explicit_http_config": {
"http2_protocol_options": {}
}
}
},
"loadAssignment": {
"clusterName": "local_agent",
"endpoints": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@
"ignore_health_on_host_removal": false,
"connect_timeout": "1s",
"type": "STATIC",
"http2_protocol_options": {},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"explicit_http_config": {
"http2_protocol_options": {}
}
}
},
"loadAssignment": {
"clusterName": "local_agent",
"endpoints": [
Expand Down
9 changes: 8 additions & 1 deletion command/connect/envoy/testdata/access-logs-enabled.golden
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,14 @@
"ignore_health_on_host_removal": false,
"connect_timeout": "1s",
"type": "STATIC",
"http2_protocol_options": {},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"explicit_http_config": {
"http2_protocol_options": {}
}
}
},
"loadAssignment": {
"clusterName": "local_agent",
"endpoints": [
Expand Down
19 changes: 17 additions & 2 deletions command/connect/envoy/testdata/acl-enabled-and-token.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"admin": {
"access_log_path": "/dev/null",
"access_log": [
{
"name": "envoy.access_loggers.file",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/dev/null"
}
}
],
"address": {
"socket_address": {
"address": "127.0.0.1",
Expand Down Expand Up @@ -33,7 +41,14 @@
"ignore_health_on_host_removal": false,
"connect_timeout": "1s",
"type": "STATIC",
"http2_protocol_options": {},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"explicit_http_config": {
"http2_protocol_options": {}
}
}
},
"loadAssignment": {
"clusterName": "local_agent",
"endpoints": [
Expand Down
19 changes: 17 additions & 2 deletions command/connect/envoy/testdata/acl-enabled-but-no-token.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"admin": {
"access_log_path": "/dev/null",
"access_log": [
{
"name": "envoy.access_loggers.file",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/dev/null"
}
}
],
"address": {
"socket_address": {
"address": "127.0.0.1",
Expand Down Expand Up @@ -33,7 +41,14 @@
"ignore_health_on_host_removal": false,
"connect_timeout": "1s",
"type": "STATIC",
"http2_protocol_options": {},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"explicit_http_config": {
"http2_protocol_options": {}
}
}
},
"loadAssignment": {
"clusterName": "local_agent",
"endpoints": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"admin": {
"access_log_path": "/dev/null",
"access_log": [
{
"name": "envoy.access_loggers.file",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/dev/null"
}
}
],
"address": {
"socket_address": {
"address": "127.0.0.1",
Expand Down Expand Up @@ -46,7 +54,14 @@
}
}
},
"http2_protocol_options": {},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"explicit_http_config": {
"http2_protocol_options": {}
}
}
},
"loadAssignment": {
"clusterName": "local_agent",
"endpoints": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"admin": {
"access_log_path": "/dev/null",
"access_log": [
{
"name": "envoy.access_loggers.file",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/dev/null"
}
}
],
"address": {
"socket_address": {
"address": "127.0.0.1",
Expand Down Expand Up @@ -33,7 +41,14 @@
"ignore_health_on_host_removal": false,
"connect_timeout": "1s",
"type": "STATIC",
"http2_protocol_options": {},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"explicit_http_config": {
"http2_protocol_options": {}
}
}
},
"loadAssignment": {
"clusterName": "local_agent",
"endpoints": [
Expand Down
10 changes: 9 additions & 1 deletion command/connect/envoy/testdata/custom-bootstrap.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"admin": {
"access_log_path": "/dev/null",
"access_log": [
{
"name": "envoy.access_loggers.file",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/dev/null"
}
}
],
"address": {
"socket_address": {
"address": "127.0.0.1",
Expand Down
19 changes: 17 additions & 2 deletions command/connect/envoy/testdata/defaults-nodemeta.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"admin": {
"access_log_path": "/dev/null",
"access_log": [
{
"name": "envoy.access_loggers.file",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/dev/null"
}
}
],
"address": {
"socket_address": {
"address": "127.0.0.1",
Expand Down Expand Up @@ -34,7 +42,14 @@
"ignore_health_on_host_removal": false,
"connect_timeout": "1s",
"type": "STATIC",
"http2_protocol_options": {},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"explicit_http_config": {
"http2_protocol_options": {}
}
}
},
"loadAssignment": {
"clusterName": "local_agent",
"endpoints": [
Expand Down
Loading