Skip to content

Commit

Permalink
refactor: collapse eg-metrics-svc into eg-svc
Browse files Browse the repository at this point in the history
Signed-off-by: ShyunnY <1147212064@qq.com>
  • Loading branch information
ShyunnY committed Mar 15, 2024
1 parent 36505f4 commit 5b4367f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 25 deletions.
8 changes: 8 additions & 0 deletions charts/gateway-helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,11 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
eg metrics annotations
*/}}
{{- define "eg.metrics.annotation" -}}
prometheus.io/scrape: 'true'
prometheus.io/port: '19001'
{{- end }}
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.

2 changes: 2 additions & 0 deletions charts/gateway-helm/templates/envoy-gateway-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
labels:
control-plane: envoy-gateway
{{- include "eg.labels" . | nindent 4 }}
annotations:
{{- include "eg.metrics.annotation" . | nindent 4}}
spec:
selector:
control-plane: envoy-gateway
Expand Down
6 changes: 3 additions & 3 deletions charts/gateway-helm/values.tmpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ deployment:
- name: ratelimit
port: 18001
targetPort: 18001
- name: metrics
port: 19001
targetPort: 19001
replicas: 1
pod:
affinity: {}
Expand All @@ -35,9 +38,6 @@ config:
level:
default: info

envoyGatewayMetricsService:
port: 19001

createNamespace: false

kubernetesClusterDomain: cluster.local
Expand Down

0 comments on commit 5b4367f

Please sign in to comment.