Skip to content

Edited template for ServiceMonitor#1728

Merged
Slach merged 1 commit intoAltinity:0.25.1from
virtualb0x:fix_service_monitor
May 31, 2025
Merged

Edited template for ServiceMonitor#1728
Slach merged 1 commit intoAltinity:0.25.1from
virtualb0x:fix_service_monitor

Conversation

@virtualb0x
Copy link
Copy Markdown
Contributor

Signed-off-by: Anastasiya Lomakova [email protected]

Thanks for taking the time to contribute to clickhouse-operator!

Please, read carefully instructions on how to make a Pull Request.

This will help a lot for maintainers to adopt your Pull Request.

Important items to consider before making a Pull Request

Please check items PR complies to:

  • All commits in the PR are squashed. More info
  • The PR is made into dedicated next-release branch, not into master branch1. More info
  • The PR is signed. More info

--

1 If you feel your PR does not affect any Go-code or any testable functionality (for example, PR contains docs only or supplementary materials), PR can be made into master branch, but it has to be confirmed by project's maintainer.

I've tried to follow test recommendations: please test and confirm with logs proposed changes works as expected for serviceMonitor with prometheus-operator which we use to test prometheus look ./deploy/prometheus/create-prometheus.sh

and deployed prom at my minikube with this script.
The manifest of ServiceMonitor I received:

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  annotations:
    meta.helm.sh/release-name: test-cluster
    meta.helm.sh/release-namespace: default
  creationTimestamp: "2025-05-30T07:26:21Z"
  generation: 1
  labels:
    app.kubernetes.io/instance: test-cluster
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: altinity-clickhouse-operator
    app.kubernetes.io/version: 0.25.1
    helm.sh/chart: altinity-clickhouse-operator-0.25.1
  name: test-cluster-altinity-clickhouse-operator-clickhouse-metrics
  namespace: default
  resourceVersion: "4542"
  uid: 31b9a20a-4f26-4a74-9a9e-7e6f369b251f
spec:
  endpoints:
  - interval: 30s
    port: clickhouse-metrics
  - interval: 30s
    port: operator-metrics
  selector:
    matchLabels:
      app.kubernetes.io/instance: test-cluster
      app.kubernetes.io/name: altinity-clickhouse-operator

Metrics seemed to be appeared in prom
image

I just wonder why just it couldn't be rendered by helm template command? Isn't it the same?
Also I do not now exactly if there is the necessity of dividing relable configs to different endpoint (to be honest I've never saw anyone who uses it) but still I've decided to divide it.

Signed-off-by: Anastasiya Lomakova <[email protected]>
@Slach Slach merged commit c1a5596 into Altinity:0.25.1 May 31, 2025
2 checks passed
@xavierleune
Copy link
Copy Markdown
Contributor

Hello there, thanks for the PR @virtualb0x
@Slach @virtualb0x I think there is a typo on row 13, the "spec" row should not be duplicated. May you please double check prior to the release of 0.25.1 ?
Thanks !

Slach added a commit that referenced this pull request Jun 18, 2025
Signed-off-by: Slach <[email protected]>
@Slach Slach mentioned this pull request Jun 18, 2025
3 tasks
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

Successfully merging this pull request may close these issues.

3 participants