Commit Graph

38 Commits

Author SHA1 Message Date
Sascha Grunert
de37b9d293
Make CRI v1 the default and allow a fallback to v1alpha2
This patch makes the CRI `v1` API the new project-wide default version.
To allow backwards compatibility, a fallback to `v1alpha2` has been added
as well. This fallback can either used by automatically determined by
the kubelet.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-11-17 11:05:05 -08:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
JunYang
7735cf7f26 Structured Logging migration: modify dockershim and network part logs of kubelet.
Signed-off-by: JunYang <yang.jun22@zte.com.cn>
2021-02-14 16:01:47 +08:00
wawa0210
ea9df6361b
remove windows container hyper-v support 2021-01-14 22:49:34 +08:00
Kubernetes Prow Robot
5ec83bc973
Merge pull request #91181 from zvier/master
fix golint errors for `pkg/kubelet/dockershim`
2020-08-27 17:54:45 -07:00
wawa0210
aea228f5dd fix no-new-privileges on windows 2020-07-20 16:14:52 -04:00
zvier
d43817b5ec fix golint errors for pkg/kubelet/dockershim
Signed-off-by: zvier <zvier20@gmail.com>
2020-05-24 23:45:17 +08:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
mattjmcnaughton
b36f637f0d
Add dockerless tags to all files in dockershim
As the final step, add the `dockerless` tags to all files in the
dockershim. Using `-tags=dockerless` in `go build`, we can compile
kubelet without the dockershim.

Once cadvisor no longer depends on `docker/docker`, compiling with
`-tags=dockerless` should be sufficient to compile the Kubelet w/o a
dependency on `docker/docker`.
2020-05-07 17:18:50 -04:00
Davanum Srinivas
25c3ddf22e
Just use runtime.NumCPU on windows
docker folks added NumCPU implementation for windows that
supported hot-plugging of CPUs. The implementation used the
GetProcessAffinityMask to be able to check which CPUs are
active as well.
3707a76921

The golang "runtime" package has also bene using GetProcessAffinityMask
since 1.6 beta1:
6410e67a1e

So we don't seem to need the sysinfo.NumCPU from docker/docker.

(Note that this is PR is an effort to get away from dependencies from
docker/docker)

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-03-17 15:53:52 -04:00
Patrick Lang
19acf7d051 Fix cpu resource limit on Windows 2020-02-24 19:46:39 +00:00
yuxiaobo
065343933d delete extra comma 2019-08-30 16:03:33 +08:00
Khaled Henidak(Kal)
dba434c4ba kubenet for ipv6 dualstack 2019-07-02 22:26:25 +00:00
Davanum Srinivas
33081c1f07
New staging repository for cri-api
Change-Id: I2160b0b0ec4b9870a2d4452b428e395bbe12afbb
2019-03-26 18:21:04 -04:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Pengfei Ni
d0cd1d17ae Add clarification for Windows DNS setup flow 2018-06-07 16:26:13 +08:00
Pengfei Ni
10b6f405e1 Revert "Fix Windows CNI for the sandbox case"
This reverts commit 49e762ab3a.
2018-06-07 09:56:13 +08:00
Pengfei Ni
7ba26ba25c Setup docker options according to windows security context 2018-06-05 09:29:24 +08:00
Alin-Gheorghe Balutoiu
49e762ab3a Fix Windows CNI for the sandbox case
Windows supports both sandbox and non-sandbox cases. The non-sandbox
case is for Windows Server 2016 and for Windows Server version greater
than 1709 which use Hyper-V containers.

Currently, the CNI on Windows fetches the IP from the containers
within the pods regardless of the mode. This should be done only
in the non-sandbox mode where the IP of the actual container
will be different than the IP of the sandbox container.

In the case where the sandbox container is supported, all the containers
from the same pod will share the network details of the sandbox container.

This patch updates the CNI to fetch the IP from the sandbox container
when this mode is supported.

Signed-off-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com>
2018-05-24 08:56:30 +02:00
Alin-Gheorghe Balutoiu
a994cb531a Add support for CNI on Windows Server 2016 RTM
Currently the Windows Server 2016 RTM has no CNI support.

With this commit, the Windows Server 2016 RTM will be able
to use the CNI plugin for networking setup.

This commit also moves some comments to the right place.

Signed-off-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com>
2018-03-29 11:35:24 +02:00
Pengfei Ni
18c55a1d8e Setup docker hostconfig for windows containers 2018-02-28 09:56:46 +08:00
Di Xu
48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
Lee Verberne
e10042d22f Increment CRI version from v1alpha1 to v1alpha2
This also incorporates the version string into the package name so
that incompatibile versions will fail to connect.

Arbitrary choices:
- The proto3 package name is runtime.v1alpha2. The proto compiler
  normally translates this to a go package of "runtime_v1alpha2", but
  I renamed it to "v1alpha2" for consistency with existing packages.
- kubelet/apis/cri is used as "internalapi". I left it alone and put the
  public "runtimeapi" in kubelet/apis/cri/runtime.
2018-02-07 09:06:26 +01:00
Lee Verberne
0f1de41790 Update kubelet for enumerated CRI namespaces
This adds support to both the Generic Runtime Manager and the
dockershim for the CRI's enumerated namespaces.
2018-02-07 09:06:26 +01:00
Kubernetes Submit Queue
0d900769d6
Merge pull request #59126 from filbranden/ipcs3
Automatic merge from submit-queue (batch tested with PRs 59106, 58985, 59068, 59120, 59126). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix cross-build breakage after #58174

**What this PR does / why we need it**:
Fix cross-build breakage after #58174

@cblecker 

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #59121

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-01 05:53:45 -08:00
Filipe Brandenburger
2f2d886734 Fix cross-build breakage after #58174 2018-01-31 09:46:36 -08:00
Pengfei Ni
a6d0cd0f01 Add HyperVContainer feature gates 2018-01-30 13:00:08 +08:00
Pengfei Ni
cabd2bb619 Add experimental hyperv containers support on Windows 2018-01-30 12:58:08 +08:00
Madhan Raj Mookkandy
d7f9e22815 Sandbox Support for Windows + CNI
Following are part of this commit
+++++++++++++++++++++++++++++++++

* Windows CNI Support
	(1) Support to use --network-plugin=cni
	(2) Handled platform requirement of calling CNI ADD for all the containers.
	(2.1) For POD Infra container, netNs has to be empty
	(2.2) For all other containers, sharing the network namespace of POD container,
	      should pass netNS name as "container:<Pod Infra Container Id>", same as the
              NetworkMode of the current container
	(2.3) The Windows CNI plugin has to handle this to call into Platform.
              Sample Windows CNI Plugin code to be shared soon.
* Sandbox support for Windows
	(1) Sandbox support for Windows. Works only with Docker runtime.
	(2) Retained CONTAINER_NETWORK as a backward compatibilty flag,
	    to not break existing deployments using it.
	(3) Works only with CNI plugin enabled.

(*) Changes to reinvoke CNI ADD for every new container created. This is hooked up with PodStatus,
    but would be ideal to move it outside of this, once we have CNI GET support
2017-11-02 17:40:20 -07:00
Davanum Srinivas
493ee8b285 Fix make cross build failure
had to fix the method getSecurityOpts in helpers_windows.go to
match the implementation in helpers_linux.go from commit:
bf01fa2f00

Fixes #50675
2017-08-15 14:25:35 -04:00
Jeff Grafton
3962b5dccf Fix compilation failure in dockershim for windows 2017-07-14 18:15:26 -07:00
Yang Guo
bf2ced837c Updates Docker Engine API 2017-07-13 12:55:07 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Pengfei Ni
22e99504d7 Update CRI references 2017-06-09 10:16:40 +08:00
Dong Liu
5936e81b2e Add determinePodIPBySandboxID. 2017-06-02 08:03:07 -05:00
Dong Liu
6d07fc2f44 Add updateCreateConfig. 2017-06-02 05:59:21 -05:00
Dong Liu
9c2309b7cb Add os dependent getSecurityOpts helper method. 2017-06-02 05:59:20 -05:00
Yu-Ju Hong
5644587e07 More dockertools cleanup
Move some constants/functions to dockershim and remove unused tests.
2017-05-03 11:22:06 -07:00