diff --git a/charts/latest/csi-driver-nfs/values.yaml b/charts/latest/csi-driver-nfs/values.yaml index 59e7bed8..42d05c5b 100644 --- a/charts/latest/csi-driver-nfs/values.yaml +++ b/charts/latest/csi-driver-nfs/values.yaml @@ -1,7 +1,7 @@ image: nfs: - repository: gcr.io/k8s-staging-sig-storage/nfsplugin - tag: amd64-linux-canary + repository: mcr.microsoft.com/k8s/csi/nfs-csi + tag: latest pullPolicy: IfNotPresent csiProvisioner: repository: k8s.gcr.io/sig-storage/csi-provisioner diff --git a/deploy/csi-nfs-controller.yaml b/deploy/csi-nfs-controller.yaml index 9a2f3ef2..d7f44bec 100644 --- a/deploy/csi-nfs-controller.yaml +++ b/deploy/csi-nfs-controller.yaml @@ -61,7 +61,7 @@ spec: cpu: 10m memory: 20Mi - name: nfs - image: gcr.io/k8s-staging-sig-storage/nfsplugin:amd64-linux-canary + image: mcr.microsoft.com/k8s/csi/nfs-csi:latest securityContext: privileged: true capabilities: diff --git a/deploy/csi-nfs-node.yaml b/deploy/csi-nfs-node.yaml index 2cd3323b..dd66fa8d 100644 --- a/deploy/csi-nfs-node.yaml +++ b/deploy/csi-nfs-node.yaml @@ -63,7 +63,7 @@ spec: capabilities: add: ["SYS_ADMIN"] allowPrivilegeEscalation: true - image: gcr.io/k8s-staging-sig-storage/nfsplugin:amd64-linux-canary + image: mcr.microsoft.com/k8s/csi/nfs-csi:latest args: - "-v=5" - "--nodeid=$(NODE_ID)" diff --git a/deploy/example/deployment.yaml b/deploy/example/deployment.yaml index 4df5180a..6a4a0f71 100644 --- a/deploy/example/deployment.yaml +++ b/deploy/example/deployment.yaml @@ -16,29 +16,29 @@ kind: Deployment metadata: name: deployment-nfs spec: - replicas: 3 + replicas: 1 selector: matchLabels: - name: deployment-nfs + name: deployment-nfs template: metadata: + name: deployment-nfs + labels: name: deployment-nfs - labels: - name: deployment-nfs spec: nodeSelector: "kubernetes.io/os": linux containers: - - name: deployment-nfs - image: mcr.microsoft.com/oss/nginx/nginx:1.17.3-alpine - command: - - "/bin/sh" - - "-c" - - while true; do echo $(hostname) $(date) >> /mnt/nfs/outfile; sleep 1; done - volumeMounts: - - name: nfs - mountPath: "/mnt/nfs" + - name: deployment-nfs + image: mcr.icrosoft.com/oss/nginx/nginx:1.19.5 + command: + - "/bin/bash" + - "-c" + - set -euo pipefail; while true; do echo $(hostname) $(date) >> /mnt/nfs/outfile; sleep 1; done + volumeMounts: + - name: nfs + mountPath: "/mnt/nfs" volumes: - - name: nfs - persistentVolumeClaim: - claimName: pvc-deployment-nfs + - name: nfs + persistentVolumeClaim: + claimName: pvc-deployment-nfs diff --git a/deploy/example/nfs-provisioner/nginx-pod.yaml b/deploy/example/nfs-provisioner/nginx-pod.yaml index ab52f22e..81fb295d 100644 --- a/deploy/example/nfs-provisioner/nginx-pod.yaml +++ b/deploy/example/nfs-provisioner/nginx-pod.yaml @@ -39,15 +39,15 @@ metadata: name: nginx-nfs-example spec: containers: - - image: nginx - name: nginx - ports: - - containerPort: 80 - protocol: TCP - volumeMounts: - - mountPath: /var/www - name: pvc-nginx + - image: nginx + name: nginx + ports: + - containerPort: 80 + protocol: TCP + volumeMounts: + - mountPath: /var/www + name: pvc-nginx volumes: - - name: pvc-nginx - persistentVolumeClaim: - claimName: pvc-nginx + - name: pvc-nginx + persistentVolumeClaim: + claimName: pvc-nginx diff --git a/deploy/example/pvc-nfs-csi-dynamic.yaml b/deploy/example/pvc-nfs-csi-dynamic.yaml index cea7acb5..9055da39 100644 --- a/deploy/example/pvc-nfs-csi-dynamic.yaml +++ b/deploy/example/pvc-nfs-csi-dynamic.yaml @@ -9,4 +9,4 @@ spec: resources: requests: storage: 10Gi - storageClassName: nfs-csi \ No newline at end of file + storageClassName: nfs-csi diff --git a/deploy/example/statefulset.yaml b/deploy/example/statefulset.yaml index 99bc8aed..0a7116d3 100644 --- a/deploy/example/statefulset.yaml +++ b/deploy/example/statefulset.yaml @@ -7,7 +7,7 @@ metadata: app: nginx spec: serviceName: statefulset-nfs - replicas: 3 + replicas: 1 template: metadata: labels: @@ -17,11 +17,11 @@ spec: "kubernetes.io/os": linux containers: - 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: - - "/bin/sh" + - "/bin/bash" - "-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: - name: persistent-storage mountPath: /mnt/nfs diff --git a/deploy/example/storageclass-nfs.yaml b/deploy/example/storageclass-nfs.yaml index fdd8137c..d3f7d748 100644 --- a/deploy/example/storageclass-nfs.yaml +++ b/deploy/example/storageclass-nfs.yaml @@ -7,7 +7,7 @@ provisioner: nfs.csi.k8s.io parameters: server: nfs-server.default.svc.cluster.local share: / -reclaimPolicy: Retain # only retain is supported +reclaimPolicy: Retain volumeBindingMode: Immediate mountOptions: - hard diff --git a/hack/verify-yamllint.sh b/hack/verify-yamllint.sh index 2f64bcc2..634f384f 100755 --- a/hack/verify-yamllint.sh +++ b/hack/verify-yamllint.sh @@ -29,7 +29,7 @@ if [[ "${deployDirNum}" != "${helmDirNum}" ]]; then exit 1 fi -for path in "deploy/*.yaml" +for path in "deploy/*.yaml" "deploy/example/*.yaml" "deploy/example/nfs-provisioner/*.yaml" do echo "checking yamllint under path: $path ..." yamllint -f parsable $path | grep -v "line too long" > $LOG