k3s/vendor/golang.org/x
Kubernetes Submit Queue 69a9759d90 Merge pull request #46744 from karataliu/wincri4
Automatic merge from submit-queue

Support windows in dockershim

**What this PR does / why we need it**:
This is the 2nd part for https://github.com/kubernetes/kubernetes/issues/45927 .

The non-cri implementation dockertools was removed from kubelet v1.7 .
Part of previous work for supporting windows container lies in v1.6 dockertools, this PR is to port them to dockershim.

Main reference file in v1.6 dockertools windows support:
https://github.com/kubernetes/kubernetes/blob/v1.6.4/pkg/kubelet/dockertools/docker_manager_windows.go

**Which issue this PR fixes**
45927, for now catching up the implementation of v1.6

**Special notes for your reviewer**:
The code change includes 4 parts, put them together as we discussed in https://github.com/kubernetes/kubernetes/pull/46089

1. Update go-winio package to a newer version
  'go-winio' package is used by docker client.
  This change is to bring the support for Go v1.8, specifically included in the PR: https://github.com/Microsoft/go-winio/pull/48 
Otherwise it will produce a lot of error like in: https://github.com/fsouza/go-dockerclient/issues/648 

2. Add os dependent getSecurityOpts helper method. 
seccomp not supported on windows
  Corresponding code in v1.6: https://github.com/kubernetes/kubernetes/blob/v1.6.4/pkg/kubelet/dockertools/docker_manager_windows.go#L78

3. Add updateCreateConfig.
Allow user specified network mode setting. This is to be compatible with what kube-proxy package does on Windows. 
  Also, there is a Linux section in both sandbox config and container config: LinuxPodSandboxConfig, LinuxContainerConfig.
And that section later goes to Config and HostConfig section under docker container createConfig. Ideally hostconfig section should be dependent on host os, while config should depend on container image os.
  To simplify the case, here it assumes that windows host supports windows type container image only. It needs to be updated when kubernetes is to support windows host running linux container image or the like.
  Corresponding code in v1.6: https://github.com/kubernetes/kubernetes/blob/v1.6.4/pkg/kubelet/dockertools/docker_manager_windows.go#L57

4. Add podIpCache in dockershim. 
  For v1.6 windows implementation, it still does not use sandbox, thus only allow single container to be exposed.
  Here added a cache for saving container IP, to get adapted to the new CRI api.
Corresponding code in v1.6:
No sandbox: https://github.com/kubernetes/kubernetes/blob/v1.6.4/pkg/kubelet/dockertools/docker_manager_windows.go#L66
Use container id as pod ip: https://github.com/kubernetes/kubernetes/blob/v1.6.4/pkg/kubelet/dockertools/docker_manager.go#L2727

**Release note**:
2017-06-07 20:03:19 -07:00
..
crypto bump(golang.org/x/crypto/nacl):d172538b2cfce0c13cee31e647d0367aa8cd2486 2017-06-06 10:50:37 -04:00
exp vendor: re-run bazel build 2017-04-28 13:19:26 -07:00
net vendor: re-run bazel build 2017-04-28 13:19:26 -07:00
oauth2 vendor: re-run bazel build 2017-04-28 13:19:26 -07:00
sys Upgrade go-winio package to v0.4.2, supporting go v1.8 . 2017-06-02 05:59:20 -05:00
text vendor: re-run bazel build 2017-04-28 13:19:26 -07:00
time vendor: re-run bazel build 2017-04-28 13:19:26 -07:00
tools bump(golang.org/x/tools/container/intsets): 2382e3994d48b1d22acc2c86bcad0a2aff028e32 2017-05-30 15:12:30 -04:00