From 59d4c1475b29f400618144d0fda313ab8370d2eb Mon Sep 17 00:00:00 2001 From: Pratyush Singhal Date: Tue, 20 Jun 2023 13:08:29 +0530 Subject: [PATCH 1/3] feat: add readiness probes in envoy proxy deployments This commit adds readiness probes in envoy proxy deployments to prevent pods in not ready state to receive traffic. This allows envoy proxy configurations and in-place upgrades without traffic drops using the configured rollout strategy. Signed-off-by: Pratyush Singhal --- .../infrastructure/kubernetes/proxy/resource.go | 13 +++++++++++++ internal/xds/bootstrap/bootstrap.go | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/internal/infrastructure/kubernetes/proxy/resource.go b/internal/infrastructure/kubernetes/proxy/resource.go index 686f891981b..8d320baefcd 100644 --- a/internal/infrastructure/kubernetes/proxy/resource.go +++ b/internal/infrastructure/kubernetes/proxy/resource.go @@ -11,6 +11,7 @@ import ( "strings" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/utils/pointer" egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" @@ -39,6 +40,10 @@ const ( envoyNsEnvVar = "ENVOY_GATEWAY_NAMESPACE" // envoyPodEnvVar is the name of the Envoy pod name environment variable. envoyPodEnvVar = "ENVOY_POD_NAME" + // envoyReadinessPath is the path of the envoy admin server to check readiness + envoyReadinessPath = "/ready" + // envoyReadinessPort is the port of the envoy admin server to check readiness + envoyReadinessPort = 19000 ) var ( @@ -154,6 +159,14 @@ func expectedProxyContainers(infra *ir.ProxyInfra, deploymentConfig *egcfgv1a1.K VolumeMounts: expectedContainerVolumeMounts(deploymentConfig), TerminationMessagePolicy: corev1.TerminationMessageReadFile, TerminationMessagePath: "/dev/termination-log", + ReadinessProbe: &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: envoyReadinessPath, + Port: intstr.IntOrString{Type: intstr.Int, IntVal: envoyReadinessPort}, + }, + }, + }, }, } diff --git a/internal/xds/bootstrap/bootstrap.go b/internal/xds/bootstrap/bootstrap.go index 4823d3fec2b..4ce36f288b4 100644 --- a/internal/xds/bootstrap/bootstrap.go +++ b/internal/xds/bootstrap/bootstrap.go @@ -20,7 +20,7 @@ const ( // It defaults to the Envoy Gateway Kubernetes service. envoyGatewayXdsServerHost = "envoy-gateway" // envoyAdminAddress is the listening address of the envoy admin interface. - envoyAdminAddress = "127.0.0.1" + envoyAdminAddress = "0.0.0.0" // envoyAdminPort is the port used to expose admin interface. envoyAdminPort = 19000 // envoyAdminAccessLogPath is the path used to expose admin access log. From f4549d73cdbb160cb7b7408e140c08fe954567df Mon Sep 17 00:00:00 2001 From: Pratyush Singhal Date: Wed, 21 Jun 2023 14:20:02 +0530 Subject: [PATCH 2/3] refactor: add a separate healthcheck listener for readinessProbe in bootstrap config Signed-off-by: Pratyush Singhal --- .../kubernetes/proxy/resource.go | 8 ++---- internal/xds/bootstrap/bootstrap.go | 22 ++++++++++++++- internal/xds/bootstrap/bootstrap.yaml.tpl | 27 +++++++++++++++++++ 3 files changed, 50 insertions(+), 7 deletions(-) diff --git a/internal/infrastructure/kubernetes/proxy/resource.go b/internal/infrastructure/kubernetes/proxy/resource.go index 8d320baefcd..7e6574eb75a 100644 --- a/internal/infrastructure/kubernetes/proxy/resource.go +++ b/internal/infrastructure/kubernetes/proxy/resource.go @@ -40,10 +40,6 @@ const ( envoyNsEnvVar = "ENVOY_GATEWAY_NAMESPACE" // envoyPodEnvVar is the name of the Envoy pod name environment variable. envoyPodEnvVar = "ENVOY_POD_NAME" - // envoyReadinessPath is the path of the envoy admin server to check readiness - envoyReadinessPath = "/ready" - // envoyReadinessPort is the port of the envoy admin server to check readiness - envoyReadinessPort = 19000 ) var ( @@ -162,8 +158,8 @@ func expectedProxyContainers(infra *ir.ProxyInfra, deploymentConfig *egcfgv1a1.K ReadinessProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ HTTPGet: &corev1.HTTPGetAction{ - Path: envoyReadinessPath, - Port: intstr.IntOrString{Type: intstr.Int, IntVal: envoyReadinessPort}, + Path: bootstrap.EnvoyReadinessPath, + Port: intstr.IntOrString{Type: intstr.Int, IntVal: bootstrap.EnvoyReadinessPort}, }, }, }, diff --git a/internal/xds/bootstrap/bootstrap.go b/internal/xds/bootstrap/bootstrap.go index 4ce36f288b4..6a7da391c35 100644 --- a/internal/xds/bootstrap/bootstrap.go +++ b/internal/xds/bootstrap/bootstrap.go @@ -20,7 +20,7 @@ const ( // It defaults to the Envoy Gateway Kubernetes service. envoyGatewayXdsServerHost = "envoy-gateway" // envoyAdminAddress is the listening address of the envoy admin interface. - envoyAdminAddress = "0.0.0.0" + envoyAdminAddress = "127.0.0.1" // envoyAdminPort is the port used to expose admin interface. envoyAdminPort = 19000 // envoyAdminAccessLogPath is the path used to expose admin access log. @@ -28,6 +28,10 @@ const ( // DefaultXdsServerPort is the default listening port of the xds-server. DefaultXdsServerPort = 18000 + + envoyReadinessAddress = "0.0.0.0" + EnvoyReadinessPort = 19001 + EnvoyReadinessPath = "/ready" ) //go:embed bootstrap.yaml.tpl @@ -49,6 +53,8 @@ type bootstrapParameters struct { XdsServer xdsServerParameters // AdminServer defines the configuration of the Envoy admin interface. AdminServer adminServerParameters + // ReadyServer defines the configuration for health check ready listener + ReadyServer readyServerParameters } type xdsServerParameters struct { @@ -67,6 +73,15 @@ type adminServerParameters struct { AccessLogPath string } +type readyServerParameters struct { + // Address is the address of the Envoy readiness probe + Address string + // Port is the port of envoy readiness probe + Port int32 + // ReadinessPath is the path for the envoy readiness probe + ReadinessPath string +} + // render the stringified bootstrap config in yaml format. func (b *bootstrapConfig) render() error { buf := new(strings.Builder) @@ -92,6 +107,11 @@ func GetRenderedBootstrapConfig() (string, error) { Port: envoyAdminPort, AccessLogPath: envoyAdminAccessLogPath, }, + ReadyServer: readyServerParameters{ + Address: envoyReadinessAddress, + Port: EnvoyReadinessPort, + ReadinessPath: EnvoyReadinessPath, + }, }, } diff --git a/internal/xds/bootstrap/bootstrap.yaml.tpl b/internal/xds/bootstrap/bootstrap.yaml.tpl index 4366e3f9fcc..d89f156eb6a 100644 --- a/internal/xds/bootstrap/bootstrap.yaml.tpl +++ b/internal/xds/bootstrap/bootstrap.yaml.tpl @@ -23,6 +23,33 @@ dynamic_resources: ads: {} resource_api_version: V3 static_resources: + listeners: + - name: envoy-gateway-proxy-ready-{{ .ReadyServer.Address }}-{{ .ReadyServer.Port }} + address: + socket_address: + address: {{ .ReadyServer.Address }} + port_value: {{ .ReadyServer.Port }} + protocol: TCP + filter_chains: + - filters: + - name: envoy.filters.network.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + stat_prefix: eg-ready-http + route_config: + name: local_route + http_filters: + - name: envoy.filters.http.health_check + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck + pass_through_mode: false + headers: + - name: ":path" + string_match: + exact: {{ .ReadyServer.ReadinessPath }} + - name: envoy.filters.http.router + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router clusters: - connect_timeout: 10s load_assignment: From f98bc8d0be60ca7c742802fdf31856206f7bc3dd Mon Sep 17 00:00:00 2001 From: Pratyush Singhal Date: Wed, 21 Jun 2023 16:09:50 +0530 Subject: [PATCH 3/3] test: fix translate and infra/proxy tests Signed-off-by: Pratyush Singhal --- .../translate/out/default-resources.all.yaml | 53 +++++++++++++++++++ .../out/from-gateway-api-to-xds.all.json | 50 +++++++++++++++++ .../out/from-gateway-api-to-xds.all.yaml | 26 +++++++++ .../from-gateway-api-to-xds.bootstrap.yaml | 26 +++++++++ .../proxy/testdata/deployments/bootstrap.yaml | 4 ++ .../testdata/deployments/component-level.yaml | 4 ++ .../proxy/testdata/deployments/custom.yaml | 31 +++++++++++ .../testdata/deployments/default-env.yaml | 31 +++++++++++ .../proxy/testdata/deployments/default.yaml | 31 +++++++++++ .../testdata/deployments/extension-env.yaml | 31 +++++++++++ .../proxy/testdata/deployments/volumes.yaml | 31 +++++++++++ 11 files changed, 318 insertions(+) diff --git a/internal/cmd/egctl/testdata/translate/out/default-resources.all.yaml b/internal/cmd/egctl/testdata/translate/out/default-resources.all.yaml index 9311770b86d..9bfe9c2ccdf 100644 --- a/internal/cmd/egctl/testdata/translate/out/default-resources.all.yaml +++ b/internal/cmd/egctl/testdata/translate/out/default-resources.all.yaml @@ -30,6 +30,33 @@ envoyProxy: ads: {} resource_api_version: V3 static_resources: + listeners: + - name: envoy-gateway-proxy-ready-0.0.0.0-19001 + address: + socket_address: + address: 0.0.0.0 + port_value: 19001 + protocol: TCP + filter_chains: + - filters: + - name: envoy.filters.network.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + stat_prefix: eg-ready-http + route_config: + name: local_route + http_filters: + - name: envoy.filters.http.health_check + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck + pass_through_mode: false + headers: + - name: ":path" + string_match: + exact: /ready + - name: envoy.filters.http.router + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router clusters: - connect_timeout: 10s load_assignment: @@ -426,6 +453,32 @@ xds: ads: {} resourceApiVersion: V3 staticResources: + listeners: + - name: envoy-gateway-proxy-ready-0.0.0.0-19001 + address: + socketAddress: + address: 0.0.0.0 + portValue: 19001 + filterChains: + - filters: + - name: envoy.filters.network.http_connection_manager + typedConfig: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + statPrefix: eg-ready-http + routeConfig: + name: local_route + httpFilters: + - name: envoy.filters.http.health_check + typedConfig: + "@type": type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck + passThroughMode: false + headers: + - name: ":path" + stringMatch: + exact: /ready + - name: envoy.filters.http.router + typedConfig: + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router clusters: - connectTimeout: 10s loadAssignment: diff --git a/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.json b/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.json index 5ca7d75850f..726ecdd8a6e 100644 --- a/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.json +++ b/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.json @@ -59,6 +59,56 @@ ] }, "staticResources": { + "listeners": [ + { + "name": "envoy-gateway-proxy-ready-0.0.0.0-19001", + "address": { + "socketAddress": { + "address": "0.0.0.0", + "portValue": 19001, + } + }, + "filterChains": [ + { + "filters": [ + { + "name": "envoy.filters.network.http_connection_manager", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", + "statPrefix": "eg-ready-http", + "routeConfig": { + "name": "local_route" + }, + "httpFilters": [ + { + "name": "envoy.filters.http.health_check", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck", + "passThroughMode": false, + "headers": [ + { + "name": ":path", + "stringMatch": { + "exact": "/ready" + } + } + ] + } + }, + { + "name": "envoy.filters.http.router", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router" + } + } + ] + } + } + ] + } + ] + } + ], "clusters": [ { "connectTimeout": "10s", diff --git a/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.yaml b/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.yaml index 398c0242dc0..efa43263d87 100644 --- a/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.yaml +++ b/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.yaml @@ -36,6 +36,32 @@ xds: ads: {} resourceApiVersion: V3 staticResources: + listeners: + - name: envoy-gateway-proxy-ready-0.0.0.0-19001 + address: + socketAddress: + address: 0.0.0.0 + portValue: 19001 + filterChains: + - filters: + - name: envoy.filters.network.http_connection_manager + typedConfig: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + statPrefix: eg-ready-http + routeConfig: + name: local_route + httpFilters: + - name: envoy.filters.http.health_check + typedConfig: + "@type": type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck + passThroughMode: false + headers: + - name: ":path" + stringMatch: + exact: /ready + - name: envoy.filters.http.router + typedConfig: + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router clusters: - connectTimeout: 10s loadAssignment: diff --git a/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.bootstrap.yaml b/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.bootstrap.yaml index 07aac9314c3..c96fca5787e 100644 --- a/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.bootstrap.yaml +++ b/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.bootstrap.yaml @@ -35,6 +35,32 @@ xds: ads: {} resourceApiVersion: V3 staticResources: + listeners: + - name: envoy-gateway-proxy-ready-0.0.0.0-19001 + address: + socketAddress: + address: 0.0.0.0 + portValue: 19001 + filterChains: + - filters: + - name: envoy.filters.network.http_connection_manager + typedConfig: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + statPrefix: eg-ready-http + routeConfig: + name: local_route + httpFilters: + - name: envoy.filters.http.health_check + typedConfig: + "@type": type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck + passThroughMode: false + headers: + - name: ":path" + stringMatch: + exact: /ready + - name: envoy.filters.http.router + typedConfig: + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router clusters: - connectTimeout: 10s loadAssignment: diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/bootstrap.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/bootstrap.yaml index c7c66041ea0..73e86a058ab 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/bootstrap.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/bootstrap.yaml @@ -63,6 +63,10 @@ spec: requests: cpu: 100m memory: 512Mi + readinessProbe: + httpGet: + path: /ready + port: 19001 terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/component-level.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/component-level.yaml index c08f96fd560..b5a5d5cd482 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/component-level.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/component-level.yaml @@ -64,6 +64,10 @@ spec: requests: cpu: 100m memory: 512Mi + readinessProbe: + httpGet: + path: /ready + port: 19001 terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom.yaml index be59fee9f35..f9fa2b7fb7d 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom.yaml @@ -62,6 +62,33 @@ spec: ads: {} resource_api_version: V3 static_resources: + listeners: + - name: envoy-gateway-proxy-ready-0.0.0.0-19001 + address: + socket_address: + address: 0.0.0.0 + port_value: 19001 + protocol: TCP + filter_chains: + - filters: + - name: envoy.filters.network.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + stat_prefix: eg-ready-http + route_config: + name: local_route + http_filters: + - name: envoy.filters.http.health_check + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck + pass_through_mode: false + headers: + - name: ":path" + string_match: + exact: /ready + - name: envoy.filters.http.router + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router clusters: - connect_timeout: 10s load_assignment: @@ -138,6 +165,10 @@ spec: requests: cpu: 200m memory: 1Gi + readinessProbe: + httpGet: + path: /ready + port: 19001 terminationMessagePath: /dev/termination-log terminationMessagePolicy: File securityContext: diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/default-env.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/default-env.yaml index be59fee9f35..f9fa2b7fb7d 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/default-env.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/default-env.yaml @@ -62,6 +62,33 @@ spec: ads: {} resource_api_version: V3 static_resources: + listeners: + - name: envoy-gateway-proxy-ready-0.0.0.0-19001 + address: + socket_address: + address: 0.0.0.0 + port_value: 19001 + protocol: TCP + filter_chains: + - filters: + - name: envoy.filters.network.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + stat_prefix: eg-ready-http + route_config: + name: local_route + http_filters: + - name: envoy.filters.http.health_check + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck + pass_through_mode: false + headers: + - name: ":path" + string_match: + exact: /ready + - name: envoy.filters.http.router + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router clusters: - connect_timeout: 10s load_assignment: @@ -138,6 +165,10 @@ spec: requests: cpu: 200m memory: 1Gi + readinessProbe: + httpGet: + path: /ready + port: 19001 terminationMessagePath: /dev/termination-log terminationMessagePolicy: File securityContext: diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/default.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/default.yaml index ac943e9d3a8..f9ece0c355e 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/default.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/default.yaml @@ -60,6 +60,33 @@ spec: ads: {} resource_api_version: V3 static_resources: + listeners: + - name: envoy-gateway-proxy-ready-0.0.0.0-19001 + address: + socket_address: + address: 0.0.0.0 + port_value: 19001 + protocol: TCP + filter_chains: + - filters: + - name: envoy.filters.network.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + stat_prefix: eg-ready-http + route_config: + name: local_route + http_filters: + - name: envoy.filters.http.health_check + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck + pass_through_mode: false + headers: + - name: ":path" + string_match: + exact: /ready + - name: envoy.filters.http.router + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router clusters: - connect_timeout: 10s load_assignment: @@ -133,6 +160,10 @@ spec: requests: cpu: 100m memory: 512Mi + readinessProbe: + httpGet: + path: /ready + port: 19001 terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/extension-env.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/extension-env.yaml index e5f6c3a5165..c74059582b9 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/extension-env.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/extension-env.yaml @@ -62,6 +62,33 @@ spec: ads: {} resource_api_version: V3 static_resources: + listeners: + - name: envoy-gateway-proxy-ready-0.0.0.0-19001 + address: + socket_address: + address: 0.0.0.0 + port_value: 19001 + protocol: TCP + filter_chains: + - filters: + - name: envoy.filters.network.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + stat_prefix: eg-ready-http + route_config: + name: local_route + http_filters: + - name: envoy.filters.http.health_check + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck + pass_through_mode: false + headers: + - name: ":path" + string_match: + exact: /ready + - name: envoy.filters.http.router + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router clusters: - connect_timeout: 10s load_assignment: @@ -142,6 +169,10 @@ spec: requests: cpu: 200m memory: 1Gi + readinessProbe: + httpGet: + path: /ready + port: 19001 terminationMessagePath: /dev/termination-log terminationMessagePolicy: File securityContext: diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/volumes.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/volumes.yaml index a8d7a68922d..56ec3c19b0f 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/volumes.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/volumes.yaml @@ -62,6 +62,33 @@ spec: ads: {} resource_api_version: V3 static_resources: + listeners: + - name: envoy-gateway-proxy-ready-0.0.0.0-19001 + address: + socket_address: + address: 0.0.0.0 + port_value: 19001 + protocol: TCP + filter_chains: + - filters: + - name: envoy.filters.network.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + stat_prefix: eg-ready-http + route_config: + name: local_route + http_filters: + - name: envoy.filters.http.health_check + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck + pass_through_mode: false + headers: + - name: ":path" + string_match: + exact: /ready + - name: envoy.filters.http.router + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router clusters: - connect_timeout: 10s load_assignment: @@ -142,6 +169,10 @@ spec: requests: cpu: 200m memory: 1Gi + readinessProbe: + httpGet: + path: /ready + port: 19001 terminationMessagePath: /dev/termination-log terminationMessagePolicy: File securityContext: