From 336fa7cfdac2af4d6dd748a1f4f36e5a2e26821e Mon Sep 17 00:00:00 2001 From: Xiangfei Zhu Date: Fri, 6 Jan 2017 09:53:02 +0000 Subject: [PATCH 1/2] Use the same name in volumeMounts and volumes In some example files of vSphere volumes, volumeMounts and volumes have different names. kubectl create will fail with error message saying the pod is invalid because volumeMount with the name is not found. --- examples/volumes/vsphere/README.md | 4 ++-- examples/volumes/vsphere/vsphere-volume-pvcpod.yaml | 4 ++-- examples/volumes/vsphere/vsphere-volume-pvcscpod.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/volumes/vsphere/README.md b/examples/volumes/vsphere/README.md index 0ac4f774c5d..897bd835d6e 100644 --- a/examples/volumes/vsphere/README.md +++ b/examples/volumes/vsphere/README.md @@ -176,7 +176,7 @@ - name: test-volume mountPath: /test-vmdk volumes: - - name: vmdk-storage + - name: test-volume persistentVolumeClaim: claimName: pvc0001 ``` @@ -315,7 +315,7 @@ - name: test-volume mountPath: /test-vmdk volumes: - - name: vmdk-storage + - name: test-volume persistentVolumeClaim: claimName: pvcsc001 ``` diff --git a/examples/volumes/vsphere/vsphere-volume-pvcpod.yaml b/examples/volumes/vsphere/vsphere-volume-pvcpod.yaml index ae903183c8a..291664adaa9 100644 --- a/examples/volumes/vsphere/vsphere-volume-pvcpod.yaml +++ b/examples/volumes/vsphere/vsphere-volume-pvcpod.yaml @@ -10,6 +10,6 @@ spec: - name: test-volume mountPath: /test-vmdk volumes: - - name: vmdk-storage + - name: test-volume persistentVolumeClaim: - claimName: pvc0001 \ No newline at end of file + claimName: pvc0001 diff --git a/examples/volumes/vsphere/vsphere-volume-pvcscpod.yaml b/examples/volumes/vsphere/vsphere-volume-pvcscpod.yaml index d7167ac0451..e60a5bc2c6d 100644 --- a/examples/volumes/vsphere/vsphere-volume-pvcscpod.yaml +++ b/examples/volumes/vsphere/vsphere-volume-pvcscpod.yaml @@ -10,6 +10,6 @@ spec: - name: test-volume mountPath: /test-vmdk volumes: - - name: vmdk-storage + - name: test-volume persistentVolumeClaim: - claimName: pvcsc0001 \ No newline at end of file + claimName: pvcsc0001 From eeae1bed4a498ef928f57da78bc9fc0e0568c324 Mon Sep 17 00:00:00 2001 From: Xiangfei Zhu Date: Mon, 9 Jan 2017 06:10:09 +0000 Subject: [PATCH 2/2] Correct PVC name in Pod spec Persistent Volume Claim name in README and other file is pvcsc001, but it is pvcsc0001 in this file. Change it to match with others. --- examples/volumes/vsphere/vsphere-volume-pvcscpod.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/volumes/vsphere/vsphere-volume-pvcscpod.yaml b/examples/volumes/vsphere/vsphere-volume-pvcscpod.yaml index e60a5bc2c6d..036aeb280cb 100644 --- a/examples/volumes/vsphere/vsphere-volume-pvcscpod.yaml +++ b/examples/volumes/vsphere/vsphere-volume-pvcscpod.yaml @@ -12,4 +12,4 @@ spec: volumes: - name: test-volume persistentVolumeClaim: - claimName: pvcsc0001 + claimName: pvcsc001