Closed rustik666 closed 10 months ago
Already possible with:
promExporter:
enabled: true
patch:
- op: replace
path: /ports/0/name
value: your-port-name
# if you are also using the pod monitor, do this too:
podMonitor:
enabled: true
patch:
- op: replace
path: /spec/podMetricsEndpoints/0/port
value: your-port-name
Already possible with:
promExporter: enabled: true patch: - op: replace path: /ports/0/name value: your-port-name # if you are also using the pod monitor, do this too: podMonitor: enabled: true patch: - op: replace path: /spec/podMetricsEndpoints/0/port value: your-port-name
@caleblloyd thank you very much!
What this PR does / why we need it
In this PR we add ability to rewrite Prometheus exporter container port name to be able to avoid hardcoded
prom-metrics
value.Which issue this PR fixes
For our particular case, we use internal rule to name all ports targets of
ClusterPodMonitor
asmetrics
withNetworkPolicy
where we allowgmp-system
to collect metrics from named port.