mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 18:18:41 +00:00
Signed-off-by: Andrei Kvapil <kvapss@gmail.com> ## What this PR does This PR adds a new optional module to support nfs shares ## Way to test it: #### driver and provisioner setup ```yaml --- apiVersion: v1 kind: Namespace metadata: labels: cozystack.io/system: "true" pod-security.kubernetes.io/enforce: privileged name: cozy-nfs-driver spec: finalizers: - kubernetes --- apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease metadata: labels: cozystack.io/repository: system cozystack.io/system-app: "true" name: nfs-driver namespace: cozy-nfs-driver spec: chart: spec: chart: cozy-nfs-driver reconcileStrategy: Revision sourceRef: kind: HelmRepository name: cozystack-system namespace: cozy-system version: '>= 0.0.0-0' dependsOn: - name: cilium namespace: cozy-cilium - name: kubeovn namespace: cozy-kubeovn install: crds: CreateReplace remediation: retries: -1 interval: 5m releaseName: nfs-driver suspend: true upgrade: crds: CreateReplace remediation: retries: -1 ``` Then `cd packages/system/csi-driver-nfs` and: ``` make apply ``` #### export share ```bash apt install nfs-server mkdir /data chmod 777 /data echo '/data *(rw,sync,no_subtree_check)' >> /etc/exports exportfs -a ``` #### configure connection ```yaml --- apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: nfs provisioner: nfs.csi.k8s.io parameters: server: 10.244.57.210 share: /data reclaimPolicy: Delete volumeBindingMode: Immediate allowVolumeExpansion: true mountOptions: - nfsvers=4.1 ``` #### order volume ```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: task-pv-claim spec: storageClassName: nfs accessModes: - ReadWriteMany resources: requests: storage: 3Gi ``` ### Release note <!-- Write a release note: - Explain what has changed internally and for users. - Start with the same [label] as in the PR title - Follow the guidelines at https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md. --> ```release-note [nfs-driver] Introduce new optional module to order volumes from NFS shares ```