Skip to content

Commit

Permalink
Update: Refactoring labels and dashboards (#502)
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
  • Loading branch information
nlamirault committed Aug 7, 2023
1 parent 068574a commit 0cb8c7e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
12 changes: 2 additions & 10 deletions charts/coredns-mixin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,7 @@ keywords:
- prometheus
- monitoring-mixin
- portefaix

# 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

# 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.
version: 1.3.0
appVersion: 1.0.0

maintainers:
Expand All @@ -61,4 +53,4 @@ annotations:
url: https://keybase.io/nlamirault/pgp_keys.asc
artifacthub.io/changes: |
- kind: changed
description: coredns-mixin vmaster
description: Refactoring labels and dashboard management
4 changes: 2 additions & 2 deletions charts/coredns-mixin/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coredns-mixin

![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
![Version: 1.3.0](https://img.shields.io/badge/Version-1.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)

A Helm chart for CoreDNS Mixin

Expand All @@ -27,4 +27,4 @@ A Helm chart for CoreDNS Mixin
| monitor.additionalLabels | object | `{}` | Additional labels to add to resources managed by the Prometheus Operator |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.8.1](https://github.com/norwoodj/helm-docs/releases/v1.8.1)
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Original file line number Diff line number Diff line change
Expand Up @@ -1470,4 +1470,4 @@
"title": "Kubernetes / CoreDNS",
"uid": "thael1rie7ohG6OY3eMeisahtee2iGoo1gooGhuu",
"version": 0
}
}
20 changes: 19 additions & 1 deletion charts/coredns-mixin/templates/configmap-dashboards.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
# Copyright (C) Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

---
{{- $files := .Files.Glob "dashboards/*.json" }}
{{- if $files }}
apiVersion: v1
kind: ConfigMapList
metadata:
name: coredns-dashboards
items:
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
Expand All @@ -18,7 +36,7 @@ items:
grafana-dashboard: {{ $dashboardName }}
{{- include "coredns-mixin.labels" $ | indent 6 }}
data:
{{ $dashboardName }}.json: |-
{{ printf "coredns-mixin-%s" $dashboardName }}.json: |-
{{ $.Files.Get $path | indent 6}}
{{- end }}
{{- end }}

0 comments on commit 0cb8c7e

Please sign in to comment.