From aa22edcae2ee1058ba9446ed278a6d74bb2d0304 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Mon, 22 May 2023 12:20:44 +0200 Subject: [PATCH] fix(prometheus): readd node-exporter and kube-state-metrics support (#9062) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Readds both node-exporter and kube-state-metrics. Also adds the GUI option in SCALE to disable them, in case users want to run those as seperate charts/apps. Basically undoes the breakingchange from last time, so users can now safely update. **โš™๏ธ Type of change** - [x] โš™๏ธ Feature/App addition - [x] ๐Ÿช› Bugfix - [ ] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] ๐Ÿ”ƒ Refactor of current code **๐Ÿงช How Has This Been Tested?** **๐Ÿ“ƒ Notes:** **โœ”๏ธ Checklist:** - [x] โš–๏ธ My code follows the style guidelines of this project - [x] ๐Ÿ‘€ I have performed a self-review of my own code - [x] #๏ธโƒฃ I have commented my code, particularly in hard-to-understand areas - [x] ๐Ÿ“„ I have made corresponding changes to the documentation - [x] โš ๏ธ My changes generate no new warnings - [x] ๐Ÿงช 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 **โž• App addition** If this PR is an app addition please make sure you have done the following. - [ ] ๐Ÿชž I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] ๐Ÿ–ผ๏ธ 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._ --------- Signed-off-by: Kjeld Schouten --- charts/enterprise/prometheus/Chart.yaml | 10 ++++++- charts/enterprise/prometheus/questions.yaml | 33 ++++++++++++++++++++- charts/enterprise/prometheus/values.yaml | 27 ++--------------- 3 files changed, 43 insertions(+), 27 deletions(-) diff --git a/charts/enterprise/prometheus/Chart.yaml b/charts/enterprise/prometheus/Chart.yaml index d81fd79d565..be7adbe25d7 100644 --- a/charts/enterprise/prometheus/Chart.yaml +++ b/charts/enterprise/prometheus/Chart.yaml @@ -4,6 +4,14 @@ dependencies: - name: common repository: https://library-charts.truecharts.org version: 12.8.1 + - condition: exporters.enabled,exporters.node-exporter.enabled + name: node-exporter + repository: https://deps.truecharts.org + version: 1.0.1 + - condition: exporters.enabled,exporters.kube-state-metrics.enabled + name: kube-state-metrics + repository: https://deps.truecharts.org + version: 1.0.0 deprecated: false description: kube-prometheus-stack collects Kubernetes manifests, Grafana dashboards, and Prometheus rules combined with documentation and scripts to provide easy to operate end-to-end Kubernetes cluster monitoring with Prometheus using the Prometheus Operator. icon: https://truecharts.org/img/hotlink-ok/chart-icons/prometheus.png @@ -21,7 +29,7 @@ sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus type: application -version: 9.0.3 +version: 9.0.4 annotations: truecharts.org/catagories: | - metrics diff --git a/charts/enterprise/prometheus/questions.yaml b/charts/enterprise/prometheus/questions.yaml index 9a62dab2f48..d8aefa04b48 100644 --- a/charts/enterprise/prometheus/questions.yaml +++ b/charts/enterprise/prometheus/questions.yaml @@ -23,6 +23,7 @@ questions: schema: type: string default: "info" + - variable: prometheus group: "App Configuration" label: "Prometheus Settings" @@ -79,6 +80,37 @@ questions: schema: type: boolean default: false + + - variable: exporters + group: "App Configuration" + label: "Exporter Settings" + schema: + additional_attrs: true + type: dict + attrs: + - variable: node-exporter + label: "node-exporter" + schema: + additional_attrs: true + type: dict + attrs: + - variable: enabled + label: "Enable" + schema: + type: boolean + default: true + - variable: kube-state-metrics + label: "Kube-State-Metrics" + schema: + additional_attrs: true + type: dict + attrs: + - variable: enabled + label: "Enable" + schema: + type: boolean + default: true + - variable: alertmanager group: "App Configuration" label: "Alertmanager Settings" @@ -151,7 +183,6 @@ questions: default: 10087 required: true # Include{serviceExpertRoot} - default: false # Include{serviceExpert} # Include{serviceList} # Include{persistenceList} diff --git a/charts/enterprise/prometheus/values.yaml b/charts/enterprise/prometheus/values.yaml index 478581b97c2..83d4638b30d 100644 --- a/charts/enterprise/prometheus/values.yaml +++ b/charts/enterprise/prometheus/values.yaml @@ -1129,37 +1129,14 @@ exporters: ## @param exporters.kube-state-metrics.enabled Enable kube-state-metrics ## enabled: true -## @param node-exporter [object] Node Exporter deployment configuration -## -node-exporter: - service: - port: 9910 - targetPort: 9910 - labels: - jobLabel: node-exporter - serviceMonitor: - enabled: true - jobLabel: jobLabel - extraArgs: - collector.filesystem.ignored-mount-points: "^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+|var/db/system/.+|mnt/[a-zA-Z0-9-_\\.]+/ix-applications/.+)($|/)" - collector.filesystem.ignored-fs-types: "^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$" - collector.netdev.device-exclude: "^veth.*$" - collector.netclass.ignored-devices: "^veth.*$" - path.rootfs: /host - extraVolumes: - - name: host - hostPath: - path: / - extraVolumeMounts: - - name: host - mountPath: /host - readOnly: true + ## @param kube-state-metrics [object] Node Exporter deployment configuration ## kube-state-metrics: serviceMonitor: enabled: true honorLabels: true + ## Component scraping for kubelet and kubelet hosted cAdvisor ## kubelet: