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

listen on ipv4 and ipv6 localhost addrs for admin server #4663

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ envoyProxyForGatewayClass:
path: /dev/null
address:
socket_address:
address: 127.0.0.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plan to use this as the default value even for IPv4 cluster?

address: ::1
port_value: 19000
ipv4_compat: true
Comment on lines +18 to +20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't work on 127.0.0.1

layered_runtime:
layers:
- name: global_config
Expand Down Expand Up @@ -87,7 +88,7 @@ envoyProxyForGatewayClass:
- endpoint:
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
- connect_timeout: 10s
load_assignment:
Expand Down Expand Up @@ -532,7 +533,8 @@ xds:
path: /dev/null
address:
socketAddress:
address: 127.0.0.1
address: ::1
ipv4Compat: true
portValue: 19000
dynamicResources:
adsConfig:
Expand Down Expand Up @@ -572,7 +574,7 @@ xds:
- endpoint:
address:
socketAddress:
address: 127.0.0.1
address: ::1
portValue: 19000
name: prometheus_stats
type: STATIC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
],
"address": {
"socketAddress": {
"address": "127.0.0.1",
"address": "::1",
"ipv4Compat": true,
"portValue": 19000
}
}
Expand Down Expand Up @@ -81,7 +82,7 @@
"endpoint": {
"address": {
"socketAddress": {
"address": "127.0.0.1",
"address": "::1",
"portValue": 19000
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ xds:
path: /dev/null
address:
socketAddress:
address: 127.0.0.1
address: ::1
ipv4Compat: true
portValue: 19000
dynamicResources:
adsConfig:
Expand Down Expand Up @@ -51,7 +52,7 @@ xds:
- endpoint:
address:
socketAddress:
address: 127.0.0.1
address: ::1
portValue: 19000
name: prometheus_stats
type: STATIC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ xds:
path: /dev/null
address:
socketAddress:
address: 127.0.0.1
address: ::1
ipv4Compat: true
portValue: 19000
dynamicResources:
adsConfig:
Expand Down Expand Up @@ -50,7 +51,7 @@ xds:
- endpoint:
address:
socketAddress:
address: 127.0.0.1
address: ::1
portValue: 19000
name: prometheus_stats
type: STATIC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
],
"address": {
"socketAddress": {
"address": "127.0.0.1",
"address": "::1",
"ipv4Compat": true,
"portValue": 19000
}
}
Expand Down Expand Up @@ -81,7 +82,7 @@
"endpoint": {
"address": {
"socketAddress": {
"address": "127.0.0.1",
"address": "::1",
"portValue": 19000
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ xds:
path: /dev/null
address:
socketAddress:
address: 127.0.0.1
address: ::1
ipv4Compat: true
portValue: 19000
dynamicResources:
adsConfig:
Expand Down Expand Up @@ -51,7 +52,7 @@ xds:
- endpoint:
address:
socketAddress:
address: 127.0.0.1
address: ::1
portValue: 19000
name: prometheus_stats
type: STATIC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ xds:
path: /dev/null
address:
socketAddress:
address: 127.0.0.1
address: ::1
ipv4Compat: true
portValue: 19000
dynamicResources:
adsConfig:
Expand Down Expand Up @@ -50,7 +51,7 @@ xds:
- endpoint:
address:
socketAddress:
address: 127.0.0.1
address: ::1
portValue: 19000
name: prometheus_stats
type: STATIC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ xds:
path: /dev/null
address:
socketAddress:
address: 127.0.0.1
address: ::1
ipv4Compat: true
portValue: 19000
dynamicResources:
adsConfig:
Expand Down Expand Up @@ -51,7 +52,7 @@ xds:
- endpoint:
address:
socketAddress:
address: 127.0.0.1
address: ::1
portValue: 19000
name: prometheus_stats
type: STATIC
Expand Down
4 changes: 2 additions & 2 deletions internal/cmd/envoy/shutdown_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
// postEnvoyAdminAPI sends a POST request to the Envoy admin API
func postEnvoyAdminAPI(path string) error {
if resp, err := http.Post(fmt.Sprintf("http://%s:%d/%s",
bootstrap.EnvoyAdminAddress, bootstrap.EnvoyAdminPort, path), "application/json", nil); err != nil {
"localhost", bootstrap.EnvoyAdminPort, path), "application/json", nil); err != nil {

Check warning on line 174 in internal/cmd/envoy/shutdown_manager.go

View check run for this annotation

Codecov / codecov/patch

internal/cmd/envoy/shutdown_manager.go#L174

Added line #L174 was not covered by tests
return err
} else {
defer resp.Body.Close()
Expand All @@ -187,7 +187,7 @@
func getTotalConnections() (*int, error) {
// Send request to Envoy admin API to retrieve server.total_connections stat
if resp, err := http.Get(fmt.Sprintf("http://%s:%d//stats?filter=^server\\.total_connections$&format=json",
bootstrap.EnvoyAdminAddress, bootstrap.EnvoyAdminPort)); err != nil {
"localhost", bootstrap.EnvoyAdminPort)); err != nil {

Check warning on line 190 in internal/cmd/envoy/shutdown_manager.go

View check run for this annotation

Codecov / codecov/patch

internal/cmd/envoy/shutdown_manager.go#L190

Added line #L190 was not covered by tests
return nil, err
} else {
defer resp.Body.Close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ spec:
path: /dev/null
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
ipv4_compat: true
layered_runtime:
layers:
- name: global_config
Expand Down Expand Up @@ -119,7 +120,7 @@ spec:
- endpoint:
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
- connect_timeout: 10s
load_assignment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ spec:
path: /dev/null
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
ipv4_compat: true
layered_runtime:
layers:
- name: global_config
Expand Down Expand Up @@ -118,7 +119,7 @@ spec:
- endpoint:
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
- connect_timeout: 10s
load_assignment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ spec:
path: /dev/null
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
ipv4_compat: true
layered_runtime:
layers:
- name: global_config
Expand Down Expand Up @@ -118,7 +119,7 @@ spec:
- endpoint:
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
- connect_timeout: 10s
load_assignment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ spec:
path: /dev/null
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
ipv4_compat: true
layered_runtime:
layers:
- name: global_config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ spec:
path: /dev/null
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
ipv4_compat: true
layered_runtime:
layers:
- name: global_config
Expand Down Expand Up @@ -118,7 +119,7 @@ spec:
- endpoint:
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
- connect_timeout: 10s
load_assignment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ spec:
path: /dev/null
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
ipv4_compat: true
layered_runtime:
layers:
- name: global_config
Expand Down Expand Up @@ -127,7 +128,7 @@ spec:
- endpoint:
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
- connect_timeout: 10s
load_assignment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ spec:
path: /dev/null
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
ipv4_compat: true
layered_runtime:
layers:
- name: global_config
Expand Down Expand Up @@ -118,7 +119,7 @@ spec:
- endpoint:
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
- connect_timeout: 10s
load_assignment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ spec:
path: /dev/null
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
ipv4_compat: true
layered_runtime:
layers:
- name: global_config
Expand Down Expand Up @@ -118,7 +119,7 @@ spec:
- endpoint:
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
- connect_timeout: 10s
load_assignment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ spec:
path: /dev/null
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
ipv4_compat: true
layered_runtime:
layers:
- name: global_config
Expand Down Expand Up @@ -118,7 +119,7 @@ spec:
- endpoint:
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
- connect_timeout: 10s
load_assignment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ spec:
path: /dev/null
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
ipv4_compat: true
layered_runtime:
layers:
- name: global_config
Expand Down Expand Up @@ -123,7 +124,7 @@ spec:
- endpoint:
address:
socket_address:
address: 127.0.0.1
address: ::1
port_value: 19000
- connect_timeout: 10s
load_assignment:
Expand Down
Loading
Loading