Skip to content

Commit ec9b546

Browse files
committed
test: run non-root container test
1 parent 10aa6c2 commit ec9b546

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ create-example-deployment:
146146
kubectl apply -f deploy/example/storageclass-blobfuse.yaml
147147
kubectl apply -f deploy/example/deployment.yaml
148148
kubectl apply -f deploy/example/statefulset.yaml
149+
kubectl apply -f deploy/example/statefulset-nonroot.yaml
149150

150151
.PHONY: delete-metrics-svc
151152
delete-metrics-svc:

deploy/example/statefulset-nonroot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ spec:
2323
- name: statefulset-blob
2424
image: andyzhangx/ubuntu1604:nonroot
2525
command:
26-
- "/bin/sh"
26+
- "/bin/bash"
2727
- "-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
2929
volumeMounts:
3030
- name: persistent-storage
3131
mountPath: /mnt/blob

deploy/example/statefulset.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ spec:
1717
"kubernetes.io/os": linux
1818
containers:
1919
- 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
2121
command:
22-
- "/bin/sh"
22+
- "/bin/bash"
2323
- "-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
2525
volumeMounts:
2626
- name: persistent-storage
2727
mountPath: /mnt/blob

0 commit comments

Comments
 (0)