From 0000d074f53ca4aeee018cb3dc92ea213e4d0711 Mon Sep 17 00:00:00 2001 From: Pinghao Wu Date: Sat, 11 Jan 2025 16:38:45 +0800 Subject: [PATCH] operators: add grafana-operator --- clusters/egloga/flux-system/sync.yaml | 13 ++++++++++ operators/grafana-operator.yaml | 34 +++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 operators/grafana-operator.yaml diff --git a/clusters/egloga/flux-system/sync.yaml b/clusters/egloga/flux-system/sync.yaml index 20e0753..7cd9db1 100644 --- a/clusters/egloga/flux-system/sync.yaml +++ b/clusters/egloga/flux-system/sync.yaml @@ -24,3 +24,16 @@ spec: sourceRef: kind: GitRepository name: flux-system +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: operators + namespace: flux-system +spec: + interval: 1h0m0s + path: ./operators + prune: true + sourceRef: + kind: GitRepository + name: flux-system diff --git a/operators/grafana-operator.yaml b/operators/grafana-operator.yaml new file mode 100644 index 0000000..10a293a --- /dev/null +++ b/operators/grafana-operator.yaml @@ -0,0 +1,34 @@ +--- +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: grafana-operator + namespace: flux-system +spec: + chart: + spec: + chart: grafana-operator + reconcileStrategy: ChartVersion + sourceRef: + kind: HelmRepository + name: bitnami + version: ^4.9.0 + install: + crds: Create + createNamespace: true + interval: 1h0m0s + targetNamespace: grafana + upgrade: + crds: CreateReplace + values: + operator: + podSecurityContext: + # TODO fix cluster compatibility about ids w/ user namespacing + fsGroup: null + containerSecurityContext: + # explicitly set it sets mounterArgs.FsUser, and make token 600 + runAsUser: null + grafana: + image: + # TODO remove once upstream updated to one not yet trimmed + tag: "11" -- 2.45.2