From 67819bc79c4df0bbc9ba48d5326d503fcf4453c7 Mon Sep 17 00:00:00 2001 From: GGGitBoy <1812041288@qq.com> Date: Fri, 26 May 2023 18:02:43 +0800 Subject: [PATCH] PANDARIA: make charts --- .../rancher-blackbox-exporter-0.0.1.tgz | Bin 0 -> 4014 bytes .../0.0.1/Chart.yaml | 12 + .../rancher-blackbox-exporter/0.0.1/README.md | 1 + .../rancher-ssl-certificate-monitor.json | 671 ++++++++++++++++++ .../0.0.1/questions.yml | 1 + .../0.0.1/templates/_helpers.tpl | 12 + .../0.0.1/templates/configmap-dashboard.yaml | 14 + .../0.0.1/templates/configmap.yaml | 17 + .../0.0.1/templates/deployment.yaml | 49 ++ .../0.0.1/templates/probe.yaml | 20 + .../0.0.1/templates/prometheusrule.yaml | 16 + .../0.0.1/templates/service.yaml | 16 + .../0.0.1/templates/servicemonitor.yaml | 22 + .../0.0.1/values.yaml | 21 + index.yaml | 17 + 15 files changed, 889 insertions(+) create mode 100644 assets/rancher-blackbox-exporter/rancher-blackbox-exporter-0.0.1.tgz create mode 100644 charts/rancher-blackbox-exporter/0.0.1/Chart.yaml create mode 100644 charts/rancher-blackbox-exporter/0.0.1/README.md create mode 100644 charts/rancher-blackbox-exporter/0.0.1/files/rancher-ssl-certificate-monitor.json create mode 100644 charts/rancher-blackbox-exporter/0.0.1/questions.yml create mode 100644 charts/rancher-blackbox-exporter/0.0.1/templates/_helpers.tpl create mode 100644 charts/rancher-blackbox-exporter/0.0.1/templates/configmap-dashboard.yaml create mode 100644 charts/rancher-blackbox-exporter/0.0.1/templates/configmap.yaml create mode 100644 charts/rancher-blackbox-exporter/0.0.1/templates/deployment.yaml create mode 100644 charts/rancher-blackbox-exporter/0.0.1/templates/probe.yaml create mode 100644 charts/rancher-blackbox-exporter/0.0.1/templates/prometheusrule.yaml create mode 100644 charts/rancher-blackbox-exporter/0.0.1/templates/service.yaml create mode 100644 charts/rancher-blackbox-exporter/0.0.1/templates/servicemonitor.yaml create mode 100644 charts/rancher-blackbox-exporter/0.0.1/values.yaml diff --git a/assets/rancher-blackbox-exporter/rancher-blackbox-exporter-0.0.1.tgz b/assets/rancher-blackbox-exporter/rancher-blackbox-exporter-0.0.1.tgz new file mode 100644 index 0000000000000000000000000000000000000000..49704bd78c6d3d45ebd17b68afa5b0c478053f81 GIT binary patch literal 4014 zcmV;f4^i+RiwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PH>ebK5qu`B{GjhV8p+I}uHNI^n#$8OL$j+{8Uk?Dpp7n$bWc zB%uZYJ^-|>bM?R90Q~+CD95&>^n_n*0t@V7fnDq_mk@{4TOi(@66jq|*=sKFB?hWDsGwOoB{@)wWv-^(i zbe+F8!c!O^5ke2SAg=5NjAF?+rt_{?3W4Gq?ZX+$5tYbTNud{>oUoZbRkVHs4g#u`k|IuJrmH&}5KFI$z3ZigIkne&SBm#AC z0Ov?40**o^l-Mp^V0kpzCPxA0oN?rL)h4fR8mj|4Dbofv5=Z+)-J^P!DYStOB93zN+gaZ3q(T1g)PG` zQUz`DKkWC*^51vHgX4qzZ=>AbAN>GsaNq)gB$#1>)Y14RP;BuQ$OS(ftyUcc)j7Kh zA@zY=AfV1Qz-Ib?Puqzd4cEE9?*bpqFh#(M1!Izk&V(nTVS%n5u?z4F*uTc7Oe{`z zqbz0cA;(nCfb~D($a+{$L8ESn?J=5C4f1HGf3ei8{P$0&+5cPD?V{Z=LmcoLb-SuGwqa7iKx`P zOSq^9GcijO@NLRzB;x_WA3(Cd2}VId9c@7yJxKn)&>3j8|DEHC{P%hX|9?B>fl}*& zCja_rWH7}OZ#R1x5EuN>jm>=KM+7ApfHu%4{kyyL87QB7inyy=vP$)kgD4<0L!2Xj zg2PG3nPeU#F0gPovXe3gkr`O~f@0CpU=W+0q4)N2v4l8V#GszmGz~ zmI0z)7!GWa|NdaytIGdiJUYn#HcC|ObNWpR=uPJp6a}fwMo6J2$7crAd<*| zf=P`1v@$t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V?d00001 diff --git a/charts/rancher-blackbox-exporter/0.0.1/Chart.yaml b/charts/rancher-blackbox-exporter/0.0.1/Chart.yaml new file mode 100644 index 00000000..f45d742d --- /dev/null +++ b/charts/rancher-blackbox-exporter/0.0.1/Chart.yaml @@ -0,0 +1,12 @@ +annotations: + catalog.cattle.io/kube-version: '>= 1.20.0-0' + catalog.cattle.io/namespace: cattle-monitoring-system + catalog.cattle.io/rancher-version: '>= 2.6.0-0' + catalog.cattle.io/release-name: rancher-blackbox-exporter + catalog.cattle.io/type: cluster-tool +apiVersion: v2 +description: Blackbox Exporter for Prometheus +keywords: +- prometheus +name: rancher-blackbox-exporter +version: 0.0.1 diff --git a/charts/rancher-blackbox-exporter/0.0.1/README.md b/charts/rancher-blackbox-exporter/0.0.1/README.md new file mode 100644 index 00000000..f12af664 --- /dev/null +++ b/charts/rancher-blackbox-exporter/0.0.1/README.md @@ -0,0 +1 @@ +# rancher-blackbox-exporter diff --git a/charts/rancher-blackbox-exporter/0.0.1/files/rancher-ssl-certificate-monitor.json b/charts/rancher-blackbox-exporter/0.0.1/files/rancher-ssl-certificate-monitor.json new file mode 100644 index 00000000..1db5919b --- /dev/null +++ b/charts/rancher-blackbox-exporter/0.0.1/files/rancher-ssl-certificate-monitor.json @@ -0,0 +1,671 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "OpenAdvices first published Dahsboard: Just one Table Widget to display the Certificate and Connection Status from HTTPS Connections that are Monitored with Prometheus.", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 13230, + "graphTooltip": 0, + "id": 17, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": { + "custom": { + "align": "center", + "displayMode": "auto", + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "instance" + }, + "properties": [ + { + "id": "custom.width", + "value": 20 + }, + { + "id": "displayName", + "value": "Instance" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #B" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "lcd-gauge" + }, + { + "id": "max", + "value": 0.5 + }, + { + "id": "displayName", + "value": "Connect Time" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 0.2 + }, + { + "color": "red", + "value": 0.4 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #A" + }, + "properties": [ + { + "id": "decimals", + "value": 2 + }, + { + "id": "displayName", + "value": "Certificate expires in" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "semi-dark-red", + "value": null + }, + { + "color": "semi-dark-yellow", + "value": 12096000 + }, + { + "color": "semi-dark-green", + "value": 25920000 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "color-background" + }, + { + "id": "custom.width" + }, + { + "id": "custom.align", + "value": "center" + }, + { + "id": "unit", + "value": "dtdurations" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #D" + }, + "properties": [ + { + "id": "displayName", + "value": "HTTP Response" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 300 + }, + { + "color": "red", + "value": 400 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "color-background" + }, + { + "id": "custom.align", + "value": "center" + }, + { + "id": "custom.width", + "value": 20 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #C" + }, + "properties": [ + { + "id": "displayName", + "value": "Transfer Time" + }, + { + "id": "max", + "value": 0.5 + }, + { + "id": "custom.displayMode", + "value": "lcd-gauge" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 0.125 + }, + { + "color": "red", + "value": 0.3 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #E" + }, + "properties": [ + { + "id": "displayName", + "value": "TLS Time" + }, + { + "id": "custom.displayMode", + "value": "lcd-gauge" + }, + { + "id": "max", + "value": 1 + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 0.5 + }, + { + "color": "red", + "value": 0.9 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #F" + }, + "properties": [ + { + "id": "displayName", + "value": "Processing Time" + }, + { + "id": "max", + "value": 0.5 + }, + { + "id": "custom.displayMode", + "value": "lcd-gauge" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 0.25 + }, + { + "color": "red", + "value": 0.4 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #G" + }, + "properties": [ + { + "id": "displayName", + "value": "Resolve Time" + }, + { + "id": "custom.displayMode", + "value": "lcd-gauge" + }, + { + "id": "max", + "value": 0.01 + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 0.005 + }, + { + "color": "red", + "value": 0.009 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Instance" + }, + "properties": [ + { + "id": "custom.width", + "value": 289 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "HTTP Response" + }, + "properties": [ + { + "id": "custom.width", + "value": 170 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Certificate expires in" + }, + "properties": [ + { + "id": "custom.width", + "value": 285 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Processing Time" + }, + "properties": [ + { + "id": "custom.width", + "value": 167 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "TLS Time" + }, + "properties": [ + { + "id": "custom.width", + "value": 188 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Connect Time" + }, + "properties": [ + { + "id": "custom.width", + "value": 184 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Resolve Time" + }, + "properties": [ + { + "id": "custom.width", + "value": 179 + } + ] + } + ] + }, + "gridPos": { + "h": 20, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 1, + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "Processing Time" + } + ] + }, + "pluginVersion": "9.1.5", + "targets": [ + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "probe_ssl_earliest_cert_expiry-time()", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "expr": "probe_http_status_code", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "D" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "probe_http_duration_seconds{phase=\"resolve\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "G" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "expr": "probe_http_duration_seconds{phase=\"connect\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "B" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "expr": "probe_http_duration_seconds{phase=\"tls\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "E" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "expr": "probe_http_duration_seconds{phase=\"processing\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "F" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "expr": "probe_http_duration_seconds{phase=\"transfer\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "C" + } + ], + "title": "Certificate & Connection Monitoring", + "transformations": [ + { + "id": "seriesToColumns", + "options": { + "byField": "instance" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Time 1": true, + "Time 2": true, + "Time 3": true, + "Time 4": true, + "Time 5": true, + "Time 6": true, + "Time 7": true, + "__name__": true, + "__name__ 1": true, + "__name__ 2": true, + "__name__ 3": true, + "__name__ 4": true, + "__name__ 5": true, + "__name__ 6": true, + "container 1": true, + "container 2": true, + "container 3": true, + "container 4": true, + "container 5": true, + "container 6": true, + "container 7": true, + "endpoint 1": true, + "endpoint 2": true, + "endpoint 3": true, + "endpoint 4": true, + "endpoint 5": true, + "endpoint 6": true, + "endpoint 7": true, + "instance 1": false, + "job": true, + "job 1": true, + "job 2": true, + "job 3": true, + "job 4": true, + "job 5": true, + "job 6": true, + "job 7": true, + "namespace 1": true, + "namespace 2": true, + "namespace 3": true, + "namespace 4": true, + "namespace 5": true, + "namespace 6": true, + "namespace 7": true, + "phase": true, + "phase 1": true, + "phase 2": true, + "phase 3": true, + "phase 4": true, + "phase 5": true, + "pod 1": true, + "pod 2": true, + "pod 3": true, + "pod 4": true, + "pod 5": true, + "pod 6": true, + "pod 7": true, + "service 1": true, + "service 2": true, + "service 3": true, + "service 4": true, + "service 5": true, + "service 6": true, + "service 7": true + }, + "indexByName": {}, + "renameByName": { + "instance 1": "" + } + } + } + ], + "type": "table" + } + ], + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Rancher / SSL Certificate Monitor", + "uid": "rancher-ssl-certificate-monitor", + "version": 1, + "weekStart": "" +} diff --git a/charts/rancher-blackbox-exporter/0.0.1/questions.yml b/charts/rancher-blackbox-exporter/0.0.1/questions.yml new file mode 100644 index 00000000..d891df4a --- /dev/null +++ b/charts/rancher-blackbox-exporter/0.0.1/questions.yml @@ -0,0 +1 @@ +rancher_min_version: 2.6.0-rc1 diff --git a/charts/rancher-blackbox-exporter/0.0.1/templates/_helpers.tpl b/charts/rancher-blackbox-exporter/0.0.1/templates/_helpers.tpl new file mode 100644 index 00000000..3f5120c4 --- /dev/null +++ b/charts/rancher-blackbox-exporter/0.0.1/templates/_helpers.tpl @@ -0,0 +1,12 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} + +{{- define "system_default_registry" -}} +{{- if .Values.global.systemDefaultRegistry -}} +{{- printf "%s/" .Values.global.systemDefaultRegistry -}} +{{- else -}} +{{- "" -}} +{{- end -}} +{{- end -}} diff --git a/charts/rancher-blackbox-exporter/0.0.1/templates/configmap-dashboard.yaml b/charts/rancher-blackbox-exporter/0.0.1/templates/configmap-dashboard.yaml new file mode 100644 index 00000000..8ca0a2aa --- /dev/null +++ b/charts/rancher-blackbox-exporter/0.0.1/templates/configmap-dashboard.yaml @@ -0,0 +1,14 @@ +{{- $files := .Files.Glob "files/rancher-ssl-certificate-monitor.json" }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: cattle-dashboards + name: rancher-blackbox-exporter-dashboards + labels: + chart: {{ .Chart.Name }} + release: {{ .Release.Name }} + grafana_dashboard: "1" +data: +{{- range $path, $fileContents := $files }} + ssl-certificate-monitor.json: {{ $.Files.Get $path | toJson }} +{{- end }} diff --git a/charts/rancher-blackbox-exporter/0.0.1/templates/configmap.yaml b/charts/rancher-blackbox-exporter/0.0.1/templates/configmap.yaml new file mode 100644 index 00000000..ad2c1e4f --- /dev/null +++ b/charts/rancher-blackbox-exporter/0.0.1/templates/configmap.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: blackbox-exporter + labels: + chart: {{ .Chart.Name }} + release: {{ .Release.Name }} +data: + config.yml: |- + modules: + http_2xx: + prober: http + http: + preferred_ip_protocol: "ip4" + tls_config: + insecure_skip_verify: true + diff --git a/charts/rancher-blackbox-exporter/0.0.1/templates/deployment.yaml b/charts/rancher-blackbox-exporter/0.0.1/templates/deployment.yaml new file mode 100644 index 00000000..ef92017b --- /dev/null +++ b/charts/rancher-blackbox-exporter/0.0.1/templates/deployment.yaml @@ -0,0 +1,49 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + chart: {{ .Chart.Name }} + release: {{ .Release.Name }} + name: {{ .Chart.Name }} +spec: + replicas: {{ .Values.replicas }} + selector: + matchLabels: + chart: {{ .Chart.Name }} + release: {{ .Release.Name }} + template: + metadata: + labels: + chart: {{ .Chart.Name }} + release: {{ .Release.Name }} + spec: + containers: + - name: blackbox-exporter + image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }} + ports: + - containerPort: {{ .Values.port }} + name: http + volumeMounts: + - name: config + mountPath: /etc/blackbox_exporter/ +{{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} +{{- end }} +{{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} +{{- end }} +{{- if .Values.tolerations }} + tolerations: +{{ toYaml .Values.tolerations | indent 10 }} +{{- end }} +{{- if .Values.resources }} + resources: +{{ toYaml .Values.resources | indent 12 }} +{{- end }} + volumes: + - name: config + configMap: + name: blackbox-exporter + defaultMode: 420 diff --git a/charts/rancher-blackbox-exporter/0.0.1/templates/probe.yaml b/charts/rancher-blackbox-exporter/0.0.1/templates/probe.yaml new file mode 100644 index 00000000..c63189f2 --- /dev/null +++ b/charts/rancher-blackbox-exporter/0.0.1/templates/probe.yaml @@ -0,0 +1,20 @@ +apiVersion: monitoring.coreos.com/v1 +kind: Probe +metadata: + name: {{ .Chart.Name }} + labels: + chart: {{ .Chart.Name }} + release: rancher-monitoring +spec: + jobName: {{ .Chart.Name }}-probe + module: http_2xx + prober: + path: /probe + scheme: http + url: {{ .Chart.Name }}.{{ .Release.Namespace }}.svc:{{ .Values.port }} + targets: + staticConfig: + static: + {{- range .Values.staticUrl }} + - {{ . }} + {{- end }} diff --git a/charts/rancher-blackbox-exporter/0.0.1/templates/prometheusrule.yaml b/charts/rancher-blackbox-exporter/0.0.1/templates/prometheusrule.yaml new file mode 100644 index 00000000..f7ad20c3 --- /dev/null +++ b/charts/rancher-blackbox-exporter/0.0.1/templates/prometheusrule.yaml @@ -0,0 +1,16 @@ +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ .Chart.Name }} +spec: + groups: + - name: ssl_expiry + rules: + - alert: Ssl Cert Will Expire in 30 days + annotations: + summary: "SSL certificate will expire soon on (instance {{ $labels.instance }})" + description: "SSL certificate expires in 30 days\n VALUE = {{ $value }}\n LABELS: {{ $labels }}" + expr: probe_ssl_earliest_cert_expiry - time() < 86400 * 30 + for: 300s + labels: + severity: warning diff --git a/charts/rancher-blackbox-exporter/0.0.1/templates/service.yaml b/charts/rancher-blackbox-exporter/0.0.1/templates/service.yaml new file mode 100644 index 00000000..7df4dc72 --- /dev/null +++ b/charts/rancher-blackbox-exporter/0.0.1/templates/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }} + labels: + chart: {{ .Chart.Name }} + release: {{ .Release.Name }} +spec: + type: ClusterIP + selector: + chart: {{ .Chart.Name }} + release: {{ .Release.Name }} + ports: + - name: http + port: {{ .Values.port }} + targetPort: {{ .Values.port }} diff --git a/charts/rancher-blackbox-exporter/0.0.1/templates/servicemonitor.yaml b/charts/rancher-blackbox-exporter/0.0.1/templates/servicemonitor.yaml new file mode 100644 index 00000000..975c00cb --- /dev/null +++ b/charts/rancher-blackbox-exporter/0.0.1/templates/servicemonitor.yaml @@ -0,0 +1,22 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ .Chart.Name }} + labels: + chart: {{ .Chart.Name }} + release: {{ .Release.Name }} +spec: + selector: + matchLabels: + chart: {{ .Chart.Name }} + release: {{ .Release.Name }} + endpoints: + - interval: 30s + params: + module: + - http_2xx + target: + - prometheus.io + path: /probe + port: http + scheme: http diff --git a/charts/rancher-blackbox-exporter/0.0.1/values.yaml b/charts/rancher-blackbox-exporter/0.0.1/values.yaml new file mode 100644 index 00000000..67f62d12 --- /dev/null +++ b/charts/rancher-blackbox-exporter/0.0.1/values.yaml @@ -0,0 +1,21 @@ +enabled: false +image: + repository: "cnrancher/mirrored-prom-blackbox-exporter" + tag: v0.24.0 +replicas: 1 +resources: + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 100m + memory: 128Mi +nodeSelector: {} +tolerations: {} +affinity: {} +port: 9115 +staticUrl: +- https://kubernetes.default.svc:443 + +global: + systemDefaultRegistry: "" diff --git a/index.yaml b/index.yaml index f0a4bcd0..e813a47b 100755 --- a/index.yaml +++ b/index.yaml @@ -299,6 +299,23 @@ entries: urls: - assets/rancher-aks-operator-crd/rancher-aks-operator-crd-100.0.5+up1.0.6.tgz version: 100.0.5+up1.0.6 + rancher-blackbox-exporter: + - annotations: + catalog.cattle.io/kube-version: '>= 1.20.0-0' + catalog.cattle.io/namespace: cattle-monitoring-system + catalog.cattle.io/rancher-version: '>= 2.6.0-0' + catalog.cattle.io/release-name: rancher-blackbox-exporter + catalog.cattle.io/type: cluster-tool + apiVersion: v2 + created: "2023-05-26T18:19:01.020763+08:00" + description: Blackbox Exporter for Prometheus + digest: 32eee18f9499967575c8e3335faaf8b284701c8082b4d105dab4c22822c983b4 + keywords: + - prometheus + name: rancher-blackbox-exporter + urls: + - assets/rancher-blackbox-exporter/rancher-blackbox-exporter-0.0.1.tgz + version: 0.0.1 rancher-gpu-management: - annotations: catalog.cattle.io/kube-version: '>= 1.18.0-0'