From 8a77dbeaa8644cbd772f344494118f51abfa917a Mon Sep 17 00:00:00 2001 From: jnobrega Date: Sat, 11 May 2024 18:29:43 +0100 Subject: [PATCH] chore: create nfs storageclass --- k8s/apps/storage/csi-driver-nfs/ks.yaml | 17 +++++++++++++++++ .../csi-driver-nfs/storage/kustomization.yaml | 4 ++++ .../csi-driver-nfs/storage/storageclass.yaml | 9 +++++++++ 3 files changed, 30 insertions(+) create mode 100644 k8s/apps/storage/csi-driver-nfs/storage/kustomization.yaml create mode 100644 k8s/apps/storage/csi-driver-nfs/storage/storageclass.yaml diff --git a/k8s/apps/storage/csi-driver-nfs/ks.yaml b/k8s/apps/storage/csi-driver-nfs/ks.yaml index 1d462162..0b939649 100644 --- a/k8s/apps/storage/csi-driver-nfs/ks.yaml +++ b/k8s/apps/storage/csi-driver-nfs/ks.yaml @@ -15,4 +15,21 @@ spec: wait: true interval: 30m retryInterval: 1m + timeout: 5m +--- +# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/kustomize.toolkit.fluxcd.io/kustomization_v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: csi-driver-nfs-storageclass + namespace: flux-system +spec: + path: ./k8s/apps/storage/csi-driver-nfs/storage + prune: true + sourceRef: + kind: GitRepository + name: home-cluster + wait: true + interval: 30m + retryInterval: 1m timeout: 5m \ No newline at end of file diff --git a/k8s/apps/storage/csi-driver-nfs/storage/kustomization.yaml b/k8s/apps/storage/csi-driver-nfs/storage/kustomization.yaml new file mode 100644 index 00000000..6cd66236 --- /dev/null +++ b/k8s/apps/storage/csi-driver-nfs/storage/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - storageclass.yaml \ No newline at end of file diff --git a/k8s/apps/storage/csi-driver-nfs/storage/storageclass.yaml b/k8s/apps/storage/csi-driver-nfs/storage/storageclass.yaml new file mode 100644 index 00000000..af98e4db --- /dev/null +++ b/k8s/apps/storage/csi-driver-nfs/storage/storageclass.yaml @@ -0,0 +1,9 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: nfs +provisioner: nfs.csi.k8s.io +reclaimPolicy: Retain +volumeBindingMode: Immediate +mountOptions: + - nfsvers=4.1 \ No newline at end of file