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

Enable proxy prometheus by default #2015

Merged
merged 11 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
2 changes: 2 additions & 0 deletions api/v1alpha1/metric_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,6 @@ type OpenTelemetrySink struct {
}

type PrometheusProvider struct {
// Disable the Prometheus endpoint.
Disable bool `json:"disable,omitempty"`
}
Original file line number Diff line number Diff line change
Expand Up @@ -5425,6 +5425,10 @@ spec:
prometheus:
description: Prometheus defines the configuration for Admin
endpoint `/stats/prometheus`.
properties:
disable:
description: Disable the Prometheus endpoint.
type: boolean
type: object
sinks:
description: Sinks defines the metric sinks where metrics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ metadata:
spec:
telemetry:
metrics:
prometheus: {}
prometheus:
disable: true
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,30 @@
},
"staticResources": {
"clusters": [
{
"connectTimeout": "0.250s",
"loadAssignment": {
"clusterName": "prometheus_stats",
"endpoints": [
{
"lbEndpoints": [
{
"endpoint": {
"address": {
"socketAddress": {
"address": "127.0.0.1",
"portValue": 19000
}
}
}
}
]
}
]
},
"name": "prometheus_stats",
"type": "STATIC"
},
{
"connectTimeout": "10s",
"http2ProtocolOptions": {
Expand Down Expand Up @@ -171,7 +195,25 @@
}
],
"routeConfig": {
"name": "local_route"
"name": "local_route",
"virtualHosts": [
{
"domains": [
"*"
],
"name": "prometheus_stats",
"routes": [
{
"match": {
"prefix": "/stats/prometheus"
},
"route": {
"cluster": "prometheus_stats"
}
}
]
}
]
},
"statPrefix": "eg-ready-http"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ xds:
resourceApiVersion: V3
staticResources:
clusters:
- connectTimeout: 0.250s
loadAssignment:
clusterName: prometheus_stats
endpoints:
- lbEndpoints:
- endpoint:
address:
socketAddress:
address: 127.0.0.1
portValue: 19000
name: prometheus_stats
type: STATIC
- connectTimeout: 10s
http2ProtocolOptions:
connectionKeepalive:
Expand Down Expand Up @@ -103,6 +115,15 @@ xds:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
routeConfig:
name: local_route
virtualHosts:
- domains:
- '*'
name: prometheus_stats
routes:
- match:
prefix: /stats/prometheus
route:
cluster: prometheus_stats
statPrefix: eg-ready-http
name: envoy-gateway-proxy-ready-0.0.0.0-19001
- '@type': type.googleapis.com/envoy.admin.v3.EndpointsConfigDump
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ xds:
resourceApiVersion: V3
staticResources:
clusters:
- connectTimeout: 0.250s
loadAssignment:
clusterName: prometheus_stats
endpoints:
- lbEndpoints:
- endpoint:
address:
socketAddress:
address: 127.0.0.1
portValue: 19000
name: prometheus_stats
type: STATIC
- connectTimeout: 10s
http2ProtocolOptions:
connectionKeepalive:
Expand Down Expand Up @@ -102,5 +114,14 @@ xds:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
routeConfig:
name: local_route
virtualHosts:
- domains:
- '*'
name: prometheus_stats
routes:
- match:
prefix: /stats/prometheus
route:
cluster: prometheus_stats
statPrefix: eg-ready-http
name: envoy-gateway-proxy-ready-0.0.0.0-19001
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ envoyProxy:
stat_prefix: eg-ready-http
route_config:
name: local_route
virtual_hosts:
- name: prometheus_stats
domains:
- "*"
routes:
- match:
prefix: /stats/prometheus
route:
cluster: prometheus_stats
http_filters:
- name: envoy.filters.http.health_check
typed_config:
Expand All @@ -60,6 +69,19 @@ envoyProxy:
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
clusters:
- name: prometheus_stats
connect_timeout: 0.250s
type: STATIC
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: prometheus_stats
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 19000
- connect_timeout: 10s
load_assignment:
cluster_name: xds_cluster
Expand Down Expand Up @@ -493,6 +515,18 @@ xds:
resourceApiVersion: V3
staticResources:
clusters:
- connectTimeout: 0.250s
loadAssignment:
clusterName: prometheus_stats
endpoints:
- lbEndpoints:
- endpoint:
address:
socketAddress:
address: 127.0.0.1
portValue: 19000
name: prometheus_stats
type: STATIC
- connectTimeout: 10s
http2ProtocolOptions:
connectionKeepalive:
Expand Down Expand Up @@ -559,6 +593,15 @@ xds:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
routeConfig:
name: local_route
virtualHosts:
- domains:
- '*'
name: prometheus_stats
routes:
- match:
prefix: /stats/prometheus
route:
cluster: prometheus_stats
statPrefix: eg-ready-http
name: envoy-gateway-proxy-ready-0.0.0.0-19001
- '@type': type.googleapis.com/envoy.admin.v3.EndpointsConfigDump
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ xds:
resourceApiVersion: V3
staticResources:
clusters:
- connectTimeout: 0.250s
loadAssignment:
clusterName: prometheus_stats
endpoints:
- lbEndpoints:
- endpoint:
address:
socketAddress:
address: 127.0.0.1
portValue: 19000
name: prometheus_stats
type: STATIC
- connectTimeout: 10s
http2ProtocolOptions:
connectionKeepalive:
Expand Down Expand Up @@ -103,6 +115,15 @@ xds:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
routeConfig:
name: local_route
virtualHosts:
- domains:
- '*'
name: prometheus_stats
routes:
- match:
prefix: /stats/prometheus
route:
cluster: prometheus_stats
statPrefix: eg-ready-http
name: envoy-gateway-proxy-ready-0.0.0.0-19001
- '@type': type.googleapis.com/envoy.admin.v3.EndpointsConfigDump
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,30 @@
},
"staticResources": {
"clusters": [
{
"connectTimeout": "0.250s",
"loadAssignment": {
"clusterName": "prometheus_stats",
"endpoints": [
{
"lbEndpoints": [
{
"endpoint": {
"address": {
"socketAddress": {
"address": "127.0.0.1",
"portValue": 19000
}
}
}
}
]
}
]
},
"name": "prometheus_stats",
"type": "STATIC"
},
{
"connectTimeout": "10s",
"http2ProtocolOptions": {
Expand Down Expand Up @@ -171,7 +195,25 @@
}
],
"routeConfig": {
"name": "local_route"
"name": "local_route",
"virtualHosts": [
{
"domains": [
"*"
],
"name": "prometheus_stats",
"routes": [
{
"match": {
"prefix": "/stats/prometheus"
},
"route": {
"cluster": "prometheus_stats"
}
}
]
}
]
},
"statPrefix": "eg-ready-http"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ xds:
resourceApiVersion: V3
staticResources:
clusters:
- connectTimeout: 0.250s
loadAssignment:
clusterName: prometheus_stats
endpoints:
- lbEndpoints:
- endpoint:
address:
socketAddress:
address: 127.0.0.1
portValue: 19000
name: prometheus_stats
type: STATIC
- connectTimeout: 10s
http2ProtocolOptions:
connectionKeepalive:
Expand Down Expand Up @@ -103,6 +115,15 @@ xds:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
routeConfig:
name: local_route
virtualHosts:
- domains:
- '*'
name: prometheus_stats
routes:
- match:
prefix: /stats/prometheus
route:
cluster: prometheus_stats
statPrefix: eg-ready-http
name: envoy-gateway-proxy-ready-0.0.0.0-19001
- '@type': type.googleapis.com/envoy.admin.v3.EndpointsConfigDump
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ xds:
resourceApiVersion: V3
staticResources:
clusters:
- connectTimeout: 0.250s
loadAssignment:
clusterName: prometheus_stats
endpoints:
- lbEndpoints:
- endpoint:
address:
socketAddress:
address: 127.0.0.1
portValue: 19000
name: prometheus_stats
type: STATIC
- connectTimeout: 10s
http2ProtocolOptions:
connectionKeepalive:
Expand Down Expand Up @@ -102,5 +114,14 @@ xds:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
routeConfig:
name: local_route
virtualHosts:
- domains:
- '*'
name: prometheus_stats
routes:
- match:
prefix: /stats/prometheus
route:
cluster: prometheus_stats
statPrefix: eg-ready-http
name: envoy-gateway-proxy-ready-0.0.0.0-19001
Loading
Loading