From 4bc05f4fc2916c6fd9f4bcb597e9199e278eb645 Mon Sep 17 00:00:00 2001 From: xiangpengzhao Date: Fri, 25 Aug 2017 10:47:23 +0800 Subject: [PATCH] Remove storage-class annotations in examples --- .../kubernetes-master/templates/rbd-persistent-volume.yaml | 3 +-- examples/cockroachdb/cockroachdb-statefulset.yaml | 2 -- examples/storage/cassandra/cassandra-statefulset.yaml | 3 +-- examples/storage/minio/minio-distributed-statefulset.yaml | 2 -- examples/storage/minio/minio-standalone-pvc.yaml | 2 -- examples/volumes/nfs/provisioner/nfs-server-gce-pv.yaml | 2 -- examples/volumes/portworx/portworx-volume-pvcsc.yaml | 3 +-- examples/volumes/scaleio/sc-pvc.yaml | 3 +-- examples/volumes/vsphere/simple-statefulset.yaml | 3 +-- examples/volumes/vsphere/vsphere-volume-pvcsc.yaml | 3 +-- test/e2e/framework/statefulset_utils.go | 3 --- .../testing-manifests/statefulset/cockroachdb/statefulset.yaml | 2 -- test/e2e/testing-manifests/statefulset/etcd/statefulset.yaml | 3 --- .../statefulset/mysql-galera/statefulset.yaml | 2 -- test/e2e/testing-manifests/statefulset/redis/statefulset.yaml | 2 -- .../testing-manifests/statefulset/zookeeper/statefulset.yaml | 2 -- 16 files changed, 6 insertions(+), 34 deletions(-) diff --git a/cluster/juju/layers/kubernetes-master/templates/rbd-persistent-volume.yaml b/cluster/juju/layers/kubernetes-master/templates/rbd-persistent-volume.yaml index f82a7543b45..84248e54326 100644 --- a/cluster/juju/layers/kubernetes-master/templates/rbd-persistent-volume.yaml +++ b/cluster/juju/layers/kubernetes-master/templates/rbd-persistent-volume.yaml @@ -4,13 +4,12 @@ apiVersion: v1 kind: PersistentVolume metadata: name: {{ RBD_NAME }} - annotations: - volume.beta.kubernetes.io/storage-class: "rbd" spec: capacity: storage: {{ RBD_SIZE }}M accessModes: - {{ PV_MODE }} + storageClassName: "rbd" rbd: monitors: {% for host in monitors %} diff --git a/examples/cockroachdb/cockroachdb-statefulset.yaml b/examples/cockroachdb/cockroachdb-statefulset.yaml index 24446df42b7..acea795da0e 100644 --- a/examples/cockroachdb/cockroachdb-statefulset.yaml +++ b/examples/cockroachdb/cockroachdb-statefulset.yaml @@ -163,8 +163,6 @@ spec: volumeClaimTemplates: - metadata: name: datadir - annotations: - volume.alpha.kubernetes.io/storage-class: anything spec: accessModes: - "ReadWriteOnce" diff --git a/examples/storage/cassandra/cassandra-statefulset.yaml b/examples/storage/cassandra/cassandra-statefulset.yaml index 62d7d2a7131..bade7674b3a 100644 --- a/examples/storage/cassandra/cassandra-statefulset.yaml +++ b/examples/storage/cassandra/cassandra-statefulset.yaml @@ -82,13 +82,12 @@ spec: volumeClaimTemplates: - metadata: name: cassandra-data - annotations: - volume.beta.kubernetes.io/storage-class: fast spec: accessModes: [ "ReadWriteOnce" ] resources: requests: storage: 1Gi + storageClassName: fast --- kind: StorageClass apiVersion: storage.k8s.io/v1beta1 diff --git a/examples/storage/minio/minio-distributed-statefulset.yaml b/examples/storage/minio/minio-distributed-statefulset.yaml index 5457df249cf..9727f0e1808 100644 --- a/examples/storage/minio/minio-distributed-statefulset.yaml +++ b/examples/storage/minio/minio-distributed-statefulset.yaml @@ -39,8 +39,6 @@ spec: volumeClaimTemplates: - metadata: name: data - annotations: - volume.alpha.kubernetes.io/storage-class: anything spec: accessModes: - ReadWriteOnce diff --git a/examples/storage/minio/minio-standalone-pvc.yaml b/examples/storage/minio/minio-standalone-pvc.yaml index edd05215a9e..66b1c9800f2 100644 --- a/examples/storage/minio/minio-standalone-pvc.yaml +++ b/examples/storage/minio/minio-standalone-pvc.yaml @@ -3,8 +3,6 @@ kind: PersistentVolumeClaim metadata: # This name uniquely identifies the PVC. Will be used in deployment below. name: minio-pv-claim - annotations: - volume.alpha.kubernetes.io/storage-class: anything labels: app: minio-storage-claim spec: diff --git a/examples/volumes/nfs/provisioner/nfs-server-gce-pv.yaml b/examples/volumes/nfs/provisioner/nfs-server-gce-pv.yaml index 92f9f573584..cccb9a42a4a 100644 --- a/examples/volumes/nfs/provisioner/nfs-server-gce-pv.yaml +++ b/examples/volumes/nfs/provisioner/nfs-server-gce-pv.yaml @@ -4,8 +4,6 @@ metadata: name: nfs-pv-provisioning-demo labels: demo: nfs-pv-provisioning - annotations: - volume.alpha.kubernetes.io/storage-class: any spec: accessModes: [ "ReadWriteOnce" ] resources: diff --git a/examples/volumes/portworx/portworx-volume-pvcsc.yaml b/examples/volumes/portworx/portworx-volume-pvcsc.yaml index b07ddb3029e..736e67feeaf 100644 --- a/examples/volumes/portworx/portworx-volume-pvcsc.yaml +++ b/examples/volumes/portworx/portworx-volume-pvcsc.yaml @@ -2,11 +2,10 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: name: pvcsc001 - annotations: - volume.beta.kubernetes.io/storage-class: portworx-io-priority-high spec: accessModes: - ReadWriteOnce resources: requests: storage: 2Gi + storageClassName: portworx-io-priority-high diff --git a/examples/volumes/scaleio/sc-pvc.yaml b/examples/volumes/scaleio/sc-pvc.yaml index 3937a1e8254..078fb63548f 100644 --- a/examples/volumes/scaleio/sc-pvc.yaml +++ b/examples/volumes/scaleio/sc-pvc.yaml @@ -2,11 +2,10 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: name: pvc-sio-small - annotations: - volume.beta.kubernetes.io/storage-class: sio-small spec: accessModes: - ReadWriteOnce resources: requests: storage: 10Gi + storageClassName: sio-small diff --git a/examples/volumes/vsphere/simple-statefulset.yaml b/examples/volumes/vsphere/simple-statefulset.yaml index 465c7c5eddf..3684a3b64e1 100644 --- a/examples/volumes/vsphere/simple-statefulset.yaml +++ b/examples/volumes/vsphere/simple-statefulset.yaml @@ -37,10 +37,9 @@ spec: volumeClaimTemplates: - metadata: name: www - annotations: - volume.beta.kubernetes.io/storage-class: thin-disk spec: accessModes: [ "ReadWriteOnce" ] resources: requests: storage: 1Gi + storageClassName: thin-disk diff --git a/examples/volumes/vsphere/vsphere-volume-pvcsc.yaml b/examples/volumes/vsphere/vsphere-volume-pvcsc.yaml index f73ed91b5bd..03f3f8f8fe2 100644 --- a/examples/volumes/vsphere/vsphere-volume-pvcsc.yaml +++ b/examples/volumes/vsphere/vsphere-volume-pvcsc.yaml @@ -2,11 +2,10 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: name: pvcsc001 - annotations: - volume.beta.kubernetes.io/storage-class: fast spec: accessModes: - ReadWriteOnce resources: requests: storage: 2Gi + storageClassName: fast diff --git a/test/e2e/framework/statefulset_utils.go b/test/e2e/framework/statefulset_utils.go index 51a6e869f18..4f81e8ff7e0 100644 --- a/test/e2e/framework/statefulset_utils.go +++ b/test/e2e/framework/statefulset_utils.go @@ -751,9 +751,6 @@ func NewStatefulSetPVC(name string) v1.PersistentVolumeClaim { return v1.PersistentVolumeClaim{ ObjectMeta: metav1.ObjectMeta{ Name: name, - Annotations: map[string]string{ - "volume.alpha.kubernetes.io/storage-class": "anything", - }, }, Spec: v1.PersistentVolumeClaimSpec{ AccessModes: []v1.PersistentVolumeAccessMode{ diff --git a/test/e2e/testing-manifests/statefulset/cockroachdb/statefulset.yaml b/test/e2e/testing-manifests/statefulset/cockroachdb/statefulset.yaml index e998d5add4a..1404ccadb91 100644 --- a/test/e2e/testing-manifests/statefulset/cockroachdb/statefulset.yaml +++ b/test/e2e/testing-manifests/statefulset/cockroachdb/statefulset.yaml @@ -92,8 +92,6 @@ spec: volumeClaimTemplates: - metadata: name: datadir - annotations: - volume.alpha.kubernetes.io/storage-class: anything spec: accessModes: - "ReadWriteOnce" diff --git a/test/e2e/testing-manifests/statefulset/etcd/statefulset.yaml b/test/e2e/testing-manifests/statefulset/etcd/statefulset.yaml index c7800cd4e8f..4ddeb8be398 100644 --- a/test/e2e/testing-manifests/statefulset/etcd/statefulset.yaml +++ b/test/e2e/testing-manifests/statefulset/etcd/statefulset.yaml @@ -166,8 +166,6 @@ spec: volumeClaimTemplates: - metadata: name: datadir - annotations: - volume.alpha.kubernetes.io/storage-class: anything spec: accessModes: - "ReadWriteOnce" @@ -175,4 +173,3 @@ spec: requests: # upstream recommended max is 700M storage: 1Gi - diff --git a/test/e2e/testing-manifests/statefulset/mysql-galera/statefulset.yaml b/test/e2e/testing-manifests/statefulset/mysql-galera/statefulset.yaml index 5403371ceb0..4d982ba218a 100644 --- a/test/e2e/testing-manifests/statefulset/mysql-galera/statefulset.yaml +++ b/test/e2e/testing-manifests/statefulset/mysql-galera/statefulset.yaml @@ -77,8 +77,6 @@ spec: volumeClaimTemplates: - metadata: name: datadir - annotations: - volume.alpha.kubernetes.io/storage-class: anything spec: accessModes: [ "ReadWriteOnce" ] resources: diff --git a/test/e2e/testing-manifests/statefulset/redis/statefulset.yaml b/test/e2e/testing-manifests/statefulset/redis/statefulset.yaml index dfdd3e29336..e324ef5613f 100644 --- a/test/e2e/testing-manifests/statefulset/redis/statefulset.yaml +++ b/test/e2e/testing-manifests/statefulset/redis/statefulset.yaml @@ -71,8 +71,6 @@ spec: volumeClaimTemplates: - metadata: name: datadir - annotations: - volume.alpha.kubernetes.io/storage-class: anything spec: accessModes: [ "ReadWriteOnce" ] resources: diff --git a/test/e2e/testing-manifests/statefulset/zookeeper/statefulset.yaml b/test/e2e/testing-manifests/statefulset/zookeeper/statefulset.yaml index 762ededbb22..4160bdff42d 100644 --- a/test/e2e/testing-manifests/statefulset/zookeeper/statefulset.yaml +++ b/test/e2e/testing-manifests/statefulset/zookeeper/statefulset.yaml @@ -78,8 +78,6 @@ spec: volumeClaimTemplates: - metadata: name: datadir - annotations: - volume.alpha.kubernetes.io/storage-class: anything spec: accessModes: [ "ReadWriteOnce" ] resources: