mirror of https://github.com/kubernetes/kops.git
Apply suggestions from code review
This commit is contained in:
parent
cac63fd13a
commit
9472485099
|
@ -387,10 +387,10 @@ $ df -h | grep nvme[12]
|
|||
|
||||
> Note: at present its up to the user ensure the correct device names.
|
||||
|
||||
Some AWS instances provide multiple NVMe disks instead of a single device. You can use an additionalUserData to create a RAID array from those disks
|
||||
Some AWS instances provide multiple NVMe disks instead of a single device. You can use an additionalUserData to create a RAID array from those disks
|
||||
and then use volumeMounts to mount and format that virtual device, for example:
|
||||
|
||||
```
|
||||
```yaml
|
||||
apiVersion: kops.k8s.io/v1alpha2
|
||||
kind: InstanceGroup
|
||||
metadata:
|
||||
|
@ -405,7 +405,7 @@ spec:
|
|||
set -eo pipefail
|
||||
if ! [ -e /dev/md0 ] ; then
|
||||
DEVICES=($(lsblk -rp -I 259 -o NAME,MODEL | grep 'Amazon\\x20EC2\\x20NVMe' | cut -d ' ' -f 1))
|
||||
DEVICE_COUNT=${#DEVICES[@]}
|
||||
DEVICE_COUNT={{ "${#DEVICES[@]}" }}
|
||||
echo Found ${DEVICE_COUNT} NVMe disks: ${DEVICES[@]}
|
||||
if [[ $DEVICE_COUNT > 1 ]] ; then
|
||||
mdadm --create /dev/md0 --level=10 --raid-devices=${DEVICE_COUNT} ${DEVICES[@]}
|
||||
|
@ -417,7 +417,6 @@ spec:
|
|||
- device: /dev/md0
|
||||
filesystem: xfs
|
||||
path: /data
|
||||
|
||||
```
|
||||
|
||||
## Creating a new instance group
|
||||
|
|
Loading…
Reference in New Issue