Merge pull request #120 from andyzhangx/format-yaml-files

doc: format yaml files
This commit is contained in:
Andy Zhang 2020-12-27 11:51:54 +08:00 committed by GitHub
commit 683838d7bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 38 additions and 38 deletions

View File

@ -1,7 +1,7 @@
image: image:
nfs: nfs:
repository: gcr.io/k8s-staging-sig-storage/nfsplugin repository: mcr.microsoft.com/k8s/csi/nfs-csi
tag: amd64-linux-canary tag: latest
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
csiProvisioner: csiProvisioner:
repository: k8s.gcr.io/sig-storage/csi-provisioner repository: k8s.gcr.io/sig-storage/csi-provisioner

View File

@ -61,7 +61,7 @@ spec:
cpu: 10m cpu: 10m
memory: 20Mi memory: 20Mi
- name: nfs - name: nfs
image: gcr.io/k8s-staging-sig-storage/nfsplugin:amd64-linux-canary image: mcr.microsoft.com/k8s/csi/nfs-csi:latest
securityContext: securityContext:
privileged: true privileged: true
capabilities: capabilities:

View File

@ -63,7 +63,7 @@ spec:
capabilities: capabilities:
add: ["SYS_ADMIN"] add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true allowPrivilegeEscalation: true
image: gcr.io/k8s-staging-sig-storage/nfsplugin:amd64-linux-canary image: mcr.microsoft.com/k8s/csi/nfs-csi:latest
args: args:
- "-v=5" - "-v=5"
- "--nodeid=$(NODE_ID)" - "--nodeid=$(NODE_ID)"

View File

@ -16,29 +16,29 @@ 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
template: template:
metadata: metadata:
name: deployment-nfs
labels:
name: deployment-nfs name: deployment-nfs
labels:
name: deployment-nfs
spec: spec:
nodeSelector: nodeSelector:
"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"
volumes: volumes:
- name: nfs - name: nfs
persistentVolumeClaim: persistentVolumeClaim:
claimName: pvc-deployment-nfs claimName: pvc-deployment-nfs

View File

@ -39,15 +39,15 @@ metadata:
name: nginx-nfs-example name: nginx-nfs-example
spec: spec:
containers: containers:
- image: nginx - image: nginx
name: nginx name: nginx
ports: ports:
- containerPort: 80 - containerPort: 80
protocol: TCP protocol: TCP
volumeMounts: volumeMounts:
- mountPath: /var/www - mountPath: /var/www
name: pvc-nginx name: pvc-nginx
volumes: volumes:
- name: pvc-nginx - name: pvc-nginx
persistentVolumeClaim: persistentVolumeClaim:
claimName: pvc-nginx claimName: pvc-nginx

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

@ -7,7 +7,7 @@ provisioner: nfs.csi.k8s.io
parameters: parameters:
server: nfs-server.default.svc.cluster.local server: nfs-server.default.svc.cluster.local
share: / share: /
reclaimPolicy: Retain # only retain is supported reclaimPolicy: Retain
volumeBindingMode: Immediate volumeBindingMode: Immediate
mountOptions: mountOptions:
- hard - hard

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