Apply suggestions from code review

This commit is contained in:
Ciprian Hacman 2025-07-05 09:55:23 +03:00 committed by GitHub
parent cac63fd13a
commit 9472485099
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -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