-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move public and private dashboards to separate sub-charts
- Loading branch information
1 parent
062cbbb
commit bca2502
Showing
89 changed files
with
499 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions
29
helm/dashboards/charts/private_dashboards_al/templates/_helpers.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 -}} |
90 changes: 90 additions & 0 deletions
90
helm/dashboards/charts/private_dashboards_al/templates/configmap-dashboards.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions
29
helm/dashboards/charts/private_dashboards_mz/templates/_helpers.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 -}} |
90 changes: 90 additions & 0 deletions
90
helm/dashboards/charts/private_dashboards_mz/templates/configmap-dashboards.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions
29
helm/dashboards/charts/public_dashboards/templates/_helpers.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 -}} |
Oops, something went wrong.