From 3045bfe24cdce51a1551f685a1f14ff28fea7bbc Mon Sep 17 00:00:00 2001 From: Tennix Date: Fri, 16 Aug 2019 15:59:52 +0800 Subject: [PATCH] =?UTF-8?q?deploy,=20manifests:=20enable=20cloud=20storage?= =?UTF-8?q?=20volume=20expansion=20&=20label=E2=80=A6=20(#772)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tidb-operator/manifest/alicloud-disk-storageclass.yaml | 1 + .../tidb-operator/templates/local-volume-provisioner.yaml.tpl | 2 ++ .../modules/aws/tidb-operator/manifests/gp2-storageclass.yaml | 1 + .../aws/tidb-operator/manifests/local-volume-provisioner.yaml | 2 ++ manifests/gke/local-ssd-provision/local-ssd-provision.yaml | 2 ++ manifests/gke/persistent-disk.yaml | 2 ++ manifests/gp2-storage.yaml | 4 +++- 7 files changed, 13 insertions(+), 1 deletion(-) diff --git a/deploy/modules/aliyun/tidb-operator/manifest/alicloud-disk-storageclass.yaml b/deploy/modules/aliyun/tidb-operator/manifest/alicloud-disk-storageclass.yaml index efd262544e..d82005eda7 100644 --- a/deploy/modules/aliyun/tidb-operator/manifest/alicloud-disk-storageclass.yaml +++ b/deploy/modules/aliyun/tidb-operator/manifest/alicloud-disk-storageclass.yaml @@ -7,3 +7,4 @@ parameters: provisioner: alicloud/disk reclaimPolicy: Retain volumeBindingMode: WaitForFirstConsumer +allowVolumeExpansion: true diff --git a/deploy/modules/aliyun/tidb-operator/templates/local-volume-provisioner.yaml.tpl b/deploy/modules/aliyun/tidb-operator/templates/local-volume-provisioner.yaml.tpl index d23aff0263..8fa4313b22 100644 --- a/deploy/modules/aliyun/tidb-operator/templates/local-volume-provisioner.yaml.tpl +++ b/deploy/modules/aliyun/tidb-operator/templates/local-volume-provisioner.yaml.tpl @@ -4,6 +4,8 @@ metadata: name: local-provisioner-config namespace: kube-system data: + nodeLabelsForPV: | + - kubernetes.io/hostname storageClassMap: | local-volume: vendor: alibabacloud diff --git a/deploy/modules/aws/tidb-operator/manifests/gp2-storageclass.yaml b/deploy/modules/aws/tidb-operator/manifests/gp2-storageclass.yaml index cbe9d7a460..a0b12ea847 100644 --- a/deploy/modules/aws/tidb-operator/manifests/gp2-storageclass.yaml +++ b/deploy/modules/aws/tidb-operator/manifests/gp2-storageclass.yaml @@ -8,3 +8,4 @@ parameters: fsType: ext4 reclaimPolicy: Retain volumeBindingMode: WaitForFirstConsumer +allowVolumeExpansion: true diff --git a/deploy/modules/aws/tidb-operator/manifests/local-volume-provisioner.yaml b/deploy/modules/aws/tidb-operator/manifests/local-volume-provisioner.yaml index 1942da6814..9873298bb4 100644 --- a/deploy/modules/aws/tidb-operator/manifests/local-volume-provisioner.yaml +++ b/deploy/modules/aws/tidb-operator/manifests/local-volume-provisioner.yaml @@ -12,6 +12,8 @@ metadata: name: local-provisioner-config namespace: kube-system data: + nodeLabelsForPV: | + - kubernetes.io/hostname storageClassMap: | local-storage: hostDir: /mnt/local-ssd diff --git a/manifests/gke/local-ssd-provision/local-ssd-provision.yaml b/manifests/gke/local-ssd-provision/local-ssd-provision.yaml index 2e7b9712ca..9890a141ba 100644 --- a/manifests/gke/local-ssd-provision/local-ssd-provision.yaml +++ b/manifests/gke/local-ssd-provision/local-ssd-provision.yaml @@ -12,6 +12,8 @@ metadata: name: local-provisioner-config namespace: kube-system data: + nodeLabelsForPV: | + - kubernetes.io/hostname storageClassMap: | local-storage: hostDir: /mnt/disks diff --git a/manifests/gke/persistent-disk.yaml b/manifests/gke/persistent-disk.yaml index 81739db0b6..0c29125539 100644 --- a/manifests/gke/persistent-disk.yaml +++ b/manifests/gke/persistent-disk.yaml @@ -3,6 +3,8 @@ kind: StorageClass metadata: name: "pd-ssd" provisioner: kubernetes.io/gce-pd +reclaimPolicy: Retain volumeBindingMode: WaitForFirstConsumer +allowVolumeExpansion: true parameters: type: pd-ssd diff --git a/manifests/gp2-storage.yaml b/manifests/gp2-storage.yaml index 63488deb5e..4b972ebf49 100644 --- a/manifests/gp2-storage.yaml +++ b/manifests/gp2-storage.yaml @@ -6,5 +6,7 @@ provisioner: kubernetes.io/aws-ebs parameters: type: gp2 reclaimPolicy: Retain +volumeBindingMode: WaitForFirstConsumer +allowVolumeExpansion: true mountOptions: - - debug \ No newline at end of file + - debug