Skip to content

Commit bda0089

Browse files
committed
disk: always mount rootfs directly
1 parent 65fe00b commit bda0089

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/utils/util.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,10 @@ func WriteJSONFile(obj interface{}, file string) error {
385385
// GetPodRunTime Get Pod runtimeclass config
386386
// Default as runc.
387387
func GetPodRunTime(ctx context.Context, req *csi.NodePublishVolumeRequest, clientSet kubernetes.Interface) string {
388+
if req.VolumeContext["csi.alibabacloud.com/rootfs-volume"] == "true" {
389+
// For rootfs volume, always mount directly. Even it is used by runD, mount it like runC.
390+
return RuncRunTimeTag
391+
}
388392
// if pod name namespace is empty, use default
389393
runtimeVal := RuncRunTimeTag
390394
pod, err := GetPodFromContextOrK8s(ctx, clientSet, req)

0 commit comments

Comments
 (0)