-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Describe the bug
ServiceMonitor expects port metrics but Service exposes only https → Prometheus cannot scrape metrics (v1.0.1)
Version
Chart: argocd-image-updater-1.0.1
App version: v1.0.1
Summary
When enabling metrics and ServiceMonitor via Helm values:
metrics:
enabled: true
serviceMonitor:
enabled: truethe chart creates a ServiceMonitor that assumes the Service contains a port named metrics.
However, the Service generated by the same chart exposes only a port named https.
This mismatch causes the Prometheus operator to fail to attach a target, so metrics are not scraped at all.
Actual behavior
Generated ServiceMonitor:
spec:
endpoints:
- interval: 30s
path: /metrics
port: metrics # <--- this port name does NOT exist in the ServiceGenerated Service:
spec:
ports:
- name: https # <--- only this port exists
port: 8443
targetPort: metricsBecause the ServiceMonitor references a non-existent port (metrics), Prometheus operator logs a port-not-found error and does not create a scrape target.
This results in completely broken metrics for argocd-image-updater.
Impact
- No metrics from argocd-image-updater are scraped.
- Any dashboards/alerts depending on these metrics do not work.
- Monitoring integrations are effectively broken.
Proposed fix
Option A — fix ServiceMonitor (simplest)
Change port: metrics → port: https.
Option B — fix Service
ports:
- name: metrics
port: 8443
targetPort: metricsOption C — allow configuring ServiceMonitor port name
metrics:
serviceMonitor:
portName: httpsRelated helm chart
argocd-image-updater
Helm chart version
1.0.1
To Reproduce
Steps to reproduce
-
Install chart
argocd-image-updater-1.0.1with:metrics: enabled: true serviceMonitor: enabled: true
-
Apply the manifests.
-
Inspect:
- ServiceMonitor →
spec.endpoints[0].port = metrics - Service → only port name
https
- ServiceMonitor →
-
Check Prometheus targets → argocd-image-updater metrics are missing.
-
Prometheus operator logs port-not-found warning.
Expected behavior
The ServiceMonitor should match the actual Service port name, or the Service should expose a port named metrics.
Either the Service should define:
ports:
- name: metrics
port: 8443
targetPort: metricsOR
the ServiceMonitor should use port: https.
Screenshots
No response
Additional context
No response