Skip to content

Commit

Permalink
Update: monitoring mixins set to v1.12.0 for kube-state-metrics-mixin (
Browse files Browse the repository at this point in the history
…#935)

Signed-off-by: Nicolas Lamirault <nlamirault@users.noreply.github.com>
Co-authored-by: Nicolas Lamirault <nlamirault@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and nlamirault authored Nov 23, 2024
1 parent 0c37fe4 commit 591387d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 8 deletions.
6 changes: 3 additions & 3 deletions charts/kube-state-metrics-mixin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ keywords:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.2.0
version: 1.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 2.10.1
appVersion: 2.13.0

maintainers:
- name: nlamirault
Expand All @@ -60,4 +60,4 @@ annotations:
url: https://keybase.io/nlamirault/pgp_keys.asc
artifacthub.io/changes: |
- kind: changed
description: kube-state-metrics-mixin v2.10.1
description: kube-state-metrics-mixin v2.13.0
3 changes: 3 additions & 0 deletions charts/kube-state-metrics-mixin/templates/alerts.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.monitor.enabled -}}
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
Expand All @@ -8,6 +9,7 @@ metadata:
{{- include "kube-state-metrics-mixin.annotations" . | indent 4 }}
labels:
{{- include "kube-state-metrics-mixin.labels" . | indent 4 }}
app.kubernetes.io/component: metrics
{{- if .Values.monitor.additionalLabels }}
{{- toYaml .Values.monitor.additionalLabels | nindent 4 }}
{{- end }}
Expand Down Expand Up @@ -60,3 +62,4 @@ spec:
for: 15m
labels:
severity: critical
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,24 +1,50 @@
---
{{ if .Values.grafanaDashboard.enabled -}}
{{- $files := .Files.Glob "dashboards/*.json" }}
{{- if $files }}
---
apiVersion: v1
kind: ConfigMapList
items:
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" | lower }}
- apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "dashboard-kube-state-metrics-mixin-%s" $dashboardName | trunc 63 | trimSuffix "-" }}
namespace: {{ include "kube-state-metrics-mixin.namespace" $ }}
annotations:
grafana-folder: {{ $.Values.grafana.folder }}
grafana-folder: {{ $.Values.grafanaDashboard.folder }}
{{- include "kube-state-metrics-mixin.annotations" $ | indent 6 }}
labels:
grafana-dashboard: {{ $dashboardName }}
{{- include "kube-state-metrics-mixin.labels" $ | indent 6 }}
app.kubernetes.io/component: dashboard
name: {{ printf "dashboard-%s" $dashboardName | trunc 63 | trimSuffix "-" }}
namespace: {{ include "kube-state-metrics-mixin.namespace" $ }}
data:
{{ $dashboardName }}.json: |-
{{ $.Files.Get $path | indent 6}}
{{- end }}
{{ if $.Values.grafanaDashboard.grafanaOperator.enabled -}}
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
---
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDashboard
metadata:
labels:
{{- include "kube-state-metrics-mixin.labels" $ | indent 4 }}
app.kubernetes.io/component: dashboard
name: {{ printf "%s" $dashboardName | trunc 63 | trimSuffix "-" | lower }}
namespace: {{ $.Release.Namespace }}
spec:
allowCrossNamespaceImport: {{ $.Values.grafanaDashboard.grafanaOperator.allowCrossNamespaceImport }}
folder: {{ $.Values.grafanaDashboard.folder }}
instanceSelector:
matchLabels:
{{- toYaml $.Values.grafanaDashboard.grafanaOperator.matchLabels | nindent 6 }}
configMapRef:
name: {{ printf "dashboard-%s" $dashboardName | trunc 63 | trimSuffix "-" }}
key: {{ $dashboardName }}.json
{{- end }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 591387d

Please sign in to comment.