diff --git a/charts/kubernetes-mixin/Chart.yaml b/charts/kubernetes-mixin/Chart.yaml index 1851e450..3f6d8cae 100644 --- a/charts/kubernetes-mixin/Chart.yaml +++ b/charts/kubernetes-mixin/Chart.yaml @@ -28,7 +28,7 @@ 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: 0.1.0 +version: 0.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 diff --git a/charts/kubernetes-mixin/README.md b/charts/kubernetes-mixin/README.md index 6b037621..4c3b4664 100644 --- a/charts/kubernetes-mixin/README.md +++ b/charts/kubernetes-mixin/README.md @@ -1,6 +1,6 @@ # kubernetes-mixin -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.8.0](https://img.shields.io/badge/AppVersion-0.8.0-informational?style=flat-square) +![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.8.0](https://img.shields.io/badge/AppVersion-0.8.0-informational?style=flat-square) A Helm chart for Kubernetes Mixin @@ -23,6 +23,7 @@ A Helm chart for Kubernetes Mixin | additionalAnnotations | object | `{}` | Additional annotations to add to the Prometheus rules | | additionalLabels | object | `{}` | Additional labels to add to the Prometheus rules | | fullnameOverride | string | `""` | Provide a name to substitute for the full names of resources | +| grafana.folder | string | `"kubernetes"` | | ---------------------------------------------- Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0) diff --git a/charts/kubernetes-mixin/templates/configmap-apiserver.yaml b/charts/kubernetes-mixin/templates/configmap-apiserver.yaml index 0c8e4910..c46535c3 100644 --- a/charts/kubernetes-mixin/templates/configmap-apiserver.yaml +++ b/charts/kubernetes-mixin/templates/configmap-apiserver.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-apiserver + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-apiserver data: apiserver.json: |- {{ .Files.Get "dashboards/apiserver.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-cluster-total.yaml b/charts/kubernetes-mixin/templates/configmap-cluster-total.yaml index 42def86e..b3f33e4e 100644 --- a/charts/kubernetes-mixin/templates/configmap-cluster-total.yaml +++ b/charts/kubernetes-mixin/templates/configmap-cluster-total.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-cluster-total + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-cluster-total data: cluster-total.json: |- {{ .Files.Get "dashboards/cluster-total.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-controller-manager.yaml b/charts/kubernetes-mixin/templates/configmap-controller-manager.yaml index 5e0c7f57..52673b1d 100644 --- a/charts/kubernetes-mixin/templates/configmap-controller-manager.yaml +++ b/charts/kubernetes-mixin/templates/configmap-controller-manager.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-controller-manager + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-controller-manager data: controller-manager.json: |- {{ .Files.Get "dashboards/controller-manager.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-k8s-resources-cluster.yaml b/charts/kubernetes-mixin/templates/configmap-k8s-resources-cluster.yaml index d6d19ac8..62b8bdfe 100644 --- a/charts/kubernetes-mixin/templates/configmap-k8s-resources-cluster.yaml +++ b/charts/kubernetes-mixin/templates/configmap-k8s-resources-cluster.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-k8s-resources-cluster + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-k8s-resources-cluster data: k8s-resources-cluster.json: |- {{ .Files.Get "dashboards/k8s-resources-cluster.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-k8s-resources-namespace.yaml b/charts/kubernetes-mixin/templates/configmap-k8s-resources-namespace.yaml index c29dd64e..50440f15 100644 --- a/charts/kubernetes-mixin/templates/configmap-k8s-resources-namespace.yaml +++ b/charts/kubernetes-mixin/templates/configmap-k8s-resources-namespace.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-k8s-resources-namespace + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-k8s-resources-namespace data: k8s-resources-namespace.json: |- {{ .Files.Get "dashboards/k8s-resources-namespace.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-k8s-resources-node.yaml b/charts/kubernetes-mixin/templates/configmap-k8s-resources-node.yaml index 18c78730..2f76ecf9 100644 --- a/charts/kubernetes-mixin/templates/configmap-k8s-resources-node.yaml +++ b/charts/kubernetes-mixin/templates/configmap-k8s-resources-node.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-k8s-resources-node + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-k8s-resources-node data: k8s-resources-node.json: |- {{ .Files.Get "dashboards/k8s-resources-node.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-k8s-resources-pod.yaml b/charts/kubernetes-mixin/templates/configmap-k8s-resources-pod.yaml index 3d51b990..a447e2d6 100644 --- a/charts/kubernetes-mixin/templates/configmap-k8s-resources-pod.yaml +++ b/charts/kubernetes-mixin/templates/configmap-k8s-resources-pod.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-k8s-resources-pod + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-k8s-resources-pod data: k8s-resources-pod.json: |- {{ .Files.Get "dashboards/k8s-resources-pod.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-k8s-resources-workload.yaml b/charts/kubernetes-mixin/templates/configmap-k8s-resources-workload.yaml index c3f2131b..0c77d5ba 100644 --- a/charts/kubernetes-mixin/templates/configmap-k8s-resources-workload.yaml +++ b/charts/kubernetes-mixin/templates/configmap-k8s-resources-workload.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-k8s-resources-workload + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-k8s-resources-workload data: k8s-resources-workload.json: |- {{ .Files.Get "dashboards/k8s-resources-workload.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-k8s-resources-workloads-namespace.yaml b/charts/kubernetes-mixin/templates/configmap-k8s-resources-workloads-namespace.yaml index 683fce7e..91a6a209 100644 --- a/charts/kubernetes-mixin/templates/configmap-k8s-resources-workloads-namespace.yaml +++ b/charts/kubernetes-mixin/templates/configmap-k8s-resources-workloads-namespace.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-k8s-resources-workloads-namespace + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-k8s-resources-workloads-namespace data: k8s-resources-workloads-namespace.json: |- {{ .Files.Get "dashboards/k8s-resources-workloads-namespace.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-kubelet.yaml b/charts/kubernetes-mixin/templates/configmap-kubelet.yaml index d50ce82d..62c39123 100644 --- a/charts/kubernetes-mixin/templates/configmap-kubelet.yaml +++ b/charts/kubernetes-mixin/templates/configmap-kubelet.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-kubelet + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-kubelet data: kubelet.json: |- {{ .Files.Get "dashboards/kubelet.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-namespace-by-pod.yaml b/charts/kubernetes-mixin/templates/configmap-namespace-by-pod.yaml index a7686e54..4b52f752 100644 --- a/charts/kubernetes-mixin/templates/configmap-namespace-by-pod.yaml +++ b/charts/kubernetes-mixin/templates/configmap-namespace-by-pod.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-namespace-by-pod + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-namespace-by-pod data: namespace-by-pod.json: |- {{ .Files.Get "dashboards/namespace-by-pod.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-namespace-by-workload.yaml b/charts/kubernetes-mixin/templates/configmap-namespace-by-workload.yaml index 1a77728c..1d18452c 100644 --- a/charts/kubernetes-mixin/templates/configmap-namespace-by-workload.yaml +++ b/charts/kubernetes-mixin/templates/configmap-namespace-by-workload.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-namespace-by-workload + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-namespace-by-workload data: namespace-by-workload.json: |- {{ .Files.Get "dashboards/namespace-by-workload.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-persistentvolumesusage.yaml b/charts/kubernetes-mixin/templates/configmap-persistentvolumesusage.yaml index eb837dfa..92d5714f 100644 --- a/charts/kubernetes-mixin/templates/configmap-persistentvolumesusage.yaml +++ b/charts/kubernetes-mixin/templates/configmap-persistentvolumesusage.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-persistentvolumesusage + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-persistentvolumesusage data: persistentvolumesusage.json: |- {{ .Files.Get "dashboards/persistentvolumesusage.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-pod-total.yaml b/charts/kubernetes-mixin/templates/configmap-pod-total.yaml index d1505ad4..f6c4b66c 100644 --- a/charts/kubernetes-mixin/templates/configmap-pod-total.yaml +++ b/charts/kubernetes-mixin/templates/configmap-pod-total.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-pod-total + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-pod-total data: pod-total.json: |- {{ .Files.Get "dashboards/pod-total.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-proxy.yaml b/charts/kubernetes-mixin/templates/configmap-proxy.yaml index d2e57e5b..2bc32dc6 100644 --- a/charts/kubernetes-mixin/templates/configmap-proxy.yaml +++ b/charts/kubernetes-mixin/templates/configmap-proxy.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-proxy + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-proxy data: proxy.json: |- {{ .Files.Get "dashboards/proxy.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-scheduler.yaml b/charts/kubernetes-mixin/templates/configmap-scheduler.yaml index f9f69ee6..dc7a9f24 100644 --- a/charts/kubernetes-mixin/templates/configmap-scheduler.yaml +++ b/charts/kubernetes-mixin/templates/configmap-scheduler.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-scheduler + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-scheduler data: scheduler.json: |- {{ .Files.Get "dashboards/scheduler.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-statefulset.yaml b/charts/kubernetes-mixin/templates/configmap-statefulset.yaml index 68cab022..23a3db33 100644 --- a/charts/kubernetes-mixin/templates/configmap-statefulset.yaml +++ b/charts/kubernetes-mixin/templates/configmap-statefulset.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-statefulset + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-statefulset data: statefulset.json: |- {{ .Files.Get "dashboards/statefulset.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/templates/configmap-workload-total.yaml b/charts/kubernetes-mixin/templates/configmap-workload-total.yaml index bdb413fb..c0b523cf 100644 --- a/charts/kubernetes-mixin/templates/configmap-workload-total.yaml +++ b/charts/kubernetes-mixin/templates/configmap-workload-total.yaml @@ -9,13 +9,14 @@ metadata: {{- if .Values.additionalAnnotations }} {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} + grafana/folder: {{ .Values.grafana.folder }} labels: app: {{ include "kubernetes-mixin.name" . }} {{ include "kubernetes-mixin.labels" . | indent 4 }} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels | indent 4 }} {{- end }} - grafana-dashboard: {{ include "kubernetes-mixin.name" . }}-workload-total + grafana/dashboard: {{ include "kubernetes-mixin.name" . }}-workload-total data: workload-total.json: |- {{ .Files.Get "dashboards/workload-total.json" | indent 4}} \ No newline at end of file diff --git a/charts/kubernetes-mixin/values.yaml b/charts/kubernetes-mixin/values.yaml index 147fd1ab..7a9c02da 100644 --- a/charts/kubernetes-mixin/values.yaml +++ b/charts/kubernetes-mixin/values.yaml @@ -10,3 +10,7 @@ additionalLabels: {} # -- Additional annotations to add to the Prometheus rules additionalAnnotations: {} + +grafana: + # Grafana folder in which to store the dashboards + folder: kubernetes diff --git a/hack/mixins/mixin_dashboard.tpl b/hack/mixins/mixin_dashboard.tpl new file mode 100644 index 00000000..28d32036 --- /dev/null +++ b/hack/mixins/mixin_dashboard.tpl @@ -0,0 +1,20 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-%s" (include "__mixin__.fullname" .) "__name__" | trunc 63 | trimSuffix "-" }} + namespace: {{ include "__mixin__.namespace" . }} + annotations: +{{ include "__mixin__.annotations" . | indent 4 }} +{{- if .Values.additionalAnnotations }} +{{ toYaml .Values.additionalAnnotations | indent 4 }} +{{- end }} + grafana/folder: {{ .Values.grafana.folder }} + labels: + app: {{ include "__mixin__.name" . }} +{{ include "__mixin__.labels" . | indent 4 }} +{{- if .Values.additionalLabels }} +{{ toYaml .Values.additionalLabels | indent 4 }} +{{- end }} + grafana/dashboard: {{ include "__mixin__.name" . }}-__name__ +data: diff --git a/hack/mixins/mixin_prom.tpl b/hack/mixins/mixin_prom.tpl new file mode 100644 index 00000000..a6c100d9 --- /dev/null +++ b/hack/mixins/mixin_prom.tpl @@ -0,0 +1,18 @@ +--- +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "__mixin__.fullname" .) "__name__" | trunc 63 | trimSuffix "-" }} + namespace: {{ include "__mixin__.namespace" . }} + annotations: +{{ include "__mixin__.annotations" . | indent 4 }} +{{- if .Values.additionalAnnotations }} +{{ toYaml .Values.additionalAnnotations | indent 4 }} +{{- end }} + labels: + app: {{ include "__mixin__.name" . }} +{{ include "__mixin__.labels" . | indent 4 }} +{{- if .Values.additionalLabels }} +{{ toYaml .Values.additionalLabels | indent 4 }} +{{- end }} +spec: