diff --git a/charts/gateway-helm/templates/envoy-gateway-deployment.yaml b/charts/gateway-helm/templates/envoy-gateway-deployment.yaml index 1ee5c7f7d86..7ca6f2b64d1 100644 --- a/charts/gateway-helm/templates/envoy-gateway-deployment.yaml +++ b/charts/gateway-helm/templates/envoy-gateway-deployment.yaml @@ -63,8 +63,6 @@ spec: - containerPort: {{ .port }} name: {{ .name }} {{- end}} - - containerPort: 19001 - name: http-metrics readinessProbe: httpGet: path: /readyz diff --git a/charts/gateway-helm/templates/envoy-gateway-metrics-service.yaml b/charts/gateway-helm/templates/envoy-gateway-metrics-service.yaml deleted file mode 100644 index da17559f0ea..00000000000 --- a/charts/gateway-helm/templates/envoy-gateway-metrics-service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/scrape: 'true' - prometheus.io/port: '19001' - name: envoy-gateway-metrics-service - namespace: '{{ .Release.Namespace }}' - labels: - control-plane: envoy-gateway - {{- include "eg.labels" . | nindent 4 }} -spec: - selector: - control-plane: envoy-gateway - {{- include "eg.selectorLabels" . | nindent 4 }} - ports: - - name: http - port: {{ .Values.envoyGatewayMetricsService.port }} - protocol: TCP - targetPort: http-metrics diff --git a/charts/gateway-helm/values.tmpl.yaml b/charts/gateway-helm/values.tmpl.yaml index 269344cd978..ce6359dabc6 100644 --- a/charts/gateway-helm/values.tmpl.yaml +++ b/charts/gateway-helm/values.tmpl.yaml @@ -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: @@ -35,9 +40,6 @@ config: level: default: info -envoyGatewayMetricsService: - port: 19001 - createNamespace: false kubernetesClusterDomain: cluster.local diff --git a/site/content/en/latest/install/api.md b/site/content/en/latest/install/api.md index 165a91d01e6..47351ba771b 100644 --- a/site/content/en/latest/install/api.md +++ b/site/content/en/latest/install/api.md @@ -42,7 +42,8 @@ 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` | | @@ -50,7 +51,9 @@ The Helm chart for Envoy Gateway | 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"` | | diff --git a/test/helm/default.yaml b/test/helm/default.yaml index 028ec088db0..4e9c147f265 100644 --- a/test/helm/default.yaml +++ b/test/helm/default.yaml @@ -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 @@ -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 @@ -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 @@ -401,7 +380,7 @@ spec: - containerPort: 18001 name: ratelimit - containerPort: 19001 - name: http-metrics + name: metrics readinessProbe: httpGet: path: /readyz