diff --git a/infrastructure/kustomization.yaml b/infrastructure/kustomization.yaml index 4b9b4c54fd8e0bd37b1f3fed5950a2f21cd172d0..12b3b67498cf1129025fd16c924a528f91d23448 100644 --- a/infrastructure/kustomization.yaml +++ b/infrastructure/kustomization.yaml @@ -9,6 +9,7 @@ resources: - metallb - cert-manager - nginx-system + - rook - longhorn - monitoring - loki diff --git a/infrastructure/rook/kustomization.yaml b/infrastructure/rook/kustomization.yaml new file mode 100644 index 0000000000000000000000000000000000000000..877a4982bb977b50f572016f8da816c2080749a4 --- /dev/null +++ b/infrastructure/rook/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: rook-ceph +resources: + - namespace.yaml + - repository.yaml + - operator.yaml diff --git a/infrastructure/rook/namespace.yaml b/infrastructure/rook/namespace.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2386bc14142c89683109eb7ca6fba9a18f565abf --- /dev/null +++ b/infrastructure/rook/namespace.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: rook-ceph + labels: + pod-security.kubernetes.io/audit: privileged + pod-security.kubernetes.io/enforce: privileged + pod-security.kubernetes.io/warn: privileged + pod-security.kubernetes.io/audit-version: v1.23 + pod-security.kubernetes.io/enforce-version: v1.23 + pod-security.kubernetes.io/warn-version: v1.23 diff --git a/infrastructure/rook/operator.yaml b/infrastructure/rook/operator.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cacab63dfed1b079f8d0fcff6e87f7222dac5b34 --- /dev/null +++ b/infrastructure/rook/operator.yaml @@ -0,0 +1,42 @@ +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: rook-ceph + namespace: rook-ceph +spec: + releaseName: rook-ceph + chart: + spec: + chart: postgres-operator + sourceRef: + kind: HelmRepository + name: rook-ceph + namespace: rook-ceph + version: v1.10.6 + interval: 5m + install: + crds: CreateReplace + upgrade: + crds: CreateReplace + valuesFrom: + - kind: ConfigMap + name: rook-ceph-base-values + valuesKey: values.yaml + - kind: Secret + name: rook-ceph-overwrite + valuesKey: values-overwrite.yaml +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: rook-ceph-base-values + namespace: rook-ceph +data: + values.yaml: | + csi: + topology: + enabled: true + domainLabels: + - kubernetes.io/hostname + monitoring: + enabled: true \ No newline at end of file diff --git a/infrastructure/rook/repository.yaml b/infrastructure/rook/repository.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2a6d5e5d5dcb8e565cacb43941d7d2fc91f2aad1 --- /dev/null +++ b/infrastructure/rook/repository.yaml @@ -0,0 +1,8 @@ +apiVersion: source.toolkit.fluxcd.io/v1beta1 +kind: HelmRepository +metadata: + name: rook-release + namespace: rook-ceph +spec: + interval: 30m + url: https://charts.rook.io/release