diff --git a/charts/substrate-atelet/templates/atelet.yaml b/charts/substrate-atelet/templates/atelet.yaml index 66c8e3a4ce..ca13651e92 100644 --- a/charts/substrate-atelet/templates/atelet.yaml +++ b/charts/substrate-atelet/templates/atelet.yaml @@ -294,6 +294,10 @@ spec: readOnly: true - name: kubelet-plugins mountPath: /var/lib/kubelet/plugins + # HostToContainer: kubelet stages CSI volumes under this directory; a private copy + # of those mounts would keep every volume's filesystem (and LUKS mapper) open after + # kubelet unmounts it, so the volume can never be unstaged while atelet runs. + mountPropagation: HostToContainer - name: device-plugins mountPath: /var/lib/kubelet/device-plugins - name: host-dev diff --git a/charts/substrate-atelet/tests/kubelet_plugins_test.yaml b/charts/substrate-atelet/tests/kubelet_plugins_test.yaml new file mode 100644 index 0000000000..611f2e201c --- /dev/null +++ b/charts/substrate-atelet/tests/kubelet_plugins_test.yaml @@ -0,0 +1,29 @@ +# Copyright 2026 The Agent Substrate Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +suite: Kubelet plugins mount +templates: +- atelet.yaml +tests: +- it: receives kubelet's mounts and unmounts of CSI volumes + documentSelector: + path: kind + value: DaemonSet + asserts: + - contains: + path: spec.template.spec.containers[?(@.name == "atelet")].volumeMounts + content: + name: kubelet-plugins + mountPath: /var/lib/kubelet/plugins + mountPropagation: HostToContainer diff --git a/charts/substrate/templates/atelet.yaml b/charts/substrate/templates/atelet.yaml index 6c55ffa5ed..d6ba49f9a2 100644 --- a/charts/substrate/templates/atelet.yaml +++ b/charts/substrate/templates/atelet.yaml @@ -295,6 +295,10 @@ spec: readOnly: true - name: kubelet-plugins mountPath: /var/lib/kubelet/plugins + # HostToContainer: kubelet stages CSI volumes under this directory; a private copy + # of those mounts would keep every volume's filesystem (and LUKS mapper) open after + # kubelet unmounts it, so the volume can never be unstaged while atelet runs. + mountPropagation: HostToContainer - name: device-plugins mountPath: /var/lib/kubelet/device-plugins - name: host-dev diff --git a/manifests/ate-install/atelet.yaml b/manifests/ate-install/atelet.yaml index 7036665b2a..1d18a9dd00 100644 --- a/manifests/ate-install/atelet.yaml +++ b/manifests/ate-install/atelet.yaml @@ -372,6 +372,10 @@ spec: readOnly: true - name: kubelet-plugins mountPath: /var/lib/kubelet/plugins + # HostToContainer: kubelet stages CSI volumes under this directory; a private copy + # of those mounts would keep every volume's filesystem (and LUKS mapper) open after + # kubelet unmounts it, so the volume can never be unstaged while atelet runs. + mountPropagation: HostToContainer - name: device-plugins mountPath: /var/lib/kubelet/device-plugins - name: host-dev