From 3df8ac27790714f880c256fddceb78d5412d1642 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sun, 5 Jul 2026 22:16:30 +1000 Subject: [PATCH] grafana-system: deploy grafana-operator Adds the grafana-operator (grafana.integreatly.org CRDs + controller) so Grafana and its dashboards/datasources can be managed declaratively as CRs in a follow-up PR. Sits in the platform project like the other operators (vm-system, cnpg-system). Changes: - Add grafana-system namespace + grafana-operator helm chart v5.24.0 (watches all namespaces). - Render CRDs inline (crds.immutable: false) so ArgoCD installs/manages the 13 grafana.integreatly.org CRDs instead of the skipped helm crds/ subchart. - Register apps/overlays/*/grafana-system in the platform ApplicationSet. --- apps/base/grafana-system/kustomization.yaml | 6 ++++++ apps/base/grafana-system/namespace.yaml | 7 +++++++ .../au-syd1/grafana-system/kustomization.yaml | 16 ++++++++++++++++ apps/overlays/au-syd1/grafana-system/values.yaml | 16 ++++++++++++++++ argocd/applicationsets/platform.yaml | 1 + 5 files changed, 46 insertions(+) create mode 100644 apps/base/grafana-system/kustomization.yaml create mode 100644 apps/base/grafana-system/namespace.yaml create mode 100644 apps/overlays/au-syd1/grafana-system/kustomization.yaml create mode 100644 apps/overlays/au-syd1/grafana-system/values.yaml diff --git a/apps/base/grafana-system/kustomization.yaml b/apps/base/grafana-system/kustomization.yaml new file mode 100644 index 0000000..5122f9e --- /dev/null +++ b/apps/base/grafana-system/kustomization.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - namespace.yaml diff --git a/apps/base/grafana-system/namespace.yaml b/apps/base/grafana-system/namespace.yaml new file mode 100644 index 0000000..8e1326d --- /dev/null +++ b/apps/base/grafana-system/namespace.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + labels: + app.kubernetes.io/name: grafana-system + name: grafana-system diff --git a/apps/overlays/au-syd1/grafana-system/kustomization.yaml b/apps/overlays/au-syd1/grafana-system/kustomization.yaml new file mode 100644 index 0000000..7f981e0 --- /dev/null +++ b/apps/overlays/au-syd1/grafana-system/kustomization.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: grafana-system + +resources: + - ../../../base/grafana-system + +helmCharts: + - name: grafana-operator + repo: https://artifactapi.k8s.syd1.au.unkin.net/api/v1/virtual/helm + version: "5.24.0" + releaseName: grafana-operator + namespace: grafana-system + valuesFile: values.yaml diff --git a/apps/overlays/au-syd1/grafana-system/values.yaml b/apps/overlays/au-syd1/grafana-system/values.yaml new file mode 100644 index 0000000..7c1edd7 --- /dev/null +++ b/apps/overlays/au-syd1/grafana-system/values.yaml @@ -0,0 +1,16 @@ +# Watches all namespaces by default (namespaceScope: false) so it can manage the +# Grafana instance + dashboards/datasources in the `grafana` namespace. +# +# Render the CRDs as normal templated manifests (instead of the helm `crds/` +# subchart, which `helm template`/kustomize skip) so ArgoCD installs and manages +# them alongside the operator. +crds: + immutable: false +replicas: 1 +resources: + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 500m + memory: 512Mi diff --git a/argocd/applicationsets/platform.yaml b/argocd/applicationsets/platform.yaml index 634fcf4..3e99f87 100644 --- a/argocd/applicationsets/platform.yaml +++ b/argocd/applicationsets/platform.yaml @@ -23,6 +23,7 @@ spec: - path: apps/overlays/*/elastic-system - path: apps/overlays/*/encapi - path: apps/overlays/*/externaldns + - path: apps/overlays/*/grafana-system - path: apps/overlays/*/inteldeviceplugins-system - path: apps/overlays/*/jfrog - path: apps/overlays/*/kanidm -- 2.47.3