If the ServiceMonitor should still point towards the http port, an additional port should be opened when using service.targetPort.
Such that the Service goes from
ports:
- port: 8080
targetPort: http
name: http
protocol: TCP
- port: 8080 # opening two ports with the same port number is probably not allowed
targetPort: sidecar-http
name: sidecar-http
protocol: TCP
The Prometheus operator have deprecated the
.spec.endpoints.targetPort
in ServiceMonitors in favor ofport
.Atm. the Service in the Helm chart points directly to
service.targetPort
if used (https://github.com/chartmuseum/charts/blob/main/src/chartmuseum/templates/service.yaml#L38), otherwise directly to the namedhttp
port of the main Chartmuseum container.If the ServiceMonitor should still point towards the
http
port, an additional port should be opened when usingservice.targetPort
. Such that the Service goes fromto
The Ingress resource should be changed accordingly, such as https://github.com/chartmuseum/charts/blob/main/src/chartmuseum/templates/ingress.yaml#L43
If what i propose above would be the preferred solution, I could take a look at it.