Skip to content

Commit

Permalink
victoria-metrics-k8s-stack: optional allowCrossNamespaceImport in Gra…
Browse files Browse the repository at this point in the history
…fanaDashboard(s) (#788)

* victoria-metrics-k8s-stack: optional allowCrossNamespaceImport in GrafanaDashboard CRs for Grafana Operator
  • Loading branch information
plevart authored Dec 12, 2023
1 parent 4a24092 commit 049a283
Show file tree
Hide file tree
Showing 16 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/victoria-metrics-k8s-stack/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Next release

- TODO
- Add optional allowCrossNamespaceImport to GrafanaDashboard(s) (#788)

## 0.18.9

Expand Down
1 change: 1 addition & 0 deletions charts/victoria-metrics-k8s-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ Change the values according to the need of the environment in ``victoria-metrics
| grafana.sidecar.datasources.jsonData | object | `{}` | |
| grafana.vmServiceScrape.enabled | bool | `true` | |
| grafana.vmServiceScrape.spec | object | `{}` | |
| grafanaOperatorDashboardsFormat.allowCrossNamespaceImport | bool | `false` | |
| grafanaOperatorDashboardsFormat.enabled | bool | `false` | |
| grafanaOperatorDashboardsFormat.instanceSelector.matchLabels.dashboards | string | `"grafana"` | |
| kube-state-metrics.enabled | bool | `true` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ def new_representer(dumper, data):
instanceSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.grafanaOperatorDashboardsFormat.allowCrossNamespaceImport }}
allowCrossNamespaceImport: true
{{- end }}
{{- else }}
apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
instanceSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.grafanaOperatorDashboardsFormat.allowCrossNamespaceImport }}
allowCrossNamespaceImport: true
{{- end }}
{{- else }}
apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
instanceSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.grafanaOperatorDashboardsFormat.allowCrossNamespaceImport }}
allowCrossNamespaceImport: true
{{- end }}
{{- else }}
apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
instanceSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.grafanaOperatorDashboardsFormat.allowCrossNamespaceImport }}
allowCrossNamespaceImport: true
{{- end }}
{{- else }}
apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
instanceSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.grafanaOperatorDashboardsFormat.allowCrossNamespaceImport }}
allowCrossNamespaceImport: true
{{- end }}
{{- else }}
apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
instanceSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.grafanaOperatorDashboardsFormat.allowCrossNamespaceImport }}
allowCrossNamespaceImport: true
{{- end }}
{{- else }}
apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
instanceSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.grafanaOperatorDashboardsFormat.allowCrossNamespaceImport }}
allowCrossNamespaceImport: true
{{- end }}
{{- else }}
apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
instanceSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.grafanaOperatorDashboardsFormat.allowCrossNamespaceImport }}
allowCrossNamespaceImport: true
{{- end }}
{{- else }}
apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
instanceSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.grafanaOperatorDashboardsFormat.allowCrossNamespaceImport }}
allowCrossNamespaceImport: true
{{- end }}
{{- else }}
apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
instanceSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.grafanaOperatorDashboardsFormat.allowCrossNamespaceImport }}
allowCrossNamespaceImport: true
{{- end }}
{{- else }}
apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
instanceSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.grafanaOperatorDashboardsFormat.allowCrossNamespaceImport }}
allowCrossNamespaceImport: true
{{- end }}
{{- else }}
apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
instanceSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.grafanaOperatorDashboardsFormat.allowCrossNamespaceImport }}
allowCrossNamespaceImport: true
{{- end }}
{{- else }}
apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
instanceSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.grafanaOperatorDashboardsFormat.allowCrossNamespaceImport }}
allowCrossNamespaceImport: true
{{- end }}
{{- else }}
apiVersion: v1
kind: ConfigMap
Expand Down
1 change: 1 addition & 0 deletions charts/victoria-metrics-k8s-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ grafanaOperatorDashboardsFormat:
instanceSelector:
matchLabels:
dashboards: "grafana"
allowCrossNamespaceImport: false

# Provide custom recording or alerting rules to be deployed into the cluster.
additionalVictoriaMetricsMap:
Expand Down

0 comments on commit 049a283

Please sign in to comment.