Upgrade local volume provisioner to v2.3.2 (#4983)
This commit is contained in:
parent
69f796f0c7
commit
70dc222719
8 changed files with 45 additions and 14 deletions
|
@ -35,6 +35,8 @@ local_volume_provisioner_enabled: false
|
||||||
# local-storage:
|
# local-storage:
|
||||||
# host_dir: /mnt/disks
|
# host_dir: /mnt/disks
|
||||||
# mount_dir: /mnt/disks
|
# mount_dir: /mnt/disks
|
||||||
|
# volume_mode: Filesystem
|
||||||
|
# fs_type: ext4
|
||||||
# fast-disks:
|
# fast-disks:
|
||||||
# host_dir: /mnt/fast-disks
|
# host_dir: /mnt/fast-disks
|
||||||
# mount_dir: /mnt/fast-disks
|
# mount_dir: /mnt/fast-disks
|
||||||
|
|
|
@ -271,7 +271,7 @@ metrics_server_version: "v0.3.3"
|
||||||
metrics_server_image_repo: "gcr.io/google_containers/metrics-server-amd64"
|
metrics_server_image_repo: "gcr.io/google_containers/metrics-server-amd64"
|
||||||
metrics_server_image_tag: "{{ metrics_server_version }}"
|
metrics_server_image_tag: "{{ metrics_server_version }}"
|
||||||
local_volume_provisioner_image_repo: "quay.io/external_storage/local-volume-provisioner"
|
local_volume_provisioner_image_repo: "quay.io/external_storage/local-volume-provisioner"
|
||||||
local_volume_provisioner_image_tag: "v2.1.0"
|
local_volume_provisioner_image_tag: "v2.3.2"
|
||||||
cephfs_provisioner_image_repo: "quay.io/external_storage/cephfs-provisioner"
|
cephfs_provisioner_image_repo: "quay.io/external_storage/cephfs-provisioner"
|
||||||
cephfs_provisioner_image_tag: "v2.1.0-k8s1.11"
|
cephfs_provisioner_image_tag: "v2.1.0-k8s1.11"
|
||||||
rbd_provisioner_image_repo: "quay.io/external_storage/rbd-provisioner"
|
rbd_provisioner_image_repo: "quay.io/external_storage/rbd-provisioner"
|
||||||
|
|
|
@ -72,6 +72,19 @@ mount /dev/vdb1 /mnt/disks/ssd1
|
||||||
Physical disks are recommended for production environments because it offers
|
Physical disks are recommended for production environments because it offers
|
||||||
complete isolation in terms of I/O and capacity.
|
complete isolation in terms of I/O and capacity.
|
||||||
|
|
||||||
|
### Mount unpartitioned physical devices
|
||||||
|
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
for disk in /dev/sdc /dev/sdd /dev/sde; do
|
||||||
|
ln -s $disk /mnt/disks
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
This saves time of precreatnig filesystems. Note that your storageclass must have
|
||||||
|
volume_mode set to "Filesystem" and fs_type defined. If either is not set, the
|
||||||
|
disk will be added as a raw block device.
|
||||||
|
|
||||||
### File-backed sparsefile method
|
### File-backed sparsefile method
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
|
@ -92,7 +105,7 @@ management.
|
||||||
### Block volumeMode PVs
|
### Block volumeMode PVs
|
||||||
|
|
||||||
Create a symbolic link under discovery directory to the block device on the node. To use
|
Create a symbolic link under discovery directory to the block device on the node. To use
|
||||||
raw block devices in pods BlockVolume feature gate must be enabled.
|
raw block devices in pods, volume_type should be set to "Block".
|
||||||
|
|
||||||
Usage notes
|
Usage notes
|
||||||
-----------
|
-----------
|
||||||
|
|
|
@ -5,7 +5,10 @@ local_volume_provisioner_namespace: "kube-system"
|
||||||
local_volume_provisioner_storage_classes: |
|
local_volume_provisioner_storage_classes: |
|
||||||
{
|
{
|
||||||
"{{ local_volume_provisioner_storage_class | default('local-storage') }}": {
|
"{{ local_volume_provisioner_storage_class | default('local-storage') }}": {
|
||||||
"host_dir": "{{ local_volume_provisioner_base_dir | default ('/mnt/disks') }}",
|
"host_dir": "{{ local_volume_provisioner_base_dir | default ('/mnt/disks') }}",
|
||||||
"mount_dir": "{{ local_volume_provisioner_mount_dir | default('/mnt/disks') }}"
|
"mount_dir": "{{ local_volume_provisioner_mount_dir | default('/mnt/disks') }}",
|
||||||
|
"volume_mode": "Filesystem",
|
||||||
|
"fs_type": "ext4"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
local_volume_provisioner_templates:
|
local_volume_provisioner_templates:
|
||||||
- { name: local-volume-provisioner-ns, file: local-volume-provisioner-ns.yml, type: ns }
|
- { name: local-volume-provisioner-ns, file: local-volume-provisioner-ns.yml, type: ns }
|
||||||
- { name: local-volume-provisioner-sa, file: local-volume-provisioner-sa.yml, type: sa }
|
- { name: local-volume-provisioner-sa, file: local-volume-provisioner-sa.yml, type: sa }
|
||||||
|
- { name: local-volume-provisioner-clusterrole, file: local-volume-provisioner-clusterrole.yml, type: clusterrole }
|
||||||
- { name: local-volume-provisioner-clusterrolebinding, file: local-volume-provisioner-clusterrolebinding.yml, type: clusterrolebinding }
|
- { name: local-volume-provisioner-clusterrolebinding, file: local-volume-provisioner-clusterrolebinding.yml, type: clusterrolebinding }
|
||||||
- { name: local-volume-provisioner-cm, file: local-volume-provisioner-cm.yml, type: cm }
|
- { name: local-volume-provisioner-cm, file: local-volume-provisioner-cm.yml, type: cm }
|
||||||
- { name: local-volume-provisioner-ds, file: local-volume-provisioner-ds.yml, type: ds }
|
- { name: local-volume-provisioner-ds, file: local-volume-provisioner-ds.yml, type: ds }
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: local-volume-provisioner-node-clusterrole
|
||||||
|
namespace: {{ local_volume_provisioner_namespace }}
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["nodes"]
|
||||||
|
verbs: ["get"]
|
|
@ -5,14 +5,13 @@ metadata:
|
||||||
name: local-volume-provisioner-system-persistent-volume-provisioner
|
name: local-volume-provisioner-system-persistent-volume-provisioner
|
||||||
namespace: {{ local_volume_provisioner_namespace }}
|
namespace: {{ local_volume_provisioner_namespace }}
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: local-volume-provisioner
|
name: local-volume-provisioner
|
||||||
namespace: {{ local_volume_provisioner_namespace }}
|
namespace: {{ local_volume_provisioner_namespace }}
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: system:persistent-volume-provisioner
|
name: system:persistent-volume-provisioner
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
|
@ -20,10 +19,10 @@ metadata:
|
||||||
name: local-volume-provisioner-system-node
|
name: local-volume-provisioner-system-node
|
||||||
namespace: {{ local_volume_provisioner_namespace }}
|
namespace: {{ local_volume_provisioner_namespace }}
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: local-volume-provisioner
|
name: local-volume-provisioner
|
||||||
namespace: {{ local_volume_provisioner_namespace }}
|
namespace: {{ local_volume_provisioner_namespace }}
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: system:node
|
name: local-volume-provisioner-node-clusterrole
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
|
|
@ -362,8 +362,11 @@ kubeadm_control_plane: false
|
||||||
local_volume_provisioner_storage_classes: |
|
local_volume_provisioner_storage_classes: |
|
||||||
{
|
{
|
||||||
"{{ local_volume_provisioner_storage_class | default('local-storage') }}": {
|
"{{ local_volume_provisioner_storage_class | default('local-storage') }}": {
|
||||||
"host_dir": "{{ local_volume_provisioner_base_dir | default ('/mnt/disks') }}",
|
"host_dir": "{{ local_volume_provisioner_base_dir | default ('/mnt/disks') }}",
|
||||||
"mount_dir": "{{ local_volume_provisioner_mount_dir | default('/mnt/disks') }}"
|
"mount_dir": "{{ local_volume_provisioner_mount_dir | default('/mnt/disks') }}",
|
||||||
|
"volume_mode": "Filesystem",
|
||||||
|
"fs_type": "ext4"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue