From 8248e913b07f785b072a438c073cd2843b101d7d Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Sun, 9 Feb 2025 00:46:46 +0100 Subject: [PATCH] Switch from piraeus to ceph --- infrastructure/configs/kustomization.yaml | 1 - infrastructure/configs/piraeus/cluster.yaml | 5 --- .../configs/piraeus/kustomization.yaml | 8 ---- infrastructure/configs/piraeus/pool.yaml | 10 ----- .../configs/piraeus/storage-replicated.yaml | 12 ----- infrastructure/configs/piraeus/storage.yaml | 10 ----- .../piraeus/volume_snapshot_class.yaml | 6 --- infrastructure/controllers/kustomization.yaml | 3 +- .../helm-release-cluster.yaml} | 44 +++---------------- .../rook/helm-release-operator.yaml | 14 ++++++ .../controllers/rook/helm-repository.yaml | 7 +++ .../controllers/rook/kustomization.yaml | 8 ++++ .../controllers/rook/namespace.yaml | 4 ++ 13 files changed, 41 insertions(+), 91 deletions(-) delete mode 100644 infrastructure/configs/piraeus/cluster.yaml delete mode 100644 infrastructure/configs/piraeus/kustomization.yaml delete mode 100644 infrastructure/configs/piraeus/pool.yaml delete mode 100644 infrastructure/configs/piraeus/storage-replicated.yaml delete mode 100644 infrastructure/configs/piraeus/storage.yaml delete mode 100644 infrastructure/configs/piraeus/volume_snapshot_class.yaml rename infrastructure/controllers/{rook.yaml => rook/helm-release-cluster.yaml} (51%) create mode 100644 infrastructure/controllers/rook/helm-release-operator.yaml create mode 100644 infrastructure/controllers/rook/helm-repository.yaml create mode 100644 infrastructure/controllers/rook/kustomization.yaml create mode 100644 infrastructure/controllers/rook/namespace.yaml diff --git a/infrastructure/configs/kustomization.yaml b/infrastructure/configs/kustomization.yaml index ed25d1d..8d83a39 100644 --- a/infrastructure/configs/kustomization.yaml +++ b/infrastructure/configs/kustomization.yaml @@ -7,4 +7,3 @@ resources: - ./middleware.yaml - ./intel-devices - - ./piraeus diff --git a/infrastructure/configs/piraeus/cluster.yaml b/infrastructure/configs/piraeus/cluster.yaml deleted file mode 100644 index 43513ff..0000000 --- a/infrastructure/configs/piraeus/cluster.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: piraeus.io/v1 -kind: LinstorCluster -metadata: - name: linstorcluster -spec: {} diff --git a/infrastructure/configs/piraeus/kustomization.yaml b/infrastructure/configs/piraeus/kustomization.yaml deleted file mode 100644 index faaa39d..0000000 --- a/infrastructure/configs/piraeus/kustomization.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - ./cluster.yaml - - ./pool.yaml - - ./storage.yaml - - ./storage-replicated.yaml - - ./volume_snapshot_class.yaml diff --git a/infrastructure/configs/piraeus/pool.yaml b/infrastructure/configs/piraeus/pool.yaml deleted file mode 100644 index 81322ef..0000000 --- a/infrastructure/configs/piraeus/pool.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: piraeus.io/v1 -kind: LinstorSatelliteConfiguration -metadata: - name: storage-pool -spec: - storagePools: - - name: rl-pool - lvmThinPool: - volumeGroup: rl - thinPool: pool diff --git a/infrastructure/configs/piraeus/storage-replicated.yaml b/infrastructure/configs/piraeus/storage-replicated.yaml deleted file mode 100644 index 96b3a61..0000000 --- a/infrastructure/configs/piraeus/storage-replicated.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: piraeus-storage-replicated - annotations: - storageclass.kubernetes.io/is-default-class: true -provisioner: linstor.csi.linbit.com -allowVolumeExpansion: true -volumeBindingMode: WaitForFirstConsumer -parameters: - linstor.csi.linbit.com/storagePool: rl-pool - linstor.csi.linbit.com/placementCount: "2" diff --git a/infrastructure/configs/piraeus/storage.yaml b/infrastructure/configs/piraeus/storage.yaml deleted file mode 100644 index eacb439..0000000 --- a/infrastructure/configs/piraeus/storage.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: piraeus-storage -provisioner: linstor.csi.linbit.com -allowVolumeExpansion: true -volumeBindingMode: WaitForFirstConsumer -parameters: - linstor.csi.linbit.com/storagePool: rl-pool - linstor.csi.linbit.com/allowRemoteVolumeAccess: "false" diff --git a/infrastructure/configs/piraeus/volume_snapshot_class.yaml b/infrastructure/configs/piraeus/volume_snapshot_class.yaml deleted file mode 100644 index 5fb2b86..0000000 --- a/infrastructure/configs/piraeus/volume_snapshot_class.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: snapshot.storage.k8s.io/v1 -kind: VolumeSnapshotClass -metadata: - name: piraeus-snapshots -driver: linstor.csi.linbit.com -deletionPolicy: Delete diff --git a/infrastructure/controllers/kustomization.yaml b/infrastructure/controllers/kustomization.yaml index d40ee8f..c2799c3 100644 --- a/infrastructure/controllers/kustomization.yaml +++ b/infrastructure/controllers/kustomization.yaml @@ -5,11 +5,10 @@ resources: - cert-manager.yaml - traefik.yaml - cloudnative-pg.yaml - # - rook.yaml + - ./rook - ./node-feature-discovery - ./velero - https://raw.githubusercontent.com/dragonflydb/dragonfly-operator/refs/tags/v1.1.8/manifests/dragonfly-operator.yaml - - https://github.com/piraeusdatastore/piraeus-operator//config/default?ref=v2.7.1 - https://github.com/kubernetes-csi/external-snapshotter//client/config/crd?ref=v8.2.0 - https://github.com/kubernetes-csi/external-snapshotter//deploy/kubernetes/snapshot-controller?ref=v8.2.0 - github.com/kubernetes-sigs/descheduler/kubernetes/cronjob?ref=release-1.32 diff --git a/infrastructure/controllers/rook.yaml b/infrastructure/controllers/rook/helm-release-cluster.yaml similarity index 51% rename from infrastructure/controllers/rook.yaml rename to infrastructure/controllers/rook/helm-release-cluster.yaml index 3819c57..f0f8523 100644 --- a/infrastructure/controllers/rook.yaml +++ b/infrastructure/controllers/rook/helm-release-cluster.yaml @@ -1,33 +1,3 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: rook-ceph ---- -apiVersion: source.toolkit.fluxcd.io/v1 -kind: HelmRepository -metadata: - name: rook-release - namespace: rook-ceph -spec: - interval: 1m0s - url: https://charts.rook.io/release ---- -apiVersion: helm.toolkit.fluxcd.io/v2 -kind: HelmRelease -metadata: - name: rook-ceph - namespace: rook-ceph -spec: - chart: - spec: - chart: rook-ceph - reconcileStrategy: ChartVersion - sourceRef: - kind: HelmRepository - name: rook-release - version: 1.15.3 - interval: 1m0s ---- apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease metadata: @@ -41,20 +11,20 @@ spec: sourceRef: kind: HelmRepository name: rook-release - version: 1.15.3 + version: 1.16.3 interval: 1m0s + timeout: 10m values: toolbox: enabled: true + # Uncomment once prometheus stack has been added + # monitoring: + # enabled: true + # createPrometheusRules: true cephClusterSpec: storage: + useAllDevices: false deviceFilter: "^nvme." - mon: - # For testing we only have one node - allowMultiplePerNode: true - mgr: - # For testing we only have one node - allowMultiplePerNode: true resources: mgr: limits: diff --git a/infrastructure/controllers/rook/helm-release-operator.yaml b/infrastructure/controllers/rook/helm-release-operator.yaml new file mode 100644 index 0000000..b1556c1 --- /dev/null +++ b/infrastructure/controllers/rook/helm-release-operator.yaml @@ -0,0 +1,14 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: rook-ceph +spec: + chart: + spec: + chart: rook-ceph + reconcileStrategy: ChartVersion + sourceRef: + kind: HelmRepository + name: rook-release + version: 1.16.3 + interval: 1m0s diff --git a/infrastructure/controllers/rook/helm-repository.yaml b/infrastructure/controllers/rook/helm-repository.yaml new file mode 100644 index 0000000..02effe4 --- /dev/null +++ b/infrastructure/controllers/rook/helm-repository.yaml @@ -0,0 +1,7 @@ +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: rook-release +spec: + interval: 1m0s + url: https://charts.rook.io/release diff --git a/infrastructure/controllers/rook/kustomization.yaml b/infrastructure/controllers/rook/kustomization.yaml new file mode 100644 index 0000000..2915ba2 --- /dev/null +++ b/infrastructure/controllers/rook/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: rook-ceph +resources: + - ./namespace.yaml + - ./helm-repository.yaml + - ./helm-release-operator.yaml + - ./helm-release-cluster.yaml diff --git a/infrastructure/controllers/rook/namespace.yaml b/infrastructure/controllers/rook/namespace.yaml new file mode 100644 index 0000000..bd176af --- /dev/null +++ b/infrastructure/controllers/rook/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: rook-ceph