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

Bug: ServiceMonitor should use https instead of http #386

Open
incubator4 opened this issue Apr 18, 2024 · 2 comments
Open

Bug: ServiceMonitor should use https instead of http #386

incubator4 opened this issue Apr 18, 2024 · 2 comments

Comments

@incubator4
Copy link

current servicemonitor resources without option scheme, it can only be used for insecure clusters, example like this.

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: cockroachdb
spec:
  endpoints:
    - interval: 10s
      path: /_status/vars
      port: http
      # without scheme: https
      tlsConfig:
        ca:
          secret:
            key: ca.crt
            name: cockroachdb-node
        cert:
          secret:
            key: tls.crt
            name: cockroachdb-node
        insecureSkipVerify: true
        keySecret:
          key: tls.key
          name: cockroachdb-node
  namespaceSelector:
    any: true
  selector:
    matchLabels:
      app.kubernetes.io/component: cockroachdb
      app.kubernetes.io/instance: cockroachdb
      app.kubernetes.io/name: cockroachdb
@incubator4
Copy link
Author

And relabelings config is missing, a better suggestion is that, use cluster-name on relabelings to add additional labels for cluster, it makes better to run multiple helm releases in a cluster for monitor

@incubator4
Copy link
Author

Added: due to service cockroachdb-public(ClusterIP) and cockroachdb(headless) have some labels, it might create duplicate target on prometheus targets(or any other prometheus-like system)

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