diff --git a/common/postgres/database.yaml b/common/postgres/database.yaml index 581917c..e39951a 100644 --- a/common/postgres/database.yaml +++ b/common/postgres/database.yaml @@ -22,7 +22,7 @@ spec: topologyKey: kubernetes.io/hostname podAntiAffinityType: required storage: - storageClass: piraeus-storage + storageClass: topolvm-provisioner backups: enabled: true provider: s3 diff --git a/infrastructure/controllers/kustomization.yaml b/infrastructure/controllers/kustomization.yaml index c2799c3..742ae2c 100644 --- a/infrastructure/controllers/kustomization.yaml +++ b/infrastructure/controllers/kustomization.yaml @@ -6,6 +6,7 @@ resources: - traefik.yaml - cloudnative-pg.yaml - ./rook + - ./topolvm - ./node-feature-discovery - ./velero - https://raw.githubusercontent.com/dragonflydb/dragonfly-operator/refs/tags/v1.1.8/manifests/dragonfly-operator.yaml diff --git a/infrastructure/controllers/topolvm/helm-release.yaml b/infrastructure/controllers/topolvm/helm-release.yaml new file mode 100644 index 0000000..867d46f --- /dev/null +++ b/infrastructure/controllers/topolvm/helm-release.yaml @@ -0,0 +1,34 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: topolvm +spec: + chart: + spec: + chart: topolvm + reconcileStrategy: ChartVersion + sourceRef: + kind: HelmRepository + name: topolvm + version: 15.5.1 + interval: 1m0s + values: + lvmd: + deviceClasses: + - name: "thin" + volume-group: rl + default: true + type: thin + thin-pool: + name: "pool" + overprovision-ratio: 2.0 + + storageClasses: + - name: topolvm-provisioner + storageClass: + fsType: xfs + isDefaultClass: false + volumeBindingMode: WaitForFirstConsumer + allowVolumeExpansion: true + additionalParameters: + '{{ include "topolvm.pluginName" . }}/device-class': "thin" diff --git a/infrastructure/controllers/topolvm/helm-repository.yaml b/infrastructure/controllers/topolvm/helm-repository.yaml new file mode 100644 index 0000000..44a3e05 --- /dev/null +++ b/infrastructure/controllers/topolvm/helm-repository.yaml @@ -0,0 +1,7 @@ +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: topolvm +spec: + interval: 1m0s + url: https://topolvm.github.io/topolvm diff --git a/infrastructure/controllers/topolvm/kustomization.yaml b/infrastructure/controllers/topolvm/kustomization.yaml new file mode 100644 index 0000000..b2ea0d9 --- /dev/null +++ b/infrastructure/controllers/topolvm/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: topolvm-system +resources: + - ./namespace.yaml + - ./helm-repository.yaml + - ./helm-release.yaml diff --git a/infrastructure/controllers/topolvm/namespace.yaml b/infrastructure/controllers/topolvm/namespace.yaml new file mode 100644 index 0000000..7605b86 --- /dev/null +++ b/infrastructure/controllers/topolvm/namespace.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: topolvm-system + # TODO: We need to do the same thing for the kube-system namespace + labels: + topolvm.io/webhook: ignore