Skip to content

Commit c7ea06a

Browse files
committed
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 <[email protected]>
1 parent b693d13 commit c7ea06a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/cri/server/container_create.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,8 @@ func (c *criService) buildWindowsSpec(
858858
specOpts = append(specOpts, oci.WithProcessCwd(config.GetWorkingDir()))
859859
} else if imageConfig.WorkingDir != "" {
860860
specOpts = append(specOpts, oci.WithProcessCwd(imageConfig.WorkingDir))
861+
} else if cntrHpc {
862+
specOpts = append(specOpts, oci.WithProcessCwd(`C:\hpc`))
861863
}
862864

863865
if config.GetTty() {

0 commit comments

Comments
 (0)