From 4103bc151d5e035b23ac51529c1007f0a5e7e059 Mon Sep 17 00:00:00 2001 From: w-h37 <47009048+w-h37@users.noreply.github.com> Date: Thu, 1 Aug 2024 08:44:21 -0400 Subject: [PATCH] Changes for the helm chart added, specifically allowing users to opt-in for access to the Go Plugin Filter Metrics Signed-off-by: w-h37 <47009048+w-h37@users.noreply.github.com> --- charts/emissary-ingress/templates/admin-service.yaml | 6 ++++++ charts/emissary-ingress/templates/deployment.yaml | 8 ++++++++ charts/emissary-ingress/values.yaml.in | 1 + 3 files changed, 15 insertions(+) diff --git a/charts/emissary-ingress/templates/admin-service.yaml b/charts/emissary-ingress/templates/admin-service.yaml index 77f628459f..715d424849 100644 --- a/charts/emissary-ingress/templates/admin-service.yaml +++ b/charts/emissary-ingress/templates/admin-service.yaml @@ -32,6 +32,12 @@ spec: {{- if (and (eq .Values.adminService.type "NodePort") (not (empty .Values.adminService.nodePort))) }} nodePort: {{ int .Values.adminService.nodePort }} {{- end }} + {{- if .Values.adminService.goPluginMetricsPort}} + - port: {{ .Values.adminService.goPluginMetricsPort }} + targetPort: 8878 + protocol: TCP + name: go-plugin-filter-metrics + {{- end }} - port: {{ .Values.adminService.snapshotPort }} targetPort: 8005 protocol: TCP diff --git a/charts/emissary-ingress/templates/deployment.yaml b/charts/emissary-ingress/templates/deployment.yaml index 2c4d17a0a1..3418d4f08e 100644 --- a/charts/emissary-ingress/templates/deployment.yaml +++ b/charts/emissary-ingress/templates/deployment.yaml @@ -215,7 +215,15 @@ spec: {{- end}} - name: admin containerPort: {{ .Values.adminService.port }} + {{- if .Values.adminService.goPluginMetricsPort}} + - name: go-plugin-metrics-port + containerPort: {{ .Values.adminService.goPluginMetricsPort}} + {{- end}} env: + {{- if .Values.adminService.goPluginMetricsPort}} + - name: ENABLE_PLUGIN_FILTER_METRICS + value: "true" + {{- end }} {{- if .Values.prometheusExporter.enabled }} - name: STATSD_ENABLED value: "true" diff --git a/charts/emissary-ingress/values.yaml.in b/charts/emissary-ingress/values.yaml.in index 0f5052c35e..aba5dc4b57 100644 --- a/charts/emissary-ingress/values.yaml.in +++ b/charts/emissary-ingress/values.yaml.in @@ -208,6 +208,7 @@ adminService: type: ClusterIP port: 8877 snapshotPort: 8005 + goPluginMetricsPort: # If explicit NodePort for admin service is required nodePort: # Annotations to apply to Ambassador admin service