Skip to content

Commit

Permalink
[cni-metrics-helper] Expose container port when enabling prometheus m…
Browse files Browse the repository at this point in the history
…etrics (#2957)

To scrape Prometheus metrics using the Prometheus Operator's PodMonitor,
container ports must be exposed via PodSpec.

Signed-off-by: Tsubasa Nagasawa <[email protected]>
Co-authored-by: Senthil Kumaran <[email protected]>
  • Loading branch information
toVersus and orsenthil authored Jun 21, 2024
1 parent f716a1d commit 0e3d4b1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions charts/cni-metrics-helper/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ spec:
{{- end }}
name: cni-metrics-helper
image: "{{- if .Values.image.override }}{{- .Values.image.override }}{{- else }}{{- .Values.image.account }}.dkr.ecr.{{- .Values.image.region }}.{{- .Values.image.domain }}/cni-metrics-helper:{{- .Values.image.tag }}{{- end}}"
{{- if eq (get .Values.env "USE_PROMETHEUS") "true" }}
ports:
- containerPort: 61681
name: metrics
{{- end }}
serviceAccountName: {{ template "cni-metrics-helper.serviceAccountName" . }}
{{- with .Values.tolerations }}
tolerations:
Expand Down

0 comments on commit 0e3d4b1

Please sign in to comment.