From 9472485099f52b6913f534baca0c382a235dfebe Mon Sep 17 00:00:00 2001 From: Ciprian Hacman Date: Sat, 5 Jul 2025 09:55:23 +0300 Subject: [PATCH] Apply suggestions from code review --- docs/tutorial/working-with-instancegroups.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/tutorial/working-with-instancegroups.md b/docs/tutorial/working-with-instancegroups.md index 51026ee618..dc6dffd10f 100644 --- a/docs/tutorial/working-with-instancegroups.md +++ b/docs/tutorial/working-with-instancegroups.md @@ -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