File tree Expand file tree Collapse file tree 5 files changed +150
-2
lines changed Expand file tree Collapse file tree 5 files changed +150
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ kind : PersistentVolumeClaim
3
+ apiVersion : v1
4
+ metadata :
5
+ name : pvc-blob-nfs
6
+ spec :
7
+ accessModes :
8
+ - ReadWriteMany
9
+ resources :
10
+ requests :
11
+ storage : 1Gi
12
+ storageClassName : blob-nfs
13
+ ---
14
+ apiVersion : apps/v1
15
+ kind : Deployment
16
+ metadata :
17
+ labels :
18
+ app : nginx
19
+ name : deployment-blob-nfs
20
+ spec :
21
+ replicas : 1
22
+ selector :
23
+ matchLabels :
24
+ app : nginx
25
+ template :
26
+ metadata :
27
+ labels :
28
+ app : nginx
29
+ name : deployment-blob-nfs
30
+ spec :
31
+ nodeSelector :
32
+ " kubernetes.io/os " : linux
33
+ containers :
34
+ - name : deployment-blob-nfs
35
+ image : mcr.microsoft.com/oss/nginx/nginx:1.17.3-alpine
36
+ command :
37
+ - " /bin/sh"
38
+ - " -c"
39
+ - while true; do echo $(date) >> /mnt/blob/outfile; sleep 1; done
40
+ volumeMounts :
41
+ - name : blob
42
+ mountPath : " /mnt/blob"
43
+ readOnly : false
44
+ volumes :
45
+ - name : blob
46
+ persistentVolumeClaim :
47
+ claimName : pvc-blob-nfs
48
+ strategy :
49
+ rollingUpdate :
50
+ maxSurge : 0
51
+ maxUnavailable : 1
52
+ type : RollingUpdate
Original file line number Diff line number Diff line change
1
+ ---
2
+ apiVersion : apps/v1
3
+ kind : StatefulSet
4
+ metadata :
5
+ name : statefulset-blob-nfs
6
+ labels :
7
+ app : nginx
8
+ spec :
9
+ serviceName : statefulset-blob-nfs
10
+ replicas : 1
11
+ template :
12
+ metadata :
13
+ labels :
14
+ app : nginx
15
+ spec :
16
+ nodeSelector :
17
+ " kubernetes.io/os " : linux
18
+ containers :
19
+ - name : statefulset-blob-nfs
20
+ image : mcr.microsoft.com/oss/nginx/nginx:1.19.5
21
+ command :
22
+ - " /bin/bash"
23
+ - " -c"
24
+ - set -euo pipefail; while true; do echo $(date) >> /mnt/blob/outfile; sleep 1; done
25
+ volumeMounts :
26
+ - name : persistent-storage
27
+ mountPath : /mnt/blob
28
+ updateStrategy :
29
+ type : RollingUpdate
30
+ selector :
31
+ matchLabels :
32
+ app : nginx
33
+ volumeClaimTemplates :
34
+ - metadata :
35
+ name : persistent-storage
36
+ annotations :
37
+ volume.beta.kubernetes.io/storage-class : blob-nfs
38
+ spec :
39
+ accessModes : ["ReadWriteMany"]
40
+ resources :
41
+ requests :
42
+ storage : 100Gi
Original file line number Diff line number Diff line change
1
+ ---
2
+ apiVersion : apps/v1
3
+ kind : StatefulSet
4
+ metadata :
5
+ name : statefulset-blob-nonroot-nfs
6
+ labels :
7
+ app : nginx
8
+ spec :
9
+ serviceName : statefulset-blob-nonroot-nfs
10
+ replicas : 1
11
+ template :
12
+ metadata :
13
+ labels :
14
+ app : nginx
15
+ spec :
16
+ securityContext : # optional just to make sure user is non-root
17
+ runAsUser : 10001
18
+ runAsGroup : 10001
19
+ fsGroup : 10001
20
+ nodeSelector :
21
+ " kubernetes.io/os " : linux
22
+ containers :
23
+ - name : statefulset-blob
24
+ image : andyzhangx/ubuntu1604:nonroot
25
+ command :
26
+ - " /bin/bash"
27
+ - " -c"
28
+ - set -euo pipefail; while true; do echo $(date) >> /mnt/blob/outfile; sleep 1; done
29
+ volumeMounts :
30
+ - name : persistent-storage
31
+ mountPath : /mnt/blob
32
+ updateStrategy :
33
+ type : RollingUpdate
34
+ selector :
35
+ matchLabels :
36
+ app : nginx
37
+ volumeClaimTemplates :
38
+ - metadata :
39
+ name : persistent-storage
40
+ annotations :
41
+ volume.beta.kubernetes.io/storage-class : blob-nfs
42
+ spec :
43
+ accessModes : ["ReadWriteMany"]
44
+ resources :
45
+ requests :
46
+ storage : 100Gi
Original file line number Diff line number Diff line change @@ -17,15 +17,22 @@ set -euo pipefail
17
17
18
18
echo " begin to create deployment examples ..."
19
19
kubectl apply -f deploy/example/storageclass-blobfuse.yaml
20
+ kubectl apply -f deploy/example/storageclass-blob-nfs.yaml
20
21
kubectl apply -f deploy/example/deployment.yaml
21
22
kubectl apply -f deploy/example/statefulset.yaml
22
23
kubectl apply -f deploy/example/statefulset-nonroot.yaml
24
+ kubectl apply -f deploy/example/deployment-nfs.yaml
25
+ kubectl apply -f deploy/example/statefulset-nfs.yaml
26
+ kubectl apply -f deploy/example/statefulset-nonroot-nfs.yaml
23
27
24
- echo " sleep 60s ..."
25
- sleep 60
28
+ echo " sleep 90s ..."
29
+ sleep 90
26
30
27
31
kubectl get pods --field-selector status.phase=Running | grep deployment-blob
28
32
kubectl get pods --field-selector status.phase=Running | grep statefulset-blob-0
29
33
kubectl get pods --field-selector status.phase=Running | grep statefulset-blob-nonroot-0
34
+ kubectl get pods --field-selector status.phase=Running | grep deployment-blob-nfs
35
+ kubectl get pods --field-selector status.phase=Running | grep statefulset-blob-nfs-0
36
+ kubectl get pods --field-selector status.phase=Running | grep statefulset-blob-nonroot-nfs-0
30
37
31
38
echo " deployment examples running completed."
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ setup_e2e_binaries() {
39
39
}
40
40
41
41
print_logs () {
42
+ bash ./hack/verify-examples.sh
42
43
echo " print out driver logs ..."
43
44
bash ./test/utils/blob_log.sh
44
45
}
You can’t perform that action at this time.
0 commit comments