From bca250223fa3b256139372c37a9c210e3dbfcb0a Mon Sep 17 00:00:00 2001 From: Herve Nicol <12008875+hervenicol@users.noreply.github.com> Date: Mon, 9 Oct 2023 16:33:53 +0200 Subject: [PATCH] move public and private dashboards to separate sub-charts --- helm/dashboards/Chart.lock | 12 +++ helm/dashboards/Chart.yaml | 7 ++ .../charts/private_dashboards_al/Chart.yaml | 11 +++ .../shared/private/api-performance.json | 0 .../shared/private/api-security.json | 0 .../shared/private/cert-operator.json | 0 .../shared/private/certificate-requests.json | 0 .../shared/private/certificates-details.json | 0 .../shared/private/certificates.json | 0 .../dashboards/shared/private/conntrack.json | 0 .../shared/private/credentials.json | 0 .../dashboards/shared/private/crossplane.json | 0 .../dashboards/shared/private/crsync.json | 0 .../shared/private/etcd-backup.json | 0 .../shared/private/etcd-health.json | 0 .../etcd-k8s-events-and-resources-count.json | 0 .../dashboards/shared/private/etcd.json | 0 .../shared/private/external-dns.json | 0 .../shared/private/external-secrets.json | 0 .../dashboards/shared/private/fluentbit.json | 0 .../dashboards/shared/private/grafana.json | 0 .../private/k8s-core-components-errors.json | 0 .../dashboards/shared/private/kubelet.json | 0 .../shared/private/kubernetes-api-uptime.json | 0 .../dashboards/shared/private/kubernetes.json | 0 .../shared/private/kyverno-health.json | 0 .../dashboards/shared/private/logging.json | 0 .../shared/private/loki-chunks.json | 0 .../shared/private/loki-cost-estimation.json | 0 .../shared/private/loki-deletion.json | 0 .../dashboards/shared/private/loki-logs.json | 0 .../private/loki-mixin-recording-rules.json | 0 .../shared/private/loki-operational.json | 0 .../shared/private/loki-reads-resources.json | 0 .../dashboards/shared/private/loki-reads.json | 0 .../shared/private/loki-retention.json | 0 .../shared/private/loki-writes-resources.json | 0 .../shared/private/loki-writes.json | 0 .../templates/_helpers.tpl | 29 ++++++ .../templates/configmap-dashboards.yaml | 90 +++++++++++++++++++ .../charts/private_dashboards_mz/Chart.yaml | 11 +++ .../private/managed-apps-efk-stack-app.json | 0 .../private/management-cluster-falco.json | 0 .../management-cluster-kubernetes.json | 0 .../private/management-cluster-overview.json | 0 .../private/management-cluster-starboard.json | 0 .../shared/private/microstorage.json | 0 .../shared/private/mimir-cost-estimate.json | 0 .../shared/private/net-exporter.json | 0 .../private/network-anomaly-detection.json | 0 .../dashboards/shared/private/network.json | 0 .../nginx-connection-distribution.json | 0 .../shared/private/operatorkit.json | 0 .../shared/private/persistentvolume.json | 0 .../shared/private/prometheus-benchmark.json | 0 .../private/prometheus-cost-estimation.json | 0 .../private/prometheus-mimir-comparative.json | 0 .../shared/private/prometheus-opsrecipe.json | 0 .../shared/private/prometheus-overview.json | 0 .../dashboards/shared/private/releases.json | 0 .../shared/private/team-firecracker.json | 0 .../private/workload-cluster-kubernetes.json | 0 .../templates/_helpers.tpl | 29 ++++++ .../templates/configmap-dashboards.yaml | 90 +++++++++++++++++++ .../charts/public_dashboards/Chart.yaml | 14 +++ .../shared/public/alertmanager-overview.json | 0 .../dashboards/shared/public/alerts.json | 0 .../dashboards/shared/public/api-audit.json | 0 .../shared/public/capi-overview.json | 0 .../dashboards/shared/public/cilium.json | 0 .../dashboards/shared/public/dex.json | 0 .../dashboards/shared/public/dns.json | 0 .../shared/public/flux-cluster.json | 0 .../shared/public/flux-control-plane.json | 0 .../public/kong-connection-distribution.json | 0 .../public/kong-ingress-controller.json | 0 .../shared/public/kong-official.json | 0 .../shared/public/managed-apps.json | 0 .../dashboards/shared/public/nginx.json | 0 .../shared/public/nodes-overview.json | 0 .../shared/public/pod-request-vs-usage.json | 0 .../public/prometheus-availability.json | 0 .../public/prometheus-remote-write.json | 0 .../dashboards/shared/public/prometheus.json | 0 .../shared/public/webhook-health.json | 0 .../shared/public/webhooks-performance.json | 0 .../public_dashboards/templates/_helpers.tpl | 29 ++++++ .../templates/configmap-dashboards.yaml | 90 +++++++++++++++++++ helm/dashboards/values.yaml | 87 ++++++++++++++++++ 89 files changed, 499 insertions(+) create mode 100644 helm/dashboards/Chart.lock create mode 100644 helm/dashboards/charts/private_dashboards_al/Chart.yaml rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/api-performance.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/api-security.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/cert-operator.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/certificate-requests.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/certificates-details.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/certificates.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/conntrack.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/credentials.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/crossplane.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/crsync.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/etcd-backup.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/etcd-health.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/etcd-k8s-events-and-resources-count.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/etcd.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/external-dns.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/external-secrets.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/fluentbit.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/grafana.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/k8s-core-components-errors.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/kubelet.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/kubernetes-api-uptime.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/kubernetes.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/kyverno-health.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/logging.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/loki-chunks.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/loki-cost-estimation.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/loki-deletion.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/loki-logs.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/loki-mixin-recording-rules.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/loki-operational.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/loki-reads-resources.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/loki-reads.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/loki-retention.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/loki-writes-resources.json (100%) rename helm/dashboards/{ => charts/private_dashboards_al}/dashboards/shared/private/loki-writes.json (100%) create mode 100644 helm/dashboards/charts/private_dashboards_al/templates/_helpers.tpl create mode 100644 helm/dashboards/charts/private_dashboards_al/templates/configmap-dashboards.yaml create mode 100644 helm/dashboards/charts/private_dashboards_mz/Chart.yaml rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/managed-apps-efk-stack-app.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/management-cluster-falco.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/management-cluster-kubernetes.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/management-cluster-overview.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/management-cluster-starboard.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/microstorage.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/mimir-cost-estimate.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/net-exporter.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/network-anomaly-detection.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/network.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/nginx-connection-distribution.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/operatorkit.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/persistentvolume.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/prometheus-benchmark.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/prometheus-cost-estimation.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/prometheus-mimir-comparative.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/prometheus-opsrecipe.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/prometheus-overview.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/releases.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/team-firecracker.json (100%) rename helm/dashboards/{ => charts/private_dashboards_mz}/dashboards/shared/private/workload-cluster-kubernetes.json (100%) create mode 100644 helm/dashboards/charts/private_dashboards_mz/templates/_helpers.tpl create mode 100644 helm/dashboards/charts/private_dashboards_mz/templates/configmap-dashboards.yaml create mode 100644 helm/dashboards/charts/public_dashboards/Chart.yaml rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/alertmanager-overview.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/alerts.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/api-audit.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/capi-overview.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/cilium.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/dex.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/dns.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/flux-cluster.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/flux-control-plane.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/kong-connection-distribution.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/kong-ingress-controller.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/kong-official.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/managed-apps.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/nginx.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/nodes-overview.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/pod-request-vs-usage.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/prometheus-availability.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/prometheus-remote-write.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/prometheus.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/webhook-health.json (100%) rename helm/dashboards/{ => charts/public_dashboards}/dashboards/shared/public/webhooks-performance.json (100%) create mode 100644 helm/dashboards/charts/public_dashboards/templates/_helpers.tpl create mode 100644 helm/dashboards/charts/public_dashboards/templates/configmap-dashboards.yaml diff --git a/helm/dashboards/Chart.lock b/helm/dashboards/Chart.lock new file mode 100644 index 00000000..18b5e49f --- /dev/null +++ b/helm/dashboards/Chart.lock @@ -0,0 +1,12 @@ +dependencies: +- name: public_dashboards + repository: "" + version: 1.0.0 +- name: private_dashboards_al + repository: "" + version: 1.0.0 +- name: private_dashboards_mz + repository: "" + version: 1.0.0 +digest: sha256:70e15e8c0291ae2b93b05321e0c909ee9987dcb5c2149aa1d61093555a12c331 +generated: "2023-10-09T17:22:22.796321595+02:00" diff --git a/helm/dashboards/Chart.yaml b/helm/dashboards/Chart.yaml index e5970127..3a25e68e 100644 --- a/helm/dashboards/Chart.yaml +++ b/helm/dashboards/Chart.yaml @@ -9,3 +9,10 @@ version: [[ .Version ]] annotations: application.giantswarm.io/team: "atlas" config.giantswarm.io/version: 1.x.x +dependencies: + - name: public_dashboards + version: 1.0.0 + - name: private_dashboards_al + version: 1.0.0 + - name: private_dashboards_mz + version: 1.0.0 diff --git a/helm/dashboards/charts/private_dashboards_al/Chart.yaml b/helm/dashboards/charts/private_dashboards_al/Chart.yaml new file mode 100644 index 00000000..cae41487 --- /dev/null +++ b/helm/dashboards/charts/private_dashboards_al/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +description: Grafana dashboards accessible by Giant Swarm customers +engine: gotpl +home: https://github.com/giantswarm/dashboards +icon: https://s.giantswarm.io/app-icons/grafana/1/light.svg +name: private_dashboards_al +appVersion: 1.0.0 +version: 1.0.0 +annotations: + application.giantswarm.io/team: "atlas" + config.giantswarm.io/version: 1.x.x diff --git a/helm/dashboards/dashboards/shared/private/api-performance.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/api-performance.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/api-performance.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/api-performance.json diff --git a/helm/dashboards/dashboards/shared/private/api-security.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/api-security.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/api-security.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/api-security.json diff --git a/helm/dashboards/dashboards/shared/private/cert-operator.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/cert-operator.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/cert-operator.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/cert-operator.json diff --git a/helm/dashboards/dashboards/shared/private/certificate-requests.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/certificate-requests.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/certificate-requests.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/certificate-requests.json diff --git a/helm/dashboards/dashboards/shared/private/certificates-details.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/certificates-details.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/certificates-details.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/certificates-details.json diff --git a/helm/dashboards/dashboards/shared/private/certificates.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/certificates.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/certificates.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/certificates.json diff --git a/helm/dashboards/dashboards/shared/private/conntrack.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/conntrack.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/conntrack.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/conntrack.json diff --git a/helm/dashboards/dashboards/shared/private/credentials.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/credentials.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/credentials.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/credentials.json diff --git a/helm/dashboards/dashboards/shared/private/crossplane.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/crossplane.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/crossplane.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/crossplane.json diff --git a/helm/dashboards/dashboards/shared/private/crsync.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/crsync.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/crsync.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/crsync.json diff --git a/helm/dashboards/dashboards/shared/private/etcd-backup.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/etcd-backup.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/etcd-backup.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/etcd-backup.json diff --git a/helm/dashboards/dashboards/shared/private/etcd-health.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/etcd-health.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/etcd-health.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/etcd-health.json diff --git a/helm/dashboards/dashboards/shared/private/etcd-k8s-events-and-resources-count.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/etcd-k8s-events-and-resources-count.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/etcd-k8s-events-and-resources-count.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/etcd-k8s-events-and-resources-count.json diff --git a/helm/dashboards/dashboards/shared/private/etcd.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/etcd.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/etcd.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/etcd.json diff --git a/helm/dashboards/dashboards/shared/private/external-dns.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/external-dns.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/external-dns.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/external-dns.json diff --git a/helm/dashboards/dashboards/shared/private/external-secrets.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/external-secrets.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/external-secrets.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/external-secrets.json diff --git a/helm/dashboards/dashboards/shared/private/fluentbit.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/fluentbit.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/fluentbit.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/fluentbit.json diff --git a/helm/dashboards/dashboards/shared/private/grafana.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/grafana.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/grafana.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/grafana.json diff --git a/helm/dashboards/dashboards/shared/private/k8s-core-components-errors.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/k8s-core-components-errors.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/k8s-core-components-errors.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/k8s-core-components-errors.json diff --git a/helm/dashboards/dashboards/shared/private/kubelet.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/kubelet.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/kubelet.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/kubelet.json diff --git a/helm/dashboards/dashboards/shared/private/kubernetes-api-uptime.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/kubernetes-api-uptime.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/kubernetes-api-uptime.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/kubernetes-api-uptime.json diff --git a/helm/dashboards/dashboards/shared/private/kubernetes.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/kubernetes.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/kubernetes.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/kubernetes.json diff --git a/helm/dashboards/dashboards/shared/private/kyverno-health.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/kyverno-health.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/kyverno-health.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/kyverno-health.json diff --git a/helm/dashboards/dashboards/shared/private/logging.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/logging.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/logging.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/logging.json diff --git a/helm/dashboards/dashboards/shared/private/loki-chunks.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-chunks.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/loki-chunks.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-chunks.json diff --git a/helm/dashboards/dashboards/shared/private/loki-cost-estimation.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-cost-estimation.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/loki-cost-estimation.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-cost-estimation.json diff --git a/helm/dashboards/dashboards/shared/private/loki-deletion.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-deletion.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/loki-deletion.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-deletion.json diff --git a/helm/dashboards/dashboards/shared/private/loki-logs.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-logs.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/loki-logs.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-logs.json diff --git a/helm/dashboards/dashboards/shared/private/loki-mixin-recording-rules.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-mixin-recording-rules.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/loki-mixin-recording-rules.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-mixin-recording-rules.json diff --git a/helm/dashboards/dashboards/shared/private/loki-operational.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-operational.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/loki-operational.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-operational.json diff --git a/helm/dashboards/dashboards/shared/private/loki-reads-resources.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-reads-resources.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/loki-reads-resources.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-reads-resources.json diff --git a/helm/dashboards/dashboards/shared/private/loki-reads.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-reads.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/loki-reads.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-reads.json diff --git a/helm/dashboards/dashboards/shared/private/loki-retention.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-retention.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/loki-retention.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-retention.json diff --git a/helm/dashboards/dashboards/shared/private/loki-writes-resources.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-writes-resources.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/loki-writes-resources.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-writes-resources.json diff --git a/helm/dashboards/dashboards/shared/private/loki-writes.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-writes.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/loki-writes.json rename to helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-writes.json diff --git a/helm/dashboards/charts/private_dashboards_al/templates/_helpers.tpl b/helm/dashboards/charts/private_dashboards_al/templates/_helpers.tpl new file mode 100644 index 00000000..ff67b3eb --- /dev/null +++ b/helm/dashboards/charts/private_dashboards_al/templates/_helpers.tpl @@ -0,0 +1,29 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "name" -}} +{{- $.Chart.Name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "chart" -}} +{{- printf "%s-%s" $.Chart.Name $.Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "labels.common" -}} +app.kubernetes.io/name: {{ include "name" . | quote }} +app.kubernetes.io/instance: {{ $.Release.Name | quote }} +app.giantswarm.io/branch: {{ $.Values.project.branch | replace "#" "-" | replace "/" "-" | replace "." "-" | trunc 63 | trimSuffix "-" | quote }} +app.giantswarm.io/commit: {{ $.Values.project.commit | quote }} +app.kubernetes.io/managed-by: {{ $.Release.Service | quote }} +app.kubernetes.io/version: {{ $.Chart.AppVersion | quote }} +helm.sh/chart: {{ include "chart" . | quote }} +giantswarm.io/service-type: {{ $.Values.serviceType }} +app.giantswarm.io/kind: "dashboard" +{{- end -}} diff --git a/helm/dashboards/charts/private_dashboards_al/templates/configmap-dashboards.yaml b/helm/dashboards/charts/private_dashboards_al/templates/configmap-dashboards.yaml new file mode 100644 index 00000000..3ad7106e --- /dev/null +++ b/helm/dashboards/charts/private_dashboards_al/templates/configmap-dashboards.yaml @@ -0,0 +1,90 @@ +apiVersion: v1 +kind: ConfigMapList +items: +## Home +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/public/home" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: grafana-home-dashboard + namespace: {{ $.Values.namespace }} + data: + home.json: {{ (tpl ($.Files.Get "dashboards/home.json") .) | quote }} +## Mixins dashboards +{{- range $path, $fileContents := $.Files.Glob "dashboards/mixin/*.json" }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/private/mixin" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: {{ printf "grafana-mixin-%s-dashboard" $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.namespace }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} +## Shared public dashboards +{{- range $path, $fileContents := $.Files.Glob "dashboards/shared/public/*.json" }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/public/shared" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: {{ printf "grafana-shared-%s-dashboard" $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.namespace }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} +## Shared private dashboards +{{- range $path, $fileContents := $.Files.Glob "dashboards/shared/private/*.json" }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/private/shared" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: {{ printf "grafana-shared-%s-dashboard" $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.namespace }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} +## Provider specific public dashboards +{{- range $path, $fileContents := $.Files.Glob (printf "dashboards/%s/public/*.json" $.Values.provider.kind) }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/public/{{ $.Values.provider.kind }}" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: {{ printf "grafana-%s-%s-dashboard" $.Values.provider.kind $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.namespace }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} +## Provider specific private dashboards +{{- range $path, $fileContents := $.Files.Glob (printf "dashboards/%s/private/*.json" $.Values.provider.kind) }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/private/{{ $.Values.provider.kind }}" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: {{ printf "grafana-%s-%s-dashboard" $.Values.provider.kind $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.namespace }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} diff --git a/helm/dashboards/charts/private_dashboards_mz/Chart.yaml b/helm/dashboards/charts/private_dashboards_mz/Chart.yaml new file mode 100644 index 00000000..5c57d88b --- /dev/null +++ b/helm/dashboards/charts/private_dashboards_mz/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +description: Grafana dashboards accessible by Giant Swarm customers +engine: gotpl +home: https://github.com/giantswarm/dashboards +icon: https://s.giantswarm.io/app-icons/grafana/1/light.svg +name: private_dashboards_mz +appVersion: 1.0.0 +version: 1.0.0 +annotations: + application.giantswarm.io/team: "atlas" + config.giantswarm.io/version: 1.x.x diff --git a/helm/dashboards/dashboards/shared/private/managed-apps-efk-stack-app.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/managed-apps-efk-stack-app.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/managed-apps-efk-stack-app.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/managed-apps-efk-stack-app.json diff --git a/helm/dashboards/dashboards/shared/private/management-cluster-falco.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/management-cluster-falco.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/management-cluster-falco.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/management-cluster-falco.json diff --git a/helm/dashboards/dashboards/shared/private/management-cluster-kubernetes.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/management-cluster-kubernetes.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/management-cluster-kubernetes.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/management-cluster-kubernetes.json diff --git a/helm/dashboards/dashboards/shared/private/management-cluster-overview.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/management-cluster-overview.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/management-cluster-overview.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/management-cluster-overview.json diff --git a/helm/dashboards/dashboards/shared/private/management-cluster-starboard.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/management-cluster-starboard.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/management-cluster-starboard.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/management-cluster-starboard.json diff --git a/helm/dashboards/dashboards/shared/private/microstorage.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/microstorage.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/microstorage.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/microstorage.json diff --git a/helm/dashboards/dashboards/shared/private/mimir-cost-estimate.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/mimir-cost-estimate.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/mimir-cost-estimate.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/mimir-cost-estimate.json diff --git a/helm/dashboards/dashboards/shared/private/net-exporter.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/net-exporter.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/net-exporter.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/net-exporter.json diff --git a/helm/dashboards/dashboards/shared/private/network-anomaly-detection.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/network-anomaly-detection.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/network-anomaly-detection.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/network-anomaly-detection.json diff --git a/helm/dashboards/dashboards/shared/private/network.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/network.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/network.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/network.json diff --git a/helm/dashboards/dashboards/shared/private/nginx-connection-distribution.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/nginx-connection-distribution.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/nginx-connection-distribution.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/nginx-connection-distribution.json diff --git a/helm/dashboards/dashboards/shared/private/operatorkit.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/operatorkit.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/operatorkit.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/operatorkit.json diff --git a/helm/dashboards/dashboards/shared/private/persistentvolume.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/persistentvolume.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/persistentvolume.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/persistentvolume.json diff --git a/helm/dashboards/dashboards/shared/private/prometheus-benchmark.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/prometheus-benchmark.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/prometheus-benchmark.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/prometheus-benchmark.json diff --git a/helm/dashboards/dashboards/shared/private/prometheus-cost-estimation.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/prometheus-cost-estimation.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/prometheus-cost-estimation.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/prometheus-cost-estimation.json diff --git a/helm/dashboards/dashboards/shared/private/prometheus-mimir-comparative.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/prometheus-mimir-comparative.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/prometheus-mimir-comparative.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/prometheus-mimir-comparative.json diff --git a/helm/dashboards/dashboards/shared/private/prometheus-opsrecipe.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/prometheus-opsrecipe.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/prometheus-opsrecipe.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/prometheus-opsrecipe.json diff --git a/helm/dashboards/dashboards/shared/private/prometheus-overview.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/prometheus-overview.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/prometheus-overview.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/prometheus-overview.json diff --git a/helm/dashboards/dashboards/shared/private/releases.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/releases.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/releases.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/releases.json diff --git a/helm/dashboards/dashboards/shared/private/team-firecracker.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/team-firecracker.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/team-firecracker.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/team-firecracker.json diff --git a/helm/dashboards/dashboards/shared/private/workload-cluster-kubernetes.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/workload-cluster-kubernetes.json similarity index 100% rename from helm/dashboards/dashboards/shared/private/workload-cluster-kubernetes.json rename to helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/workload-cluster-kubernetes.json diff --git a/helm/dashboards/charts/private_dashboards_mz/templates/_helpers.tpl b/helm/dashboards/charts/private_dashboards_mz/templates/_helpers.tpl new file mode 100644 index 00000000..ff67b3eb --- /dev/null +++ b/helm/dashboards/charts/private_dashboards_mz/templates/_helpers.tpl @@ -0,0 +1,29 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "name" -}} +{{- $.Chart.Name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "chart" -}} +{{- printf "%s-%s" $.Chart.Name $.Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "labels.common" -}} +app.kubernetes.io/name: {{ include "name" . | quote }} +app.kubernetes.io/instance: {{ $.Release.Name | quote }} +app.giantswarm.io/branch: {{ $.Values.project.branch | replace "#" "-" | replace "/" "-" | replace "." "-" | trunc 63 | trimSuffix "-" | quote }} +app.giantswarm.io/commit: {{ $.Values.project.commit | quote }} +app.kubernetes.io/managed-by: {{ $.Release.Service | quote }} +app.kubernetes.io/version: {{ $.Chart.AppVersion | quote }} +helm.sh/chart: {{ include "chart" . | quote }} +giantswarm.io/service-type: {{ $.Values.serviceType }} +app.giantswarm.io/kind: "dashboard" +{{- end -}} diff --git a/helm/dashboards/charts/private_dashboards_mz/templates/configmap-dashboards.yaml b/helm/dashboards/charts/private_dashboards_mz/templates/configmap-dashboards.yaml new file mode 100644 index 00000000..3ad7106e --- /dev/null +++ b/helm/dashboards/charts/private_dashboards_mz/templates/configmap-dashboards.yaml @@ -0,0 +1,90 @@ +apiVersion: v1 +kind: ConfigMapList +items: +## Home +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/public/home" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: grafana-home-dashboard + namespace: {{ $.Values.namespace }} + data: + home.json: {{ (tpl ($.Files.Get "dashboards/home.json") .) | quote }} +## Mixins dashboards +{{- range $path, $fileContents := $.Files.Glob "dashboards/mixin/*.json" }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/private/mixin" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: {{ printf "grafana-mixin-%s-dashboard" $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.namespace }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} +## Shared public dashboards +{{- range $path, $fileContents := $.Files.Glob "dashboards/shared/public/*.json" }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/public/shared" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: {{ printf "grafana-shared-%s-dashboard" $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.namespace }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} +## Shared private dashboards +{{- range $path, $fileContents := $.Files.Glob "dashboards/shared/private/*.json" }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/private/shared" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: {{ printf "grafana-shared-%s-dashboard" $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.namespace }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} +## Provider specific public dashboards +{{- range $path, $fileContents := $.Files.Glob (printf "dashboards/%s/public/*.json" $.Values.provider.kind) }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/public/{{ $.Values.provider.kind }}" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: {{ printf "grafana-%s-%s-dashboard" $.Values.provider.kind $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.namespace }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} +## Provider specific private dashboards +{{- range $path, $fileContents := $.Files.Glob (printf "dashboards/%s/private/*.json" $.Values.provider.kind) }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/private/{{ $.Values.provider.kind }}" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: {{ printf "grafana-%s-%s-dashboard" $.Values.provider.kind $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.namespace }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} diff --git a/helm/dashboards/charts/public_dashboards/Chart.yaml b/helm/dashboards/charts/public_dashboards/Chart.yaml new file mode 100644 index 00000000..c616c766 --- /dev/null +++ b/helm/dashboards/charts/public_dashboards/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +description: Grafana dashboards accessible by Giant Swarm customers +engine: gotpl +home: https://github.com/giantswarm/dashboards +icon: https://s.giantswarm.io/app-icons/grafana/1/light.svg +name: public_dashboards +appVersion: 1.0.0 +version: 1.0.0 +annotations: + application.giantswarm.io/team: "atlas" + config.giantswarm.io/version: 1.x.x +dependencies: + - name: public_dashboards + - name: private_dashboards diff --git a/helm/dashboards/dashboards/shared/public/alertmanager-overview.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/alertmanager-overview.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/alertmanager-overview.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/alertmanager-overview.json diff --git a/helm/dashboards/dashboards/shared/public/alerts.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/alerts.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/alerts.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/alerts.json diff --git a/helm/dashboards/dashboards/shared/public/api-audit.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/api-audit.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/api-audit.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/api-audit.json diff --git a/helm/dashboards/dashboards/shared/public/capi-overview.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/capi-overview.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/capi-overview.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/capi-overview.json diff --git a/helm/dashboards/dashboards/shared/public/cilium.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/cilium.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/cilium.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/cilium.json diff --git a/helm/dashboards/dashboards/shared/public/dex.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/dex.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/dex.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/dex.json diff --git a/helm/dashboards/dashboards/shared/public/dns.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/dns.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/dns.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/dns.json diff --git a/helm/dashboards/dashboards/shared/public/flux-cluster.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/flux-cluster.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/flux-cluster.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/flux-cluster.json diff --git a/helm/dashboards/dashboards/shared/public/flux-control-plane.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/flux-control-plane.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/flux-control-plane.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/flux-control-plane.json diff --git a/helm/dashboards/dashboards/shared/public/kong-connection-distribution.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/kong-connection-distribution.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/kong-connection-distribution.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/kong-connection-distribution.json diff --git a/helm/dashboards/dashboards/shared/public/kong-ingress-controller.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/kong-ingress-controller.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/kong-ingress-controller.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/kong-ingress-controller.json diff --git a/helm/dashboards/dashboards/shared/public/kong-official.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/kong-official.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/kong-official.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/kong-official.json diff --git a/helm/dashboards/dashboards/shared/public/managed-apps.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/managed-apps.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/managed-apps.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/managed-apps.json diff --git a/helm/dashboards/dashboards/shared/public/nginx.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/nginx.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/nginx.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/nginx.json diff --git a/helm/dashboards/dashboards/shared/public/nodes-overview.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/nodes-overview.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/nodes-overview.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/nodes-overview.json diff --git a/helm/dashboards/dashboards/shared/public/pod-request-vs-usage.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/pod-request-vs-usage.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/pod-request-vs-usage.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/pod-request-vs-usage.json diff --git a/helm/dashboards/dashboards/shared/public/prometheus-availability.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/prometheus-availability.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/prometheus-availability.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/prometheus-availability.json diff --git a/helm/dashboards/dashboards/shared/public/prometheus-remote-write.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/prometheus-remote-write.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/prometheus-remote-write.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/prometheus-remote-write.json diff --git a/helm/dashboards/dashboards/shared/public/prometheus.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/prometheus.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/prometheus.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/prometheus.json diff --git a/helm/dashboards/dashboards/shared/public/webhook-health.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/webhook-health.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/webhook-health.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/webhook-health.json diff --git a/helm/dashboards/dashboards/shared/public/webhooks-performance.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/webhooks-performance.json similarity index 100% rename from helm/dashboards/dashboards/shared/public/webhooks-performance.json rename to helm/dashboards/charts/public_dashboards/dashboards/shared/public/webhooks-performance.json diff --git a/helm/dashboards/charts/public_dashboards/templates/_helpers.tpl b/helm/dashboards/charts/public_dashboards/templates/_helpers.tpl new file mode 100644 index 00000000..ff67b3eb --- /dev/null +++ b/helm/dashboards/charts/public_dashboards/templates/_helpers.tpl @@ -0,0 +1,29 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "name" -}} +{{- $.Chart.Name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "chart" -}} +{{- printf "%s-%s" $.Chart.Name $.Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "labels.common" -}} +app.kubernetes.io/name: {{ include "name" . | quote }} +app.kubernetes.io/instance: {{ $.Release.Name | quote }} +app.giantswarm.io/branch: {{ $.Values.project.branch | replace "#" "-" | replace "/" "-" | replace "." "-" | trunc 63 | trimSuffix "-" | quote }} +app.giantswarm.io/commit: {{ $.Values.project.commit | quote }} +app.kubernetes.io/managed-by: {{ $.Release.Service | quote }} +app.kubernetes.io/version: {{ $.Chart.AppVersion | quote }} +helm.sh/chart: {{ include "chart" . | quote }} +giantswarm.io/service-type: {{ $.Values.serviceType }} +app.giantswarm.io/kind: "dashboard" +{{- end -}} diff --git a/helm/dashboards/charts/public_dashboards/templates/configmap-dashboards.yaml b/helm/dashboards/charts/public_dashboards/templates/configmap-dashboards.yaml new file mode 100644 index 00000000..3ad7106e --- /dev/null +++ b/helm/dashboards/charts/public_dashboards/templates/configmap-dashboards.yaml @@ -0,0 +1,90 @@ +apiVersion: v1 +kind: ConfigMapList +items: +## Home +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/public/home" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: grafana-home-dashboard + namespace: {{ $.Values.namespace }} + data: + home.json: {{ (tpl ($.Files.Get "dashboards/home.json") .) | quote }} +## Mixins dashboards +{{- range $path, $fileContents := $.Files.Glob "dashboards/mixin/*.json" }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/private/mixin" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: {{ printf "grafana-mixin-%s-dashboard" $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.namespace }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} +## Shared public dashboards +{{- range $path, $fileContents := $.Files.Glob "dashboards/shared/public/*.json" }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/public/shared" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: {{ printf "grafana-shared-%s-dashboard" $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.namespace }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} +## Shared private dashboards +{{- range $path, $fileContents := $.Files.Glob "dashboards/shared/private/*.json" }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/private/shared" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: {{ printf "grafana-shared-%s-dashboard" $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.namespace }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} +## Provider specific public dashboards +{{- range $path, $fileContents := $.Files.Glob (printf "dashboards/%s/public/*.json" $.Values.provider.kind) }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/public/{{ $.Values.provider.kind }}" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: {{ printf "grafana-%s-%s-dashboard" $.Values.provider.kind $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.namespace }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} +## Provider specific private dashboards +{{- range $path, $fileContents := $.Files.Glob (printf "dashboards/%s/private/*.json" $.Values.provider.kind) }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + annotations: + k8s-sidecar-target-directory: "/var/lib/grafana/dashboards/private/{{ $.Values.provider.kind }}" + labels: + {{- include "labels.common" $ | nindent 6 }} + name: {{ printf "grafana-%s-%s-dashboard" $.Values.provider.kind $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.namespace }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} diff --git a/helm/dashboards/values.yaml b/helm/dashboards/values.yaml index 1b148ab5..e4176f5d 100644 --- a/helm/dashboards/values.yaml +++ b/helm/dashboards/values.yaml @@ -6,6 +6,93 @@ project: branch: "[[ .Branch ]]" commit: "[[ .SHA ]]" +private_dashboards_al: + project: + branch: "[[ .Branch ]]" + commit: "[[ .SHA ]]" + provider: + kind: "" + home: + urls: + - name: "Alerts" + link: "/d/L65Jdq3Zk/alerts" + description: "find out which alerts are currently active for an installation, and see which are overruled by silences or inhibitions" + provider: "shared" + - name: "Managed apps" + link: "/d/O74c1gI7k/managed-apps" + description: "find out which managed apps are installed for an installation" + provider: "shared" + - name: "Nodes overview" + link: "/d/qMN01qkWz/nodes-overview" + description: "basic metrics on the nodes in your Kubernetes clusters" + provider: "shared" + - name: "KVM Resource Usage" + link: "/d/kjQlHcWnk/kvm-resource-usage" + description: "resource usage of the KVM cluster" + provider: "kvm" + documentation: + - name: "Custom dashboards" + link: "https://docs.giantswarm.io/getting-started/observability/grafana/custom-dashboards/" + description: "Add your own custom dashboards to this Grafana" + +private_dashboards_mz: + project: + branch: "[[ .Branch ]]" + commit: "[[ .SHA ]]" + provider: + kind: "" + home: + urls: + - name: "Alerts" + link: "/d/L65Jdq3Zk/alerts" + description: "find out which alerts are currently active for an installation, and see which are overruled by silences or inhibitions" + provider: "shared" + - name: "Managed apps" + link: "/d/O74c1gI7k/managed-apps" + description: "find out which managed apps are installed for an installation" + provider: "shared" + - name: "Nodes overview" + link: "/d/qMN01qkWz/nodes-overview" + description: "basic metrics on the nodes in your Kubernetes clusters" + provider: "shared" + - name: "KVM Resource Usage" + link: "/d/kjQlHcWnk/kvm-resource-usage" + description: "resource usage of the KVM cluster" + provider: "kvm" + documentation: + - name: "Custom dashboards" + link: "https://docs.giantswarm.io/getting-started/observability/grafana/custom-dashboards/" + description: "Add your own custom dashboards to this Grafana" + +public_dashboards: + project: + branch: "[[ .Branch ]]" + commit: "[[ .SHA ]]" + provider: + kind: "" + home: + urls: + - name: "Alerts" + link: "/d/L65Jdq3Zk/alerts" + description: "find out which alerts are currently active for an installation, and see which are overruled by silences or inhibitions" + provider: "shared" + - name: "Managed apps" + link: "/d/O74c1gI7k/managed-apps" + description: "find out which managed apps are installed for an installation" + provider: "shared" + - name: "Nodes overview" + link: "/d/qMN01qkWz/nodes-overview" + description: "basic metrics on the nodes in your Kubernetes clusters" + provider: "shared" + - name: "KVM Resource Usage" + link: "/d/kjQlHcWnk/kvm-resource-usage" + description: "resource usage of the KVM cluster" + provider: "kvm" + documentation: + - name: "Custom dashboards" + link: "https://docs.giantswarm.io/getting-started/observability/grafana/custom-dashboards/" + description: "Add your own custom dashboards to this Grafana" + home: urls: - name: "Alerts"