doc: format yaml files

This commit is contained in:
andyzhangx 2020-12-26 14:06:58 +00:00
parent c7ec3f94c9
commit a1b1a49a9a
5 changed files with 33 additions and 33 deletions

View File

@ -16,7 +16,7 @@ kind: Deployment
metadata: metadata:
name: deployment-nfs name: deployment-nfs
spec: spec:
replicas: 3 replicas: 1
selector: selector:
matchLabels: matchLabels:
name: deployment-nfs name: deployment-nfs
@ -30,11 +30,11 @@ spec:
"kubernetes.io/os": linux "kubernetes.io/os": linux
containers: containers:
- name: deployment-nfs - name: deployment-nfs
image: mcr.microsoft.com/oss/nginx/nginx:1.17.3-alpine image: mcr.icrosoft.com/oss/nginx/nginx:1.19.5
command: command:
- "/bin/sh" - "/bin/bash"
- "-c" - "-c"
- while true; do echo $(hostname) $(date) >> /mnt/nfs/outfile; sleep 1; done - set -euo pipefail; while true; do echo $(hostname) $(date) >> /mnt/nfs/outfile; sleep 1; done
volumeMounts: volumeMounts:
- name: nfs - name: nfs
mountPath: "/mnt/nfs" mountPath: "/mnt/nfs"

View File

@ -7,7 +7,7 @@ metadata:
app: nginx app: nginx
spec: spec:
serviceName: statefulset-nfs serviceName: statefulset-nfs
replicas: 3 replicas: 1
template: template:
metadata: metadata:
labels: labels:
@ -17,11 +17,11 @@ spec:
"kubernetes.io/os": linux "kubernetes.io/os": linux
containers: containers:
- name: statefulset-nfs - name: statefulset-nfs
image: mcr.microsoft.com/oss/nginx/nginx:1.17.3-alpine image: mcr.microsoft.com/oss/nginx/nginx:1.19.5
command: command:
- "/bin/sh" - "/bin/bash"
- "-c" - "-c"
- while true; do echo $(date) >> /mnt/nfs/outfile; sleep 1; done - set -euo pipefail; while true; do echo $(date) >> /mnt/nfs/outfile; sleep 1; done
volumeMounts: volumeMounts:
- name: persistent-storage - name: persistent-storage
mountPath: /mnt/nfs mountPath: /mnt/nfs

View File

@ -29,7 +29,7 @@ if [[ "${deployDirNum}" != "${helmDirNum}" ]]; then
exit 1 exit 1
fi fi
for path in "deploy/*.yaml" for path in "deploy/*.yaml" "deploy/example/*.yaml" "deploy/example/nfs-provisioner/*.yaml"
do do
echo "checking yamllint under path: $path ..." echo "checking yamllint under path: $path ..."
yamllint -f parsable $path | grep -v "line too long" > $LOG yamllint -f parsable $path | grep -v "line too long" > $LOG