Commit Graph

28 Commits (c10cc3decdd25717eaca5fccfd7cfebb3e09e5ec)

Author SHA1 Message Date
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
Clayton Coleman 868cdeca8a
bump(golang.org/x/crypto/nacl):d172538b2cfce0c13cee31e647d0367aa8cd2486 2017-06-06 10:50:37 -04:00
Dong Liu 33c34f0ae4 Upgrade go-winio package to v0.4.2, supporting go v1.8 . 2017-06-02 05:59:20 -05:00
Jordan Liggitt 986cdfa6ff
bump(golang.org/x/tools/container/intsets): 2382e3994d48b1d22acc2c86bcad0a2aff028e32 2017-05-30 15:12:30 -04:00
Eric Chiang 0b549190b4 vendor: re-run bazel build 2017-04-28 13:19:26 -07:00
Eric Chiang 6bcecdc33c bump(golang.org/x/oauth2): a6bd8cefa1811bd24b86f8902872e4e8225f74c4 2017-04-28 13:19:21 -07:00
Mike Danese 59fc948a06 bump rules_go and go version for bazel builds
and bump gazel to a version that supports 1.8
2017-04-25 11:23:33 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Timothy St. Clair 93c051e28f Level sets dependency graph to consume etcd 3.1.5 2017-04-11 08:34:40 -05:00
Michael Fraenkel a01a493d5d Update golang.org/x/crypto
- Update bazel for new vendored crypto
2016-12-29 18:49:18 -05:00
Brendan Burns 7201562cc3 bump(golang.org/x/text): 2910a502d2bf9e43193af9d68ca516529614eed3 2016-12-21 14:57:26 -08:00
Saad Ali d41b3b0929 Revert "Add missing vendor files to make godeps happy" 2016-11-02 20:56:06 -07:00
saadali e9afbd5cdf Add missing vendor files to make godeps happy 2016-11-02 18:55:10 -07:00
Manjunath A Kumatagi 1ad61acdc2 Update golang.org/x/sys/unix package 2016-09-27 01:17:25 -07:00
Davanum Srinivas 64efc3a744 Update Google Cloud API client import paths
Bump version of golang.org/x/oauth2
Vendor google.golang.org/cloud/
Vendor google.golang.org/api/
Vendor cloud.google.com/go/compute/
Replace google.golang.org/cloud with cloud.google.com/go/

Fixes #30069
2016-09-13 22:21:06 -04:00
Brendan Burns ba7f61c340 Add a dependency on github.com/howeycgopass 2016-08-27 21:29:12 -07:00
mbohlool 0c51663aac Add go-openapi dependencies and update Godeps 2016-08-18 13:50:50 -07:00
Timothy St. Clair 5f008faa8b Update godeps for etcd 3.0.4 2016-08-09 08:51:15 -05:00
Lantao Liu cb1b3c86d3 Bump cadvisor dependencies to latest head. 2016-07-27 18:29:19 -07:00
George Tankersley 902b9faa6f vendor: add cfssl dependency 2016-07-19 11:25:38 -07:00
Timothy St. Clair e5ed62e87c Update golang.org/x/net godep for http2 issues being seen during scale
tests
2016-07-15 18:14:47 -05:00
Girish Kalele 6de83d5853 Update Godeps for github.com/skynetservices/skydns and github.com/miekg/dns 2016-06-29 14:05:43 -07:00
Kris 751af3a838 Bump inotify to pickup fix for memory leak 2016-06-22 18:27:06 -07:00
Dawn Chen 1ea5c460bc Bump cAdvisor to v0.23.4 2016-06-17 16:26:39 -07:00
Davide Agnello bb1ae12906 Vendor/Godep updates 2016-06-08 18:17:42 -07:00
Timothy St. Clair 786b7989a0 Update golang.org/x/net for http2 enablement 2016-05-27 14:25:57 -05:00
saadali c708e2cc82 Update vendor dir and Godeps.json with new Godep 2016-05-11 17:02:50 -07:00
Tim Hockin 3c0c5ed4e0 Move deps from _workspace/ to vendor/
godep restore
pushd $GOPATH/src/github.com/appc/spec
git co master
popd
go get go4.org/errorutil
rm -rf Godeps
godep save ./...
git add vendor
git add -f $(git ls-files --other vendor/)
git co -- Godeps/LICENSES Godeps/.license_file_state Godeps/OWNERS
2016-05-08 20:30:21 -07:00