Skip to content

Commit 5758624

Browse files
committed
feat(chart)!: ship dashboard as GrafanaDashboard CRD, not ConfigMap
The dashboard ConfigMap pattern only works when the Grafana sidecar is watching for labeled ConfigMaps. Setups running grafana-operator consume dashboards through the GrafanaDashboard CRD (grafana.integreatly.org/v1beta1), and the sidecar ConfigMap is just dead weight there. Switch the chart to render a GrafanaDashboard directly. Values surface: - grafanaDashboard.instanceSelector.matchLabels — required, picks the target Grafana CR (default {dashboards: grafana}). - grafanaDashboard.allowCrossNamespaceImport — default true. - grafanaDashboard.folder, grafanaDashboard.resyncPeriod — optional. - grafanaDashboard.label removed (was sidecar-only). Bumps chart 1.8.2 -> 1.9.0 (breaking values change).
1 parent ed52cbc commit 5758624

6 files changed

Lines changed: 63 additions & 20 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ Two version streams move independently:
1414

1515
## [Unreleased]
1616

17+
### Chart
18+
19+
- **`chart/1.9.0`** — Replace the bundled Grafana dashboard `ConfigMap`
20+
with a `GrafanaDashboard` CRD (`grafana.integreatly.org/v1beta1`)
21+
reconciled by grafana-operator. New `grafanaDashboard.instanceSelector`,
22+
`allowCrossNamespaceImport`, `folder`, `resyncPeriod` knobs; removed
23+
the sidecar-only `grafanaDashboard.label`. **Breaking** for installs
24+
that relied on the dashboard sidecar — switch to grafana-operator or
25+
pin the chart to `1.8.x`.
26+
1727
## [1.8.1] — 2026-05-20
1828

1929
Patch release. Fixes B2 (and other non-AWS S3-compatible backends)

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The project is a hardened fork of the original [edgelesssys/constellation](https
4646
- **S3-compatible** — works with any backend that speaks S3 v4 (AWS, Scaleway, MinIO, Wasabi, Ceph, …).
4747
- **Secure defaults** — multipart uploads blocked, HTTPS upstream, request body capped, optional concurrency throttle.
4848
- **Production observability** — Prometheus metrics on `/metrics`, four shipped alerts, OTLP/HTTP traces with `slog` log/trace correlation, ready-to-import Grafana dashboard.
49-
- **Packaged Helm chart** — OCI-published, with opt-in `ServiceMonitor` / `PrometheusRule` / dashboard `ConfigMap`.
49+
- **Packaged Helm chart** — OCI-published, with opt-in `ServiceMonitor` / `PrometheusRule` / `GrafanaDashboard` CRD.
5050

5151
---
5252

@@ -283,7 +283,7 @@ Top-level value keys:
283283
| `autoscaling` | disabled | HPA on CPU/memory. |
284284
| `serviceMonitor` | disabled | Prometheus Operator scrape config. |
285285
| `prometheusRule` | disabled | Alert bundle. |
286-
| `grafanaDashboard` | disabled | Dashboard `ConfigMap` (grafana-operator / sidecar). |
286+
| `grafanaDashboard` | disabled | `GrafanaDashboard` CRD (`grafana.integreatly.org/v1beta1`, grafana-operator). |
287287

288288
A complete observability rollout looks like:
289289

@@ -301,6 +301,10 @@ prometheusRule:
301301
highLatencySeconds: 2
302302
grafanaDashboard:
303303
enabled: true
304+
folder: s3proxy
305+
instanceSelector:
306+
matchLabels:
307+
dashboards: grafana
304308
config:
305309
host: s3.fr-par.scw.cloud
306310
otlpTracesEndpoint: https://otel-collector.observability.svc.cluster.local:4318/v1/traces

charts/s3proxy/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ maintainers:
1818
annotations:
1919
org.opencontainers.image.source: "https://github.com/intrinsec/s3proxy/"
2020
type: application
21-
version: 1.8.2
21+
version: 1.9.0
2222
appVersion: "1.8.1"
Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
11
{{- if .Values.grafanaDashboard.enabled }}
2-
apiVersion: v1
3-
kind: ConfigMap
2+
apiVersion: grafana.integreatly.org/v1beta1
3+
kind: GrafanaDashboard
44
metadata:
55
name: {{ include "s3proxy.fullname" . }}-dashboard
66
{{- with .Values.grafanaDashboard.namespace }}
77
namespace: {{ . }}
88
{{- end }}
99
labels:
1010
{{- include "s3proxy.labels" . | nindent 4 }}
11-
{{ .Values.grafanaDashboard.label | default "grafana_dashboard" }}: "1"
1211
{{- with .Values.grafanaDashboard.labels }}
1312
{{- toYaml . | nindent 4 }}
1413
{{- end }}
1514
{{- with .Values.grafanaDashboard.annotations }}
1615
annotations:
1716
{{- toYaml . | nindent 4 }}
1817
{{- end }}
19-
data:
20-
s3proxy.json: |-
18+
spec:
19+
allowCrossNamespaceImport: {{ .Values.grafanaDashboard.allowCrossNamespaceImport }}
20+
{{- with .Values.grafanaDashboard.folder }}
21+
folder: {{ . | quote }}
22+
{{- end }}
23+
{{- with .Values.grafanaDashboard.resyncPeriod }}
24+
resyncPeriod: {{ . }}
25+
{{- end }}
26+
instanceSelector:
27+
matchLabels:
28+
{{- toYaml .Values.grafanaDashboard.instanceSelector.matchLabels | nindent 6 }}
29+
json: |-
2130
{{ .Files.Get "dashboards/s3proxy.json" | indent 4 }}
2231
{{- end }}

charts/s3proxy/values.schema.json

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,29 @@
194194
"grafanaDashboard": {
195195
"type": "object",
196196
"additionalProperties": true,
197-
"description": "Opt-in ConfigMap shipping the bundled Grafana dashboard.",
197+
"description": "Opt-in GrafanaDashboard CRD (grafana.integreatly.org/v1beta1) shipping the bundled dashboard. Requires grafana-operator.",
198198
"properties": {
199199
"enabled": { "type": "boolean" },
200200
"namespace": { "type": "string" },
201-
"label": { "type": "string", "minLength": 1 },
201+
"allowCrossNamespaceImport": { "type": "boolean" },
202+
"folder": { "type": "string" },
203+
"resyncPeriod": { "type": "string", "pattern": "^([0-9]+(ns|us|µs|ms|s|m|h))+$" },
204+
"instanceSelector": {
205+
"type": "object",
206+
"additionalProperties": true,
207+
"properties": {
208+
"matchLabels": {
209+
"type": "object",
210+
"minProperties": 1,
211+
"additionalProperties": { "type": "string" }
212+
}
213+
},
214+
"required": ["matchLabels"]
215+
},
202216
"labels": { "type": "object" },
203217
"annotations": { "type": "object" }
204218
},
205-
"required": ["enabled"]
219+
"required": ["enabled", "instanceSelector"]
206220
},
207221
"extraVolumes": { "type": "array" },
208222
"extraVolumeMounts": { "type": "array" },

charts/s3proxy/values.yaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,23 @@ prometheusRule:
168168
serviceDown: 2m
169169
highCrashRate: 5m
170170

171-
# Grafana dashboard ConfigMap. When enabled the chart ships a ConfigMap
172-
# carrying the s3proxy dashboard JSON, labeled so the grafana-operator /
173-
# dashboard sidecar picks it up automatically.
174-
# Requires either grafana-operator OR the official Grafana chart with the
175-
# dashboard sidecar enabled (`sidecar.dashboards.enabled=true`).
171+
# Grafana dashboard CRD. When enabled the chart ships a `GrafanaDashboard`
172+
# (`grafana.integreatly.org/v1beta1`) carrying the s3proxy dashboard JSON.
173+
# Requires grafana-operator to be installed in the cluster.
176174
grafanaDashboard:
177175
enabled: false
178-
# namespace: monitoring # where the ConfigMap should be created
179-
label: grafana_dashboard # label key the Grafana sidecar watches
180-
labels: {} # extra labels on the ConfigMap
181-
annotations: {} # extra annotations on the ConfigMap
176+
# namespace: monitoring # where the GrafanaDashboard is created
177+
allowCrossNamespaceImport: true # let a Grafana in another namespace pick it up
178+
# folder: "s3proxy" # target folder in Grafana (empty = General)
179+
# resyncPeriod: 5m # operator reconciliation cadence
180+
# instanceSelector.matchLabels picks the target Grafana CR. Default value
181+
# matches the `dashboards: grafana` selector used by the upstream
182+
# grafana-operator examples. Tune to whatever label your Grafana CR carries.
183+
instanceSelector:
184+
matchLabels:
185+
dashboards: grafana
186+
labels: {} # extra labels on the GrafanaDashboard
187+
annotations: {} # extra annotations on the GrafanaDashboard
182188

183189
# Additional volumes on the output Deployment definition.
184190
extraVolumes: []

0 commit comments

Comments
 (0)