-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Improve documentation on mount options and different volume typ…
…es (#39) * docs: create custom mount options README.md * docs: append readonly exam * docs: append comparison of different volume types to usage.md
- Loading branch information
1 parent
5433d35
commit 6023665
Showing
7 changed files
with
119 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
examples/dynamic_filesystem/csi-app-on-fs-api-readonly.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
kind: Pod | ||
apiVersion: v1 | ||
metadata: | ||
name: csi-app-on-fs-api | ||
spec: | ||
# make sure that pod is scheduled only on node having weka CSI node running | ||
nodeSelector: | ||
topology.csi.weka.io/global: "true" | ||
containers: | ||
- name: my-frontend | ||
image: ubuntu | ||
volumeMounts: | ||
- mountPath: "/data" | ||
name: my-csi-volume | ||
readOnly: true | ||
command: ["/bin/sh"] | ||
args: ["-c", "while true; do echo `date` hello >> /data/temp.txt; sleep 10;done"] | ||
volumes: | ||
- name: my-csi-volume | ||
persistentVolumeClaim: | ||
claimName: pvc-wekafs-fs-api # defined in pvc-wekafs-dir-api.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Overview | ||
|
||
## Example Intentions | ||
In rare circumstances, additional mount options (e.g. different caching settings) are desired for a particular flow. | ||
|
||
1. This example concentrates on setting custom mount options | ||
2. The example makes a use of a filesystem-backed volume, but the feature is functional on any other type of volume backings | ||
|
||
# Workflow | ||
> All commands below may be executed by `kubectl apply -f <FILE>.yaml` | ||
1. Create storageclass `storageclass-wekafs-mountoptions` | ||
2. Create CSI secret `csi-wekafs-api-secret` (Located in [../common/csi-wekafs-api-secret.yaml](../common/csi-wekafs-api-secret.yaml)) | ||
3. Provision a new volume `pvc-wekafs-fs-mountoptions` | ||
4. Create application that writes timestamp every 10 seconds into `/data/temp.txt`: `csi-app-fs-mountoptions` | ||
5. Attach to the application and validate the options are added correctly | ||
``` | ||
kubectl exec csi-app-fs-mountoptions -- mount -t wekafs | ||
``` | ||
The output should resemble this: | ||
``` | ||
csivol-pvc-15a45f20-Z72GJXDCEWQ5 on /data type wekafs (rw,relatime,readcache,noatime,readahead_kb=32768,dentry_max_age_positive=1000,dentry_max_age_negative=0) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
kind: Pod | ||
apiVersion: v1 | ||
metadata: | ||
name: csi-app-on-fs-mountoptions | ||
spec: | ||
# make sure that pod is scheduled only on node having weka CSI node running | ||
nodeSelector: | ||
topology.csi.weka.io/global: "true" | ||
containers: | ||
- name: my-frontend | ||
image: ubuntu | ||
volumeMounts: | ||
- mountPath: "/data" | ||
name: my-csi-volume | ||
command: ["/bin/sh"] | ||
args: ["-c", "while true; do echo `date` hello >> /data/temp.txt; sleep 10;done"] | ||
volumes: | ||
- name: my-csi-volume | ||
persistentVolumeClaim: | ||
claimName: pvc-wekafs-fs-mountoptions # defined in pvc-wekafs-dir-api.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: pvc-wekafs-fs-mountoptions | ||
spec: | ||
accessModes: | ||
- ReadOnlyMany | ||
storageClassName: storageclass-wekafs-fs-mountoptions | ||
volumeMode: Filesystem | ||
resources: | ||
requests: | ||
storage: 1Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters