Skip to content

Commit

Permalink
Updates to GrafanaDashboard
Browse files Browse the repository at this point in the history
[skip ci]
Changes apiversion to v1beta1
"Update grafanadashboard (#302)"

This reverts commit 1762f00, reversing
changes made to 9d55ce1.

Revert "[skip-ci] Update artifacts"

This reverts commit 826a784.

update grafana dashboard #major

[skip-ci] Update artifacts

Revert "Update grafana dashboard #major (#305)"

This reverts commit a3bec38, reversing
changes made to 31225c1.

Revert "[skip-ci] Update artifacts"

This reverts commit e824950.

granfana updates

[skip-ci] Update artifacts
  • Loading branch information
stakater-nordmart-bot authored and AsfaMumtaz committed Mar 18, 2024
1 parent 826a784 commit ba4b9d8
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
All notable changes to this project will be documented here.

### v3.0.0
- Feature: Updates the GrafanaDashboard api version to v1beta1 and adds new fields.
- Feature: Updates the GrafanaDashboard api version to v1beta1.

### v2.3.2
- Feature: fix clusterIP null field introduced by [PR-275](https://github.com/stakater/application/pull/275) [PR-295](https://github.com/stakater/application/pull/295)
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,14 @@ Stakater [IngressMonitorController](https://github.com/stakater/IngressMonitorCo

### Grafana Dashboard Paramaters

| Name | Description | Value |
|------------------------------------------------| -------------------------------------------------------------------------------------------- |---------|
| grafanaDashboard.enabled | Enables Grafana Dashboard | `false` |
| grafanaDashboard.additionalLabels | Kubernetes labels object | `{}` |
| grafanaDashboard.annotations | Annotations for Grafana Dashboard | `{}` |
| grafanaDashboard.contents.key | Used as name of Grafana Dashboard object | `""` |
| grafanaDashboard.contents.key.json | json string used as content of Grafana Dashboard object | `""` |
| grafanaDashboard.contents.key.url | Url used to fetch dashboard content. According to GrafanaDashboard behavior, if both url and json are specified then the GrafanaDashboard content will be updated with fetched content from url | `""` |
| Name | Description | Value |
| ------------------------ | -------------------------------------------------------------------------------------------- | --------------- |
| grafanaDashboard.enabled | Enables Grafana Dashboard | `false` |
| grafanaDashboard.additionalLabels | Kubernetes labels object | `{}` |
| grafanaDashboard.annotations | Annotations for Grafana Dashboard | `{}` |
| grafanaDashboard.contents.key | Used as name of Grafana Dashboard object | `""` |
| grafanaDashboard.contents.key.json | json string used as content of Grafana Dashboard object | `""` |
| grafanaDashboard.contents.key.url| Url used to fetch dashboard content. According to GrafanaDashboard behavior, if both url and json are specified then the GrafanaDashboard content will be updated with fetched content from url | `""` |
| grafanaDashboard.contents.key.instanceSelector | selects Grafana instances for import | `{}` |
| grafanaDashboard.contents.key.folder | folder assignment for dashboard | `""` |
| grafanaDashboard.contents.key.configMapRef | dashboard from configmap | `[]` |
Expand Down
2 changes: 1 addition & 1 deletion application/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type: application

# Helm chart Version

version: 2.3.4
version: 3.0.0


keywords:
Expand Down
11 changes: 5 additions & 6 deletions application/templates/grafanadashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ metadata:
name: {{ $name }}
namespace: {{ template "application.namespace" $ }}
labels:
# this label is used as dashboard selector by grafana operator
# this label is used as dashboard selector by grafana operator
grafanaDashboard: grafana-operator
{{- include "application.labels" $ | nindent 4 }}
{{- if $.Values.grafanaDashboard.additionalLabels }}
{{ toYaml $.Values.grafanaDashboard.additionalLabels | indent 4 }}
{{- end }}
{{- if $.Values.grafanaDashboard.annotations }}
annotations:
annotations:
{{ toYaml $.Values.grafanaDashboard.annotations | indent 4 }}
{{- end }}
spec:
Expand All @@ -39,10 +39,9 @@ spec:
configMapRef:
{{ toYaml $content.configMapRef | indent 4 }}
{{- end }}
{{- if $content.datasources }}
{{- if $content.datasources }}
datasources:
{{ toYaml $content.datasources | indent 4 }}
{{- end }}
{{- end }}
{{- end }}

{{- end }}
{{- end }}
5 changes: 1 addition & 4 deletions application/values-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -777,12 +777,9 @@ grafanaDashboard:
additionalLabels:
test-label: chart
annotations:
test-annotation: chart
test-annoation: chart
contents:
dashboard-test-name-1:
instanceSelector:
matchLabels:
app: test-1
json: |-
{
"annotations": {
Expand Down
12 changes: 12 additions & 0 deletions application/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -888,3 +888,15 @@ grafanaDashboard:
# "data"
# }
# url: http://hostname/path/to/file.json
# dashboard-test-name-2:
# allowCrossNamespaceImport: true
# configMapRef:
# key: json
# name: storage-observability-definition
# datasources:
# - datasourceName: Test
# inputName: DS_PROMETHEUS
# folder: Storage Observability
# instanceSelector:
# matchLabels:
# app: test-2

0 comments on commit ba4b9d8

Please sign in to comment.