The minimum capacity of an SFS Turbo file system is 500 GiB. By default, the root directory of an SFS Turbo file system is mounted to a container which, in most case, does not require such a large capacity.
The everest add-on allows you to dynamically create subdirectories in an SFS Turbo file system and mount these subdirectories to containers. In this way, an SFS Turbo file system can be shared by multiple containers to increase storage efficiency.
Deleting the subPath volume does not result in the deletion of the resources of the SFS Turbo file system.
The following is an example:
apiVersion: storage.k8s.io/v1 allowVolumeExpansion: true kind: StorageClass metadata: name: sfsturbo-subpath-sc mountOptions: - lock parameters: csi.storage.k8s.io/csi-driver-name: sfsturbo.csi.everest.io csi.storage.k8s.io/fstype: nfs everest.io/archive-on-delete: "true" everest.io/share-access-to: 7ca2dba2-1234-1234-1234-626371a8fb3a everest.io/share-expand-type: bandwidth everest.io/share-export-location: 192.168.1.1:/sfsturbo/ everest.io/share-source: sfs-turbo everest.io/share-volume-type: STANDARD everest.io/volume-as: subpath everest.io/volume-id: 0d773f2e-1234-1234-1234-de6a35074696 provisioner: everest-csi-provisioner reclaimPolicy: Delete volumeBindingMode: Immediate
In this example:
mountOptions: - vers=3 - timeo=600 - nolock - hard
The following is an example:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: sfs-turbo-test
namespace: default
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 50Gi
storageClassName: sfsturbo-subpath-sc
volumeMode: Filesystem
In this example:
The capacity of a subPath volume is restricted by the overall resource capacity of the corresponding SFS Turbo file system. If the resources of the SFS Turbo file system are inadequate, you can adjust the resource capacity via the SFS Turbo console.
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-turbo-subpath-example
namespace: default
generation: 1
labels:
appgroup: ''
spec:
replicas: 1
selector:
matchLabels:
app: test-turbo-subpath-example
template:
metadata:
labels:
app: test-turbo-subpath-example
spec:
containers:
- image: nginx:latest
name: container-0
volumeMounts:
- mountPath: /tmp
name: pvc-sfs-turbo-example
restartPolicy: Always
imagePullSecrets:
- name: default-secret
volumes:
- name: pvc-sfs-turbo-example
persistentVolumeClaim:
claimName: sfs-turbo-test
In this example:
kubectl create -f deployment-test.yaml
The following is an example:
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test-turbo-subpath
namespace: default
generation: 1
labels:
appgroup: ''
spec:
replicas: 2
selector:
matchLabels:
app: test-turbo-subpath
template:
metadata:
labels:
app: test-turbo-subpath
annotations:
metrics.alpha.kubernetes.io/custom-endpoints: '[{"api":"","path":"","port":"","names":""}]'
pod.alpha.kubernetes.io/initialized: 'true'
spec:
containers:
- name: container-0
image: 'nginx:latest'
resources: {}
volumeMounts:
- name: sfs-turbo-160024548582479676
mountPath: /tmp
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
imagePullSecrets:
- name: default-secret
affinity: {}
schedulerName: default-scheduler
volumeClaimTemplates:
- metadata:
name: sfs-turbo-160024548582479676
namespace: default
annotations: {}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: sfsturbo-subpath-sc
serviceName: wwww
podManagementPolicy: OrderedReady
updateStrategy:
type: RollingUpdate
revisionHistoryLimit: 10
In this example:
kubectl create -f statefulset-test.yaml