File tree Expand file tree Collapse file tree 6 files changed +39
-10
lines changed Expand file tree Collapse file tree 6 files changed +39
-10
lines changed Original file line number Diff line number Diff line change @@ -143,9 +143,7 @@ create-metrics-svc:
143
143
144
144
.PHONY : create-example-deployment
145
145
create-example-deployment :
146
- kubectl apply -f deploy/example/storageclass-blobfuse.yaml
147
- kubectl apply -f deploy/example/deployment.yaml
148
- kubectl apply -f deploy/example/statefulset.yaml
146
+ ./hack/verify-examples.sh
149
147
150
148
.PHONY : delete-metrics-svc
151
149
delete-metrics-svc :
Original file line number Diff line number Diff line change 2
2
apiVersion : apps/v1
3
3
kind : StatefulSet
4
4
metadata :
5
- name : statefulset-blob
5
+ name : statefulset-blob-nonroot
6
6
labels :
7
7
app : nginx
8
8
spec :
9
- serviceName : statefulset-blob
9
+ serviceName : statefulset-blob-nonroot
10
10
replicas : 1
11
11
template :
12
12
metadata :
23
23
- name : statefulset-blob
24
24
image : andyzhangx/ubuntu1604:nonroot
25
25
command :
26
- - " /bin/sh "
26
+ - " /bin/bash "
27
27
- " -c"
28
- - while true; do echo $(date) >> /mnt/blob/outfile; sleep 1; done
28
+ - set -euo pipefail; while true; do echo $(date) >> /mnt/blob/outfile; sleep 1; done
29
29
volumeMounts :
30
30
- name : persistent-storage
31
31
mountPath : /mnt/blob
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ spec:
17
17
" kubernetes.io/os " : linux
18
18
containers :
19
19
- name : statefulset-blob
20
- image : mcr.microsoft.com/oss/nginx/nginx:1.17.3-alpine
20
+ image : mcr.microsoft.com/oss/nginx/nginx:1.19.5
21
21
command :
22
- - " /bin/sh "
22
+ - " /bin/bash "
23
23
- " -c"
24
- - while true; do echo $(date) >> /mnt/blob/outfile; sleep 1; done
24
+ - set -euo pipefail; while true; do echo $(date) >> /mnt/blob/outfile; sleep 1; done
25
25
volumeMounts :
26
26
- name : persistent-storage
27
27
mountPath : /mnt/blob
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Copyright 2020 The Kubernetes Authors.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ set -euo pipefail
17
+
18
+ echo " begin to create deployment examples ..."
19
+ kubectl apply -f deploy/example/storageclass-blobfuse.yaml
20
+ kubectl apply -f deploy/example/deployment.yaml
21
+ kubectl apply -f deploy/example/statefulset.yaml
22
+ kubectl apply -f deploy/example/statefulset-nonroot.yaml
23
+
24
+ echo " sleep 90s ..."
25
+ sleep 90
26
+
27
+ kubectl get pods --field-selector status.phase=Running | grep deployment-blob
28
+ kubectl get pods --field-selector status.phase=Running | grep statefulset-blob-0
29
+ kubectl get pods --field-selector status.phase=Running | grep statefulset-blob-nonroot-0
30
+
31
+ echo " deployment examples running completed."
You can’t perform that action at this time.
0 commit comments