Commit Graph

100 Commits (70e340b045dacb1102561f923d11a7fc72755e22)

Author SHA1 Message Date
Yu-Ju Hong 760d8e98e8 CRI: use more gogoprotobuf plugins
This includes generating marshaler/unmarshaler code to improve
performance.
2017-01-25 13:52:24 -08:00
Ivan Shvedunov 7a4ecc5c58 Fix bad time values in kubelet FakeRuntimeService
These values don't affect tests but they can be confusing
for developers looking at the code for reference.
2017-01-20 20:44:04 +03:00
Pengfei Ni 97fff6a7cf kubelet/api: update cri to protobuf v3 2017-01-20 09:54:28 +08:00
Pengfei Ni 9cab3b4a07 CRI: update protobuf to v3 2017-01-20 09:54:03 +08:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Jeff Grafton fae627dd65 Update generated for 2017 2017-01-01 23:11:09 -08:00
Pengfei Ni 37fc81be0e kubelet/images: return image ref in EnsureImageExists 2016-12-29 16:31:14 +08:00
Pengfei Ni ba5a684c4c CRI: add image ref to PullImageResponse 2016-12-29 16:31:14 +08:00
Jonathan Boulle 5d982b4a02 CRI: clarify purpose of annotations
Add language to make it explicit that annotations are not to be altered
by runtimes, and should only be used for features that are opaque to the
Kubernetes APIs. Unfortunately there are currently exceptions
introduced in [1][1], but this change makes it clear that they are to be
changed and that no more such semantic-affecting annotations should be
introduced.

In the spirit of the discussion and conclusion in [2][2].

Also captures the link between the annotations returned by various
status queries and those supplied in associated configs.

[1]: https://github.com/kubernetes/kubernetes/pull/34819
[2]: https://github.com/kubernetes/kubernetes/issues/30819#issuecomment-253369441
2016-12-22 11:40:12 +01:00
Kubernetes Submit Queue 1d3c7ca758 Merge pull request #38348 from euank/doc-our-privilege
Automatic merge from submit-queue (batch tested with PRs 38727, 38726, 38347, 38348)

Add 'privileged' to sandbox to indicate if any container might be privileged in it, document privileged

Right now, the privileged flag is this magic thing which does "whatever Docker does". This documents it to make it a little less magic.

In addition, due to how rkt uses `systemd-nspawn` as an outer layer of isolation in creating the sandbox, it's helpful to know beforehand whether the pod will be privileged so additional security options can be applied earlier / applied at all.

I suspect the same indication will be useful for userns since userns should also occur at the pod layer, but it's possible that will be a separate/additional field.


cc @lucab @jonboulle @yujuhong @feiskyer @kubernetes/sig-node 


```release-note
NONE
```
2016-12-13 17:31:53 -08:00
Kubernetes Submit Queue 8abbedae54 Merge pull request #38315 from mikedanese/pin-gazel
Automatic merge from submit-queue

Pin gazel to a version and support cgo

This fixes the bazel build.

@krousey who is buildcop
2016-12-12 19:32:29 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Antonio Murdaca fba6e0a625
CRI: fix ImageStatus comment
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-12-11 18:43:41 +01:00
Euan Kemp 62148a768b CRI: add privileged to sandbox, document better
Adding the `privileged` bool to the sandbox allows runtimes, like rkt,
to make better security choices in some cases.

This also enumerates what "privileged" actually means and how it
interacts with other options (or more accurately, does not).

The documentation closely matches docker's current behavior because, so
far, that's what privileged has meant.
2016-12-08 13:11:16 -08:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Tim St. Clair cc801e97e8
[CRI] Manage attach TTY in Kubelet 2016-12-01 18:27:55 -08:00
Pengfei Ni f584ed4398 Fix package aliases to follow golang convention 2016-11-30 15:40:50 +08:00
Pengfei Ni 8322e5091e CRI: address knows issues of seccomp 2016-11-19 08:35:13 +08:00
Kubernetes Submit Queue 193622b31f Merge pull request #36728 from feiskyer/sysctls-docs
Automatic merge from submit-queue

CRI: add docs for sysctls

#34830 adds `sysctls` features in CRI, it is based on sandbox annotations, this PR adds docs for it. 

@yujuhong @timstclair @jonboulle
2016-11-16 02:58:42 -08:00
Random-Liu c79b8afe5b Clarify user fields in CRI 2016-11-15 16:50:02 -08:00
Pengfei Ni 38955897f7 CRI: add docs for sysctls 2016-11-14 12:19:52 +08:00
Jonathan Boulle 37150b6abd CRI: general grammar/spelling/consistency cleanup
No semantic changes, but a lot of shuffling of docstrings to make things
more consistent. In particular, standardise on the zeroth-article (i.e.
prefer `// Version` to `// The version`) and ending all docstrings with
periods.
2016-11-09 07:37:01 +01:00
Random-Liu 99ee3f4b76 Add non-numeric user name support. 2016-11-08 16:07:29 -08:00
Pengfei Ni 766b570c19 run hack/update-generated-runtime.sh 2016-11-07 11:07:56 +08:00
Pengfei Ni 453391ea88 CRI: add security context for sandbox/container 2016-11-07 11:07:12 +08:00
Kubernetes Submit Queue 8371a778f6 Merge pull request #35839 from Random-Liu/add-cri-runtime-status
Automatic merge from submit-queue

CRI: Add Status into CRI.

For https://github.com/kubernetes/kubernetes/issues/35701.
Fixes https://github.com/kubernetes/kubernetes/issues/35701.

This PR added a `Status` call in CRI, and the `RuntimeStatus` is defined as following:

``` protobuf
message RuntimeCondition {
    // Type of runtime condition.
    optional string type = 1;
    // Status of the condition, one of true/false.
    optional bool status = 2;
    // Brief reason for the condition's last transition.
    optional string reason = 3;
    // Human readable message indicating details about last transition.
    optional string message = 4;
}

message RuntimeStatus {
    // Conditions is an array of current observed runtime conditions.
    repeated RuntimeCondition conditions = 1;
}
```

Currently, only `conditions` is included in `RuntimeStatus`, and the definition is almost the same with `NodeCondition` and `PodCondition` in K8s api.

@yujuhong @feiskyer @bprashanth If this makes sense, I'll send a follow up PR to let dockershim return `RuntimeStatus` and let kubelet make use of it.
@yifan-gu @euank Does this make sense to rkt?
/cc @kubernetes/sig-node
2016-11-06 04:16:29 -08:00
Kubernetes Submit Queue 6f053ec4bc Merge pull request #36112 from yujuhong/stop_sandbox
Automatic merge from submit-queue

CRI: stop sandbox before removing it

Stopping a sandbox includes reclaiming the network resources.  By always
stopping the sandbox before removing it, we reduce the possibility of leaking
resources in some corner cases.
2016-11-06 02:22:40 -08:00
Random-Liu 90fe0c5994 Update bazel. 2016-11-05 00:02:05 -07:00
Random-Liu 55c5232810 Add Status implementation. 2016-11-05 00:02:05 -07:00
Random-Liu fc10a25ae1 Add Status into CRI. 2016-11-05 00:00:26 -07:00
Yu-Ju Hong faae51a14a CRI: stop sandbox before removing it
Stopping a sandbox includes reclaiming the network resources.  By always
stopping the sandbox before removing it, we reduce the possibility of leaking
resources in some corner cases.
2016-11-03 14:11:19 -07:00
Pengfei Ni c53fee7725 Run hack/update-generated-runtime.sh 2016-11-02 15:22:39 +08:00
Pengfei Ni 11245be0fe CRI: Add devices to ContainerConfig 2016-11-02 15:22:39 +08:00
Yu-Ju Hong 8a6285d844 CRI: Rename container/sandbox states
The enum constants are not namespaced. The shorter, unspecifc names are likely
to cause naming conflicts in the future.

Also replace "SandBox" with "Sandbox" in the API.
2016-11-01 13:18:21 -07:00
David Ashpole b8fc546d60 eviction manager ecivts pod using the most inodes. 2016-10-31 11:32:49 -07:00
Tim St. Clair c60db99536
Implement streaming CRI methods in dockershim 2016-10-28 11:15:53 -07:00
Random Liu e87fa5e0ff * Refactor kuberuntime unit test
* Add gc unit test
* Fix init container unit test
2016-10-24 00:03:34 -07:00
Random-Liu 121a91eb12 Symlink docker logs to CRI defined log path. 2016-10-23 19:08:47 -07:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Kubernetes Submit Queue 3148bc7996 Merge pull request #35008 from timstclair/cri
Automatic merge from submit-queue

Add streaming methods to CRI API

Copied verbatim from the proposal in the [design doc](https://docs.google.com/document/d/1OE_QoInPlVCK9rMAx9aybRmgFiVjHpJCHI9LrfdNM_s/edit#heading=h.akcz9mrsrc0x).

Note: this will conflict with https://github.com/kubernetes/kubernetes/pull/33988, but the fix ("not implemented") is simple so we can see which gets approved first.

For https://github.com/kubernetes/kubernetes/pull/33988/files

/cc @Random-Liu @kubernetes/sig-node
2016-10-20 19:21:34 -07:00
Tim St. Clair c29ec1d02a
Fix stdin type on attach 2016-10-20 14:54:16 -07:00
Tim St. Clair 80d7fcad86
Fix typo 2016-10-20 13:02:16 -07:00
Kubernetes Submit Queue db2d8e0cc4 Merge pull request #34819 from feiskyer/AppArmor
Automatic merge from submit-queue

CRI: add docs for AppArmor and Seccomp

This PR adds docs for AppArmor and Seccomp in CRI.

cc/ @yujuhong @Random-Liu
2016-10-18 21:52:04 -07:00
Tim St. Clair 05669255d1
Add ExecSync method 2016-10-18 19:03:10 -07:00
Tim St. Clair 21564aafed
stdin should be a bool, not a byte stream 2016-10-18 17:17:05 -07:00
Tim St. Clair be7834dc4a
Add streaming methods to CRI API 2016-10-17 18:28:03 -07:00
mbohlool 25afcc5522 Add +optional tag to all fields with omitempty json tag 2016-10-17 08:52:13 -07:00
Pengfei Ni 2ecdc2a81b CRI: add docs for AppArmor and Seccomp 2016-10-15 09:04:42 +08:00
Kubernetes Submit Queue d7c0eb322c Merge pull request #34276 from freehan/cri-runtime-config
Automatic merge from submit-queue

add UpdateRuntimeConfig interface

Expose UpdateRuntimeConfig interface in RuntimeService for kubelet to pass a set of configurations to runtime. Currently it only takes PodCIDR.

The use case is for kubelet to pass configs to runtime. Kubelet holds some config/information which runtime does not have, such as PodCIDR. I expect some of kubelet configurations will gradually move to runtime, but I believe cases like PodCIDR, which dynamically assigned by k8s master, need to stay for a while.
2016-10-13 23:10:42 -07:00