From 43c6e14d5d034d6353d62730c066a542f92fbf56 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Tue, 6 Dec 2022 16:51:45 +0000
Subject: [PATCH] feat(rook): Add rook cluster to rook deployment

---
 infrastructure/rook/cluster.yaml       | 35 ++++++++++++++++++++++++++
 infrastructure/rook/kustomization.yaml |  1 +
 infrastructure/rook/operator.yaml      |  2 +-
 3 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 infrastructure/rook/cluster.yaml

diff --git a/infrastructure/rook/cluster.yaml b/infrastructure/rook/cluster.yaml
new file mode 100644
index 000000000..913b8e20f
--- /dev/null
+++ b/infrastructure/rook/cluster.yaml
@@ -0,0 +1,35 @@
+apiVersion: helm.toolkit.fluxcd.io/v2beta1
+kind: HelmRelease
+metadata:
+  name: rook-ceph-cluster
+  namespace: rook-ceph
+spec:
+  releaseName: rook-ceph-cluster
+  chart:
+    spec:
+      chart: rook-ceph-cluster
+      sourceRef:
+        kind: HelmRepository
+        name: rook-release
+        namespace: rook-ceph
+      version: v1.10.6
+  interval: 5m
+  install:
+    crds: CreateReplace
+  upgrade:
+    crds: CreateReplace
+  valuesFrom:
+    - kind: ConfigMap
+      name: rook-ceph-cluster-base-values
+      valuesKey: values.yaml
+    - kind: Secret
+      name: rook-ceph-cluster-overwrite
+      valuesKey: values-overwrite.yaml
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: rook-ceph-cluster-base-values
+  namespace: rook-ceph
+data:
+  values.yaml: |
\ No newline at end of file
diff --git a/infrastructure/rook/kustomization.yaml b/infrastructure/rook/kustomization.yaml
index 877a4982b..799a6390c 100644
--- a/infrastructure/rook/kustomization.yaml
+++ b/infrastructure/rook/kustomization.yaml
@@ -5,3 +5,4 @@ resources:
   - namespace.yaml
   - repository.yaml
   - operator.yaml
+  - cluster.yaml
diff --git a/infrastructure/rook/operator.yaml b/infrastructure/rook/operator.yaml
index 7267a210c..afcfc3d44 100644
--- a/infrastructure/rook/operator.yaml
+++ b/infrastructure/rook/operator.yaml
@@ -7,7 +7,7 @@ spec:
   releaseName: rook-ceph
   chart:
     spec:
-      chart: postgres-operator
+      chart: rook-ceph
       sourceRef:
         kind: HelmRepository
         name: rook-release
-- 
GitLab