Skip to content

Commit

Permalink
Merge pull request kubernetes-csi#47 from shiftstack/merge-bot-master
Browse files Browse the repository at this point in the history
  • Loading branch information
openshift-merge-robot authored Jul 5, 2021
2 parents 7dab829 + 2423a96 commit b697709
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
38 changes: 38 additions & 0 deletions deploy/example/daemonset-nfs-ephemeral.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: daemonset-nfs-ephemeral
spec:
selector:
matchLabels:
app: daemonset-nfs-ephemeral
template:
metadata:
labels:
app: daemonset-nfs-ephemeral
spec:
nodeSelector:
kubernetes.io/os: linux
containers:
- name: nginx
image: mcr.microsoft.com/oss/nginx/nginx:1.19.5
command:
- "/bin/bash"
- "-c"
- set -euo pipefail; while true; do echo $(date) >> /mnt/nfs/outfile; sleep 1; done
volumeMounts:
- name: nfs
mountPath: "/mnt/nfs"
readOnly: false
volumes:
- name: nfs
ephemeral:
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: nfs-csi
6 changes: 6 additions & 0 deletions hack/verify-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ echo "begin to create deployment examples ..."
kubectl apply -f ./deploy/example/storageclass-nfs.yaml
kubectl apply -f ./deploy/example/deployment.yaml
kubectl apply -f ./deploy/example/statefulset.yaml
if [[ "$#" -gt 0 ]]&&[[ "$1" == *"ephemeral"* ]]; then
kubectl apply -f ./deploy/example/daemonset-nfs-ephemeral.yaml
fi

echo "sleep 60s ..."
sleep 60
Expand All @@ -29,5 +32,8 @@ kubectl get pods -o wide

kubectl get pods --field-selector status.phase=Running | grep deployment-nfs
kubectl get pods --field-selector status.phase=Running | grep statefulset-nfs-0
if [[ "$#" -gt 0 ]]&&[[ "$1" == *"ephemeral"* ]]; then
kubectl get pods --field-selector status.phase=Running | grep daemonset-nfs-ephemeral
fi

echo "deployment examples running completed."
1 change: 1 addition & 0 deletions test/external-e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ setup_e2e_binaries() {
}

print_logs() {
bash ./hack/verify-examples.sh ephemeral
echo "print out driver logs ..."
bash ./test/utils/nfs_log.sh
}
Expand Down

0 comments on commit b697709

Please sign in to comment.