From 40fb410edda068b0e41053bb7eaa0a658ff7cd3c Mon Sep 17 00:00:00 2001 From: Kaitlin Hoang Date: Mon, 11 Aug 2025 18:04:26 +0000 Subject: [PATCH] Add init container for installing Lustre client userspace tool on AL-based nodes --- deploy/kubernetes/base/node-daemonset.yaml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/deploy/kubernetes/base/node-daemonset.yaml b/deploy/kubernetes/base/node-daemonset.yaml index 780ee265c..9ab50069f 100644 --- a/deploy/kubernetes/base/node-daemonset.yaml +++ b/deploy/kubernetes/base/node-daemonset.yaml @@ -35,6 +35,25 @@ spec: values: - fargate - hybrid + initContainers: + - name: lustre-client-installer + image: amazonlinux:2 + securityContext: + privileged: true + volumeMounts: + - name: host-root + mountPath: /host + command: + - /bin/sh + - -c + - | + if chroot /host grep -q "Amazon Linux 2023" /etc/os-release; then + chroot /host dnf install -y lustre-client + elif chroot /host grep -q "Amazon Linux 2" /etc/os-release; then + chroot /host amazon-linux-extras install -y lustre + else + echo "Non-AL based distro, no need to install userspace" + fi containers: - name: fsx-plugin securityContext: @@ -136,3 +155,7 @@ spec: hostPath: path: /var/lib/kubelet/plugins/fsx.csi.aws.com/ type: DirectoryOrCreate + - name: host-root + hostPath: + path: / + type: Directory