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 <maksiman@microsoft.com>
This commit is contained in:
Maksim An 2024-04-11 23:35:55 -07:00
parent b693d137ed
commit c7ea06a69b

View File

@ -858,6 +858,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() {