From d671927e733da88b087dd2f1b051820c818666bf Mon Sep 17 00:00:00 2001 From: Boemeltrein <130394941+Boemeltrein@users.noreply.github.com> Date: Mon, 31 Mar 2025 23:10:15 +0200 Subject: [PATCH] fix(volsync): metrics and dashboard (#33789) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Fix Dashboard, so Prometheus is configured as datasource Fix values so metrics will be scraped, changes read from . - https://github.com/backube/volsync/blob/main/helm/volsync/templates/servicemonitor-volsync.yaml - https://volsync.readthedocs.io/en/stable/usage/metrics/index.html#metrics-monitoring - https://github.com/backube/volsync/blob/5272a5f2e9d3c41066c2d5888412b6ba8cdad072/helm/volsync/templates/deployment-controller.yaml#L64 - Decided to disableAuth for Metrics as I don't know how to make a ClusterRole via the helm template. ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [x] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code - [ ] 📜 Documentation Changes **🧪 How Has This Been Tested?** All tested via my own cluster. In the webinterface of prometeus/targets all changes are needed. Added those step by step. **📃 Notes:** All changes will at least dashboard working and metrics are scraped. I don't see timing of Volsync Replication Duration. But as I understood sofar you need to set schedules. Which I don't have. Will check, test and try further when this PR is OK. **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [x] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made changes to the documentation - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [x] ⬆️ I increased versions for any altered app according to semantic versioning - [x] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):`, `chore(chart-name):`, `docs(chart-name):` or `fix(docs):` **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --- charts/system/volsync/Chart.yaml | 2 +- charts/system/volsync/dashboard_volsync.json | 26 +++++++++++++++++--- charts/system/volsync/values.yaml | 4 +++ 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/charts/system/volsync/Chart.yaml b/charts/system/volsync/Chart.yaml index b4e4aaf09fe..29ee5017300 100644 --- a/charts/system/volsync/Chart.yaml +++ b/charts/system/volsync/Chart.yaml @@ -36,4 +36,4 @@ sources: - https://quay.io/brancz/kube-rbac-proxy - https://volsync.readthedocs.io/ type: application -version: 2.11.0 +version: 2.11.1 diff --git a/charts/system/volsync/dashboard_volsync.json b/charts/system/volsync/dashboard_volsync.json index 4f51fc699a6..cc2aff607a7 100644 --- a/charts/system/volsync/dashboard_volsync.json +++ b/charts/system/volsync/dashboard_volsync.json @@ -804,6 +804,24 @@ ], "templating": { "list": [ + { + "current": { + "selected": false, + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "DS_PROMETHEUS", + "label": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, { "allValue": ".*", "current": {}, @@ -857,7 +875,7 @@ "uid": "${DS_PROMETHEUS}" }, "definition": "label_values(volsync_sync_duration_seconds,namespace)", - "hide": 2, + "hide": 0, "includeAll": false, "multi": false, "name": "volsyncNamespace", @@ -880,8 +898,8 @@ "uid": "${DS_PROMETHEUS}" }, "definition": "label_values(volsync_sync_duration_seconds,pod)", - "hide": 2, - "includeAll": false, + "hide": 0, + "includeAll": true, "multi": false, "name": "volsyncPod", "options": [], @@ -905,7 +923,7 @@ "timepicker": {}, "timezone": "browser", "title": "VolSync Dashboard", - "uid": "cdp5agkgn4yrkc", + "uid": "cdp5agkgn4yrkc-truecharts", "version": 1, "weekStart": "" } diff --git a/charts/system/volsync/values.yaml b/charts/system/volsync/values.yaml index d9022d99c28..356cb06d0ad 100644 --- a/charts/system/volsync/values.yaml +++ b/charts/system/volsync/values.yaml @@ -45,6 +45,7 @@ workload: - --logtostderr=true - "--tls-min-version=VersionTLS12" - --v=0 + - --ignore-paths=/metrics resources: limits: cpu: 500m @@ -75,6 +76,9 @@ metrics: endpoints: - port: metrics path: /metrics + scheme: https + tlsConfig: + insecureSkipVerify: true targetSelector: metrics # -- Options for the main traefik service, where the entrypoints traffic comes from