From e819e9b697a5bcab26aaa3369b419f80dfc30e7e Mon Sep 17 00:00:00 2001 From: Volodymyr Stoiko Date: Thu, 19 Dec 2024 12:06:29 -0800 Subject: [PATCH] Add hub metrics port (#1666) * Add hub metrics port * Add policies and service * Use static 9100 port for hub metrics * fix --------- Co-authored-by: Alon Girmonsky <1990761+alongir@users.noreply.github.com> --- .../templates/16-hub-service-metrics.yaml | 23 +++++++++++++++++++ ...policies.yaml => 17-network-policies.yaml} | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 helm-chart/templates/16-hub-service-metrics.yaml rename helm-chart/templates/{16-network-policies.yaml => 17-network-policies.yaml} (96%) diff --git a/helm-chart/templates/16-hub-service-metrics.yaml b/helm-chart/templates/16-hub-service-metrics.yaml new file mode 100644 index 000000000..cd26ba712 --- /dev/null +++ b/helm-chart/templates/16-hub-service-metrics.yaml @@ -0,0 +1,23 @@ +--- +kind: Service +apiVersion: v1 +metadata: + labels: + {{- include "kubeshark.labels" . | nindent 4 }} + annotations: + prometheus.io/scrape: 'true' + prometheus.io/port: '9100' + {{- if .Values.tap.annotations }} + {{- toYaml .Values.tap.annotations | nindent 4 }} + {{- end }} + name: kubeshark-hub-metrics + namespace: {{ .Release.Namespace }} +spec: + selector: + app.kubeshark.co/app: hub + {{- include "kubeshark.labels" . | nindent 4 }} + ports: + - name: metrics + protocol: TCP + port: 9100 + targetPort: 9100 diff --git a/helm-chart/templates/16-network-policies.yaml b/helm-chart/templates/17-network-policies.yaml similarity index 96% rename from helm-chart/templates/16-network-policies.yaml rename to helm-chart/templates/17-network-policies.yaml index a412cde2a..276acd2db 100644 --- a/helm-chart/templates/16-network-policies.yaml +++ b/helm-chart/templates/17-network-policies.yaml @@ -20,6 +20,9 @@ spec: - ports: - protocol: TCP port: 8080 + - ports: + - protocol: TCP + port: 9100 egress: - {} ---