Skip to content

Commit

Permalink
refactor: collapse eg-metrics-svc into eg-svc (envoyproxy#2932)
Browse files Browse the repository at this point in the history
* refactor: collapse eg-metrics-svc into eg-svc

Signed-off-by: ShyunnY <1147212064@qq.com>

* fix: fix install/api.md

Signed-off-by: ShyunnY <1147212064@qq.com>

* fix: update helm default.yaml

Signed-off-by: ShyunnY <1147212064@qq.com>

* fix: migrate prom annotations to pod

Signed-off-by: ShyunnY <1147212064@qq.com>

---------

Signed-off-by: ShyunnY <1147212064@qq.com>
Co-authored-by: zirain <zirain2009@gmail.com>
  • Loading branch information
ShyunnY and zirain authored Mar 17, 2024
1 parent 791cdf5 commit 366e990
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 56 deletions.
2 changes: 0 additions & 2 deletions charts/gateway-helm/templates/envoy-gateway-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ spec:
- containerPort: {{ .port }}
name: {{ .name }}
{{- end}}
- containerPort: 19001
name: http-metrics
readinessProbe:
httpGet:
path: /readyz
Expand Down
20 changes: 0 additions & 20 deletions charts/gateway-helm/templates/envoy-gateway-metrics-service.yaml

This file was deleted.

10 changes: 6 additions & 4 deletions charts/gateway-helm/values.tmpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ deployment:
- name: ratelimit
port: 18001
targetPort: 18001
- name: metrics
port: 19001
targetPort: 19001
replicas: 1
pod:
affinity: {}
annotations: {}
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '19001'
labels: {}

config:
Expand All @@ -35,9 +40,6 @@ config:
level:
default: info

envoyGatewayMetricsService:
port: 19001

createNamespace: false

kubernetesClusterDomain: cluster.local
Expand Down
7 changes: 5 additions & 2 deletions site/content/en/latest/install/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,18 @@ The Helm chart for Envoy Gateway
| deployment.envoyGateway.resources.requests.cpu | string | `"100m"` | |
| deployment.envoyGateway.resources.requests.memory | string | `"256Mi"` | |
| deployment.pod.affinity | object | `{}` | |
| deployment.pod.annotations | object | `{}` | |
| deployment.pod.annotations."prometheus.io/port" | string | `"19001"` | |
| deployment.pod.annotations."prometheus.io/scrape" | string | `"true"` | |
| deployment.pod.labels | object | `{}` | |
| deployment.ports[0].name | string | `"grpc"` | |
| deployment.ports[0].port | int | `18000` | |
| deployment.ports[0].targetPort | int | `18000` | |
| deployment.ports[1].name | string | `"ratelimit"` | |
| deployment.ports[1].port | int | `18001` | |
| deployment.ports[1].targetPort | int | `18001` | |
| deployment.ports[2].name | string | `"metrics"` | |
| deployment.ports[2].port | int | `19001` | |
| deployment.ports[2].targetPort | int | `19001` | |
| deployment.replicas | int | `1` | |
| envoyGatewayMetricsService.port | int | `19001` | |
| kubernetesClusterDomain | string | `"cluster.local"` | |

35 changes: 7 additions & 28 deletions test/helm/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -294,33 +294,6 @@ subjects:
name: 'envoy-gateway'
namespace: 'default'
---
# Source: gateway-helm/templates/envoy-gateway-metrics-service.yaml
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '19001'
name: envoy-gateway-metrics-service
namespace: 'default'
labels:
control-plane: envoy-gateway
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: eg
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
spec:
selector:
control-plane: envoy-gateway
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: eg
ports:
- name: http
port: 19001
protocol: TCP
targetPort: http-metrics
---
# Source: gateway-helm/templates/envoy-gateway-service.yaml
apiVersion: v1
kind: Service
Expand All @@ -346,6 +319,9 @@ spec:
- name: ratelimit
port: 18001
targetPort: 18001
- name: metrics
port: 19001
targetPort: 19001
---
# Source: gateway-helm/templates/envoy-gateway-deployment.yaml
apiVersion: apps/v1
Expand All @@ -369,6 +345,9 @@ spec:
app.kubernetes.io/instance: eg
template:
metadata:
annotations:
prometheus.io/port: "19001"
prometheus.io/scrape: "true"
labels:
control-plane: envoy-gateway
app.kubernetes.io/name: gateway-helm
Expand Down Expand Up @@ -401,7 +380,7 @@ spec:
- containerPort: 18001
name: ratelimit
- containerPort: 19001
name: http-metrics
name: metrics
readinessProbe:
httpGet:
path: /readyz
Expand Down

0 comments on commit 366e990

Please sign in to comment.