constellation/internal/helm/charts/cilium/templates/hubble/dashboards-configmap.yaml
Moritz Sanft 968cdc1a38
cli: move cli/internal libraries (#2623)
* cli: move internal packages

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* cli: fix buildfiles

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* bazel: fix exclude dir

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* cli: move back libraries that will not be used by TF provider

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

---------

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
2023-11-22 14:52:56 +01:00

31 lines
1.2 KiB
YAML

{{- if .Values.hubble.metrics.dashboards.enabled }}
{{- $files := .Files.Glob "files/hubble/dashboards/*.json" }}
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $dashboardName | trunc 63 | trimSuffix "-" }}
namespace: {{ $.Values.hubble.metrics.dashboards.namespace | default $.Release.Namespace }}
labels:
k8s-app: hubble
app.kubernetes.io/name: hubble
app.kubernetes.io/part-of: cilium
{{- if $.Values.hubble.metrics.dashboards.label }}
{{ $.Values.hubble.metrics.dashboards.label }}: {{ ternary $.Values.hubble.metrics.dashboards.labelValue "1" (not (empty $.Values.hubble.metrics.dashboards.labelValue)) | quote }}
{{- end }}
{{- if or $.Values.hubble.metrics.dashboards.annotations $.Values.hubble.annotations }}
annotations:
{{- with $.Values.hubble.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $.Values.hubble.metrics.dashboards.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
data:
{{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }}
{{- end }}
{{- end }}