From 989f1ec54f6764020447b03020b97592312c5f85 Mon Sep 17 00:00:00 2001 From: Maksim An Date: Thu, 11 Apr 2024 23:35:55 -0700 Subject: [PATCH] fix default working directory `hostProcess` Per https://github.com/kubernetes/enhancements/tree/master/keps/sig-windows/1981-windows-privileged-container-support#container-mounts the default working directory for `hostProcess` containers should be `C:\hpc`, however the current default is set to windows default which is `C:\`. Signed-off-by: Maksim An (cherry picked from commit c7ea06a69bdf9147758353b4eb12bb78240fbda8) --- pkg/cri/sbserver/container_create.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/cri/sbserver/container_create.go b/pkg/cri/sbserver/container_create.go index 305681be2a32..c36a2e7f3b62 100644 --- a/pkg/cri/sbserver/container_create.go +++ b/pkg/cri/sbserver/container_create.go @@ -855,6 +855,8 @@ func (c *criService) buildWindowsSpec( specOpts = append(specOpts, oci.WithProcessCwd(config.GetWorkingDir())) } else if imageConfig.WorkingDir != "" { specOpts = append(specOpts, oci.WithProcessCwd(imageConfig.WorkingDir)) + } else if cntrHpc { + specOpts = append(specOpts, oci.WithProcessCwd(`C:\hpc`)) } if config.GetTty() {