Skip to content

Commit

Permalink
fix default working directory hostProcess
Browse files Browse the repository at this point in the history
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>
(cherry picked from commit c7ea06a)
  • Loading branch information
anmaxvl committed Apr 12, 2024
1 parent fc4b00d commit 989f1ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/cri/sbserver/container_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 989f1ec

Please sign in to comment.