Merge pull request #105 from grafana/remove_redundant_variables

Remove unused variables
This commit is contained in:
Michel Hollands 2024-05-08 10:25:37 +01:00 committed by GitHub
commit add43ae974
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 5 additions and 15 deletions

View File

@ -1,4 +1,4 @@
{{- if and .Values.local.grafana.enabled (or .Values.dashboards.logs.enabled .Values.dashboards.metrics.enabled .Values.dashboards.traces.enabled) }} {{- if and .Values.local.grafana.enabled .Values.dashboards.logs.enabled }}
--- ---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap

View File

@ -1,4 +1,4 @@
{{- if and .Values.local.grafana.enabled (or .Values.dashboards.logs.enabled .Values.dashboards.metrics.enabled .Values.dashboards.traces.enabled) }} {{- if and .Values.local.grafana.enabled .Values.dashboards.logs.enabled }}
--- ---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap

View File

@ -65,7 +65,7 @@ spec:
name: grafana-pv name: grafana-pv
- mountPath: /etc/grafana/provisioning/datasources - mountPath: /etc/grafana/provisioning/datasources
name: datasources-provisioning name: datasources-provisioning
{{- if or (or .Values.dashboards.logs.enabled .Values.dashboards.metrics.enabled) .Values.dashboards.traces.enabled }} {{- if .Values.dashboards.logs.enabled }}
- mountPath: /etc/grafana/provisioning/dashboards - mountPath: /etc/grafana/provisioning/dashboards
name: dashboards-provisioning name: dashboards-provisioning
{{- end }} {{- end }}

View File

@ -1,5 +1,5 @@
{{- if .Values.local.grafana.enabled }} {{- if .Values.local.grafana.enabled }}
{{- if and .Values.local.grafana.enabled (or .Values.dashboards.logs.enabled .Values.dashboards.metrics.enabled .Values.dashboards.traces.enabled) }} {{- if and .Values.local.grafana.enabled .Values.dashboards.logs.enabled }}
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:

View File

@ -1,5 +1,5 @@
{{- if .Values.local.metrics.enabled }} {{- if .Values.local.metrics.enabled }}
{{- if and .Values.local.grafana.enabled (or .Values.dashboards.logs.enabled .Values.dashboards.metrics.enabled .Values.dashboards.traces.enabled) }} {{- if and .Values.local.grafana.enabled .Values.dashboards.logs.enabled }}
--- ---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -10,11 +10,5 @@ data:
{{- if .Values.dashboards.logs.enabled }} {{- if .Values.dashboards.logs.enabled }}
{{ ($.Files.Glob "src/rules/loki-rules.yaml").AsConfig | indent 2 }} {{ ($.Files.Glob "src/rules/loki-rules.yaml").AsConfig | indent 2 }}
{{- end }} {{- end }}
{{- if .Values.dashboards.metrics.enabled }}
{{ ($.Files.Glob "src/rules/mimir-rules.yaml").AsConfig | indent 2 }}
{{- end }}
{{- if .Values.dashboards.traces.enabled }}
{{ ($.Files.Glob "src/rules/tempo-rules.yaml").AsConfig | indent 2 }}
{{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -176,10 +176,6 @@ metrics:
dashboards: dashboards:
logs: logs:
enabled: true enabled: true
metrics:
enabled: true
traces:
enabled: true
kubeStateMetrics: kubeStateMetrics:
# Scrape https://github.com/kubernetes/kube-state-metrics by default # Scrape https://github.com/kubernetes/kube-state-metrics by default
enabled: true enabled: true