Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated use of targetPort in ServiceMonitor #57

Open
AndersBennedsgaard opened this issue Dec 7, 2022 · 0 comments
Open

Deprecated use of targetPort in ServiceMonitor #57

AndersBennedsgaard opened this issue Dec 7, 2022 · 0 comments

Comments

@AndersBennedsgaard
Copy link

The Prometheus operator have deprecated the .spec.endpoints.targetPort in ServiceMonitors in favor of port.

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 named http port of the main Chartmuseum container.

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: sidecar-http
    name: sidecar-http
    protocol: TCP

to

  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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant