Skip to content

Commit

Permalink
🔧 chore(grafana-k8sgpt-dashboard.yaml): simplify namespace configuration
Browse files Browse the repository at this point in the history
The namespace configuration for the Grafana dashboard has been simplified by removing the unnecessary namespaceSelector block. Instead, the namespace is directly set using the .Values.grafanaDashboard.namespace value, falling back to the default namespace if not provided. This change improves readability and reduces complexity in the configuration file.

Signed-off-by: MateSousa <matessousa@outlook.com>
  • Loading branch information
MateSousa committed Jun 29, 2023
1 parent 61b42a8 commit 77820e7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions chart/operator/templates/grafana-k8sgpt-dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ metadata:
app.kubernetes.io/part-of: k8sgpt-operator
{{- include "chart.labels" . | nindent 4 }}
name: k8sgpt-overview
spec:
{{- if .Values.grafanaDashboard.namespace }}
namespaceSelector:
matchNames:
- {{ include "k8sgpt-operator.namespace" .}}
{{- end }}
namespace: {{ .Values.grafanaDashboard.namespace | default (include "k8sgpt-operator.namespace" .) }}
data:
k8sgpt-overview.json: |
{{ .Files.Get "dashboards/k8sgpt-overview.json" | indent 4}}
Expand Down

0 comments on commit 77820e7

Please sign in to comment.