[memcached] Expose exporter port via service

Pods may be discovered via prometheus endpoint scraper [0]
expose exporter port via service to have ability to scrape over endpoints.

[0] https://prometheus.io/docs/prometheus/latest/configuration/configuration/#endpoints

Change-Id: I59a4472f13753db0ff2dc48559dd644d2648d97e
This commit is contained in:
Vasyl Saienko 2025-01-23 06:25:28 +00:00
parent e25a201116
commit b5b9e509de

View File

@ -24,6 +24,14 @@ spec:
ports:
- name: memcache
port: {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{/*
Keep exporter port here to be able to scrape over endpoints.
https://prometheus.io/docs/prometheus/latest/configuration/configuration/#endpoints
*/}}
{{- if .Values.monitoring.prometheus.enabled }}
- name: metrics
port: {{ tuple "oslo_cache" "internal" "metrics" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- end }}
selector:
{{ tuple $envAll "memcached" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ .Values.network.memcached | include "helm-toolkit.snippets.service_params" | indent 2 }}