Commit Graph

4141 Commits (fb608070408f4d38c0239c9d4bbe2585c7852060)

Author SHA1 Message Date
Pengfei Ni 9cab3b4a07 CRI: update protobuf to v3 2017-01-20 09:54:03 +08:00
Kubernetes Submit Queue 51919b4e1e Merge pull request #39772 from mikedanese/v1beta1
Automatic merge from submit-queue

promote certificates api to beta

Mostly posting to see what breaks but also this API is ready to be promoted.

```release-note
Promote certificates.k8s.io to beta and enable it by default. Users using the alpha certificates API should delete v1alpha1 CSRs from the API before upgrading and recreate them as v1beta1 CSR after upgrading.
```

@kubernetes/api-approvers @jcbsmpsn @pipejakob
2017-01-19 17:48:16 -08:00
Yu-Ju Hong f9479ed84b dockershim: add support for the 'nsenter' exec handler
This change simply plumbs the kubelet configuration
(--docker-exec-handler) to DockerService.
2017-01-19 16:23:48 -08:00
Mike Danese 44b7246568 autogenerated 2017-01-19 14:24:45 -08:00
Mike Danese 96c146c8f2 promote certificates.k8s.io to beta 2017-01-19 13:13:20 -08:00
gmarek 3c0d2bb1f0 Add SecretManager to Kubelet 2017-01-19 20:12:04 +01:00
Random-Liu 1027b14e3e Small fix in kubelet owner file. 2017-01-19 11:04:57 -08:00
Wojciech Tyczynski 09e4de385c Enable nontrivial secret manager 2017-01-19 19:47:33 +01:00
Wojciech Tyczynski ffd8daf488 SecretManager with caching 2017-01-19 19:47:32 +01:00
Wojciech Tyczynski 85ee9e570b Create SecretManager interface 2017-01-19 19:47:32 +01:00
Michael Fraenkel 13d693d220 Secrets can populate environment variables 2017-01-19 13:46:05 -05:00
Kubernetes Submit Queue e9d4e4341c Merge pull request #40087 from deads2k/generic-24-move-fields
Automatic merge from submit-queue

move pkg/fields to apimachinery

Purely mechanical move of `pkg/fields` to apimachinery.  

Discussed with @lavalamp on slack.  Moving this an `labels` to apimachinery.

@liggitt any concerns?  I think the idea of field selection should become generic and this ends up shared between client and server, so this is a more logical location.
2017-01-19 08:48:17 -08:00
Kubernetes Submit Queue 05c2a0825e Merge pull request #38871 from k82cn/k8s_25318
Automatic merge from submit-queue

Made multi-scheduler graduated to Beta and then v1.

fixes #25318
2017-01-19 07:58:51 -08:00
deads2k 11e8068d3f move pkg/fields to apimachinery 2017-01-19 09:50:16 -05:00
Kubernetes Submit Queue ac857a5ade Merge pull request #40106 from deads2k/client-09-switch
Automatic merge from submit-queue

make client-go more authoritative

Builds on https://github.com/kubernetes/kubernetes/pull/40103

This moves a few more support package to client-go for origination.  
 1. restclient/watch - nodep
 1. util/flowcontrol - used interface
 1. util/integer, util/clock - used in controllers and in support of util/flowcontrol
2017-01-19 06:34:49 -08:00
deads2k c47717134b move utils used in restclient to client-go 2017-01-19 07:55:14 -05:00
Klaus Ma c8c4b81963 Made multi-scheduler graduated to Beta and then v1. 2017-01-19 20:16:01 +08:00
Dr. Stefan Schimanski 3d9449a353 genericapiserver: fix imports 2017-01-19 13:06:47 +01:00
Kubernetes Submit Queue 0144fae64f Merge pull request #29666 from vefimova/fix_29270
Automatic merge from submit-queue

Fixed merging of host's and dns' search lines

Fixed forming of pod's Search line in resolv.conf:
 - exclude duplicates while merging of host's and dns' search lines to form pod's one
 - truncate pod's search line if it exceeds resolver limits: is > 255 chars and containes > 6 searches
 - monitoring the resolv.conf file which is used by kubelet (set thru --resolv-conf="") and logging and eventing if search line in it consists of more than 3 entries (or 6 if Cluster Domain is set) or its lenght is > 255 chars
 - logging and eventing when a pod's search line is > 255 chars or containes > 6 searches during forming

Fixes #29270

**Release note**:

```release-note
Fixed forming resolver search line for pods: exclude duplicates, obey libc limitations, logging and eventing appropriately.
```
2017-01-19 01:37:50 -08:00
Kubernetes Submit Queue 5ca25bea21 Merge pull request #36528 from apelisse/owners-pkg-kubelet
Automatic merge from submit-queue

Curating Owners: pkg/kubelet

cc @euank @vishh @dchen1107 @feiskyer @yujuhong @yifan-gu @derekwaynecarr @saad-ali

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone lgtms and then someone
experienced in the project approves), we are adding new reviewers to
existing owners files.


If You Care About the Process:
------------------------------

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
well: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.

Also, see https://github.com/kubernetes/contrib/issues/1389.

TLDR:
-----

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:

1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.

2. The pull-request is made editable, please edit the `OWNERS` file to
remove the names of people that shouldn't be reviewing code in the
future in the **reviewers** section. You probably do NOT need to modify
the **approvers** section. Names asre sorted by relevance, using some
secret statistics.

3. Notify me if you want some OWNERS file to be removed.  Being an
approver or reviewer of a parent directory makes you a reviewer/approver
of the subdirectories too, so not all OWNERS files may be necessary.

4. Please use ALIAS if you want to use the same list of people over and
over again (don't hesitate to ask me for help, or use the pull-request
above as an example)
2017-01-18 13:14:25 -08:00
Antoine Pelisse 3d82265340 Update OWNERS approvers and reviewers: pkg/kubelet 2017-01-18 10:27:11 -08:00
Jordan Liggitt e49554501f
Use versioned Taint/Toleration/AllowPods objects when marshalling 2017-01-18 12:52:14 -05:00
deads2k 4f915039e4 move pkg/client/transport to client-go 2017-01-18 07:56:01 -05:00
Kubernetes Submit Queue 180936f8df Merge pull request #39826 from shyamjvs/fake-docker-client-fix
Automatic merge from submit-queue

Made tracing of calls and container lifecycle steps in FakeDockerClient optional

Fixes #39717 

Slightly refactored the FakeDockerClient code and made tracing optional (but enabled by default).

@yujuhong @Random-Liu
2017-01-17 21:11:36 -08:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Shyam Jeedigunta 814c850fe5 Made tracing of calls and container lifecycle steps in FakeDockerClient optional 2017-01-17 18:56:39 +01:00
vefimova d925439727 Fixed forming of pod's Search line in resolv.conf:
- exclude duplicates while merging of host's and dns' search lines to form pod's one
 - truncate pod's search line if it exceeds resolver limits: is > 255 chars and containes > 6 searches
 - monitoring the resolv.conf file which is used by kubelet (set thru --resolv-conf="") and logging and eventing if search line in it consists of more than 3 entries
   (or 6 if Cluster Domain is set) or its lenght is > 255 chars
 - logging and eventing when a pod's search line is > 255 chars or containes > 6 searches during forming
Fixes #29270
2017-01-17 13:18:26 +00:00
Kubernetes Submit Queue d270ec0ed2 Merge pull request #37680 from mfojtik/report-pod-name
Automatic merge from submit-queue

Report the Pod name and namespace when kubelet fails to sync the container

This helps debugging problems with SELinux (and other problems related to the Docker failed to run the container) as currently only the UUID of the Pod is reported:

```
Error syncing pod 670f607d-b5a8-11a4-b673-005056b7468b, skipping: failed to "StartContainer" for "deployment" with RunContainerError: "runContainer: Error response from daemon: Relabeling content in /usr is not allowed."
```

Here it would be useful to know what pod in which namespace is trying to mount the "/usr".
2017-01-16 23:59:44 -08:00
deads2k 8686d67c80 move pkg/util/rand 2017-01-16 16:04:03 -05:00
Michal Fojtik 34db84efe2
Report the Pod name and namespace when kubelet fails to sync the container 2017-01-16 16:44:56 +01:00
deads2k 77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
Kubernetes Submit Queue eb9f953496 Merge pull request #39876 from deads2k/generic-20-deps-03
Automatic merge from submit-queue

move more things to apiserver

```
pkg/genericapiserver/api/handlers/negotiation/ -> apiserver/pkg/handlers/negotiation
pkg/genericapiserver/api/metrics -> apiserver/pkg/metrics
pkg/genericapiserver/api/request -> apiserver/pkg/request
pkg/util/wsstream -> apiserver/pkg/util/wsstream
plugin/pkg/auth/authenticator/request/headerrequest -> apiserver/pkg/authentication/request/headerrequest
plugin/pkg/webhook -> apiserver/pkg/webhook
```

and mechanicals.

`k8s.io/kubernetes/pkg/genericapiserver/routes/data/swagger` needs to be sorted out.
2017-01-16 04:14:37 -08:00
Kubernetes Submit Queue e73e749459 Merge pull request #39679 from errows/fix_sucessfully_typos
Automatic merge from submit-queue (batch tested with PRs 39417, 39679)

Fix 2 `sucessfully` typos

**What this PR does / why we need it**: Only fixes two typos in comments/logging

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-01-14 19:51:09 -08:00
Kubernetes Submit Queue 5b629d83a2 Merge pull request #39303 from NickrenREN/eviction-manager
Automatic merge from submit-queue (batch tested with PRs 37505, 39844, 39525, 39109, 39303)

remove NewManager() return err
2017-01-13 14:33:35 -08:00
deads2k 31b6ba4e94 mechanicals 2017-01-13 16:33:09 -05:00
Kubernetes Submit Queue a6fa5c2bfd Merge pull request #39814 from deads2k/api-58-multi-register
Automatic merge from submit-queue

replace global registry in apimachinery with global registry in k8s.io/kubernetes

We'd like to remove all globals, but our immediate problem is that a shared registry between k8s.io/kubernetes and k8s.io/client-go doesn't work.  Since client-go makes a copy, we can actually keep a global registry with other globals in pkg/api for now.

@kubernetes/sig-api-machinery-misc @lavalamp @smarterclayton @sttts
2017-01-13 12:37:02 -08:00
Kubernetes Submit Queue 7dd815221c Merge pull request #39838 from foxyriver/add-break
Automatic merge from submit-queue

break from the for loop

**What this PR does / why we need it**:

exit loop, because the following actions will not affect the result

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-01-13 11:43:48 -08:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
Kubernetes Submit Queue 3fa44312ad Merge pull request #38631 from ncdc/fix-kubelet-cadvisor-build-tags
Automatic merge from submit-queue

Fix cadvisor_unsupported.go build tags

Make it so cadvisor_unsupported.go is used for linux without cgo or
non-linux/windows OSes.
2017-01-12 21:32:39 -08:00
Kubernetes Submit Queue 9a88687e24 Merge pull request #37865 from yujuhong/decouple_lifecycle
Automatic merge from submit-queue

kubelet: remove the pleg health check from healthz

This prevents kubelet from being killed when docker hangs.

Also, kubelet will report node not ready if PLEG hangs (`docker ps` + `docker inspect`).
2017-01-12 19:10:14 -08:00
foxyriver b35dc8ecd7 break from the for loop 2017-01-13 09:34:31 +08:00
Kubernetes Submit Queue 082ce00eca Merge pull request #39478 from rrati/pod-affinity-api-fields
Automatic merge from submit-queue (batch tested with PRs 39803, 39698, 39537, 39478)

[scheduling] Moved pod affinity and anti-affinity from annotations to api fields #25319

Converted pod affinity and anti-affinity from annotations to api fields

Related: #25319
Related: #34508

**Release note**:
```Pod affinity and anti-affinity has moved from annotations to api fields in the pod spec.  Pod affinity or anti-affinity that is defined in the annotations will be ignored.```
2017-01-12 15:06:33 -08:00
Kubernetes Submit Queue ee49906c45 Merge pull request #39661 from NickrenREN/clientset-redundant-modify
Automatic merge from submit-queue

fix redundant alias clientset

remove redundant alias clientset
2017-01-12 13:29:16 -08:00
Robert Rati 6a3ad93d6c [scheduling] Moved pod affinity and anti-affinity from annotations to api
fields. #25319
2017-01-12 14:54:29 -05:00
NickrenREN ad1f0d30e0 delete ErrorTimeout() function and modify Umask() args
ErrorTimeout is never used
2017-01-12 11:05:30 +08:00
NickrenREN a12dea14e0 fix redundant alias clientset 2017-01-12 10:21:05 +08:00
Kubernetes Submit Queue 4ac5f278c5 Merge pull request #38742 from timstclair/cri-exec-long
Automatic merge from submit-queue

[CRI] Don't include user data in CRI streaming redirect URLs

Fixes: https://github.com/kubernetes/kubernetes/issues/36187

Avoid userdata in the redirect URLs by caching the {Exec,Attach,PortForward}Requests with a unique token. When the redirect URL is created, the token is substituted for the request params. When the streaming server receives the token request, the token is used to fetch the actual request parameters out of the cache.

For additional security, the token is generated using the secure random function, is single use (i.e. the first request with the token consumes it), and has a short expiration time.

/cc @kubernetes/sig-node
2017-01-11 17:16:07 -08:00
Tim St. Clair c17f3ee367
Don't include user data in CRI streaming redirect URLs 2017-01-11 13:40:43 -08:00
deads2k c4fae4e690 mechanical repercussions 2017-01-11 15:20:36 -05:00
Kubernetes Submit Queue 636902c759 Merge pull request #39731 from apprenda/dockertools_fix
Automatic merge from submit-queue

Fix kubelet cross build

**What this PR does / why we need it**: Cross builds are not passing for MacOS and Windows. We are expecting Windows binaries for `kubelet` and `kube-proxy` to be released by the first time with 1.5.2 to be released later today.

**Which issue this PR fixes**:
fixes #39005
fixes #39714

**Special notes for your reviewer**: /cc @feiskyer @smarterclayton @vishh this should be P0 in order to be merged before 1.5.2 and obviously fix the cross build.
2017-01-11 10:53:27 -08:00
Kubernetes Submit Queue bc861bf756 Merge pull request #39475 from deads2k/generic-14-apimachinery
Automatic merge from submit-queue (batch tested with PRs 39475, 38666, 39327, 38396, 39613)

Create k8s.io/apimachinery repo

Don't panic.

The diff is quite large, but its all generated change.  The first few commits are where are all the action is.  I built a script to find the fanout from 
```
k8s.io/kubernetes/pkg/apimachinery/registered
k8s.io/kubernetes/pkg/runtime/serializer
k8s.io/kubernetes/pkg/runtime/serializer/yaml
k8s.io/kubernetes/pkg/runtime/serializer/streaming
k8s.io/kubernetes/pkg/runtime/serializer/recognizer/testing 
```

It copied 
```
k8s.io/kubernetes/pkg/api/meta
k8s.io/kubernetes/pkg/apimachinery
k8s.io/kubernetes/pkg/apimachinery/registered
k8s.io/kubernetes/pkg/apis/meta/v1
k8s.io/kubernetes/pkg/apis/meta/v1/unstructured
k8s.io/kubernetes/pkg/conversion
k8s.io/kubernetes/pkg/conversion/queryparams
k8s.io/kubernetes/pkg/genericapiserver/openapi/common - this needs to renamed post-merge.  It's just types
k8s.io/kubernetes/pkg/labels
k8s.io/kubernetes/pkg/runtime
k8s.io/kubernetes/pkg/runtime/schema
k8s.io/kubernetes/pkg/runtime/serializer
k8s.io/kubernetes/pkg/runtime/serializer/json
k8s.io/kubernetes/pkg/runtime/serializer/protobuf
k8s.io/kubernetes/pkg/runtime/serializer/recognizer
k8s.io/kubernetes/pkg/runtime/serializer/recognizer/testing
k8s.io/kubernetes/pkg/runtime/serializer/streaming
k8s.io/kubernetes/pkg/runtime/serializer/versioning
k8s.io/kubernetes/pkg/runtime/serializer/yaml
k8s.io/kubernetes/pkg/selection
k8s.io/kubernetes/pkg/types
k8s.io/kubernetes/pkg/util/diff
k8s.io/kubernetes/pkg/util/errors
k8s.io/kubernetes/pkg/util/framer
k8s.io/kubernetes/pkg/util/json
k8s.io/kubernetes/pkg/util/net
k8s.io/kubernetes/pkg/util/runtime
k8s.io/kubernetes/pkg/util/sets
k8s.io/kubernetes/pkg/util/validation
k8s.io/kubernetes/pkg/util/validation/field
k8s.io/kubernetes/pkg/util/wait
k8s.io/kubernetes/pkg/util/yaml
k8s.io/kubernetes/pkg/watch
k8s.io/kubernetes/third_party/forked/golang/reflect
```

The script does the import rewriting and gofmt.  Then you do a build, codegen, bazel update, and it produces all the updates.

If we agree this is the correct approach.  I'll create a verify script to make sure that no one messes with any files in the "dead" packages above.

@kubernetes/sig-api-machinery-misc @smarterclayton @sttts @lavalamp @caesarxuchao 

`staging/prime-apimachinery.sh && hack/update-codegen.sh && nice make WHAT="federation/cmd/federation-apiserver/ cmd/kube-apiserver" && hack/update-openapi-spec.sh && hack/update-federation-openapi-spec.sh && hack/update-codecgen.sh && hack/update-codegen.sh && hack/update-generated-protobuf.sh && hack/update-bazel.sh`
2017-01-11 09:14:49 -08:00
Paulo Pires f4edaf2b8c
dockertools: disable swap on Linux since it's unsupported.
Refs #39005
2017-01-11 17:07:53 +00:00
Paulo Pires dacc363605
dockertools: fix Windows implementation.
Fixes #39005
Fixes #39714
2017-01-11 17:07:52 +00:00
Kubernetes Submit Queue cd55e1b259 Merge pull request #39714 from feiskyer/fix
Automatic merge from submit-queue (batch tested with PRs 39714, 39646)

dockertools: fix build on OSX

#39005 introduces a build problem on OSX. This PR fixes it.

Refer [here](https://github.com/kubernetes/kubernetes/pull/39005#issuecomment-271781026).
2017-01-11 08:00:47 -08:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Kubernetes Submit Queue 1fbb22e115 Merge pull request #39702 from mikedanese/kubelet-csr
Automatic merge from submit-queue (batch tested with PRs 39684, 39577, 38989, 39534, 39702)

kubelet: request client auth certificates from certificate API.

This fixes kubeadm and --experiment-kubelet-bootstrap.

cc @liggitt
2017-01-10 22:24:17 -08:00
Kubernetes Submit Queue 3f9f7471af Merge pull request #38989 from sjenning/set-qos-field
Automatic merge from submit-queue (batch tested with PRs 39684, 39577, 38989, 39534, 39702)

Set PodStatus QOSClass field

This PR continues the work for https://github.com/kubernetes/kubernetes/pull/37968

It converts all local usage of the `qos` package class types to the new API level types (first commit) and sets the pod status QOSClass field in the at pod creation time on the API server in `PrepareForCreate` and in the kubelet in the pod status update path (second commit).  This way the pod QOS class is set even if the pod isn't scheduled yet.

Fixes #33255

@ConnorDoyle @derekwaynecarr @vishh
2017-01-10 22:24:13 -08:00
Pengfei Ni 1f17a47f4e dockertools: fix build on OSX 2017-01-11 14:08:30 +08:00
Kubernetes Submit Queue d3c0914a14 Merge pull request #39005 from brendandburns/windows
Automatic merge from submit-queue (batch tested with PRs 38212, 38792, 39641, 36390, 39005)

Set MemorySwap to zero on Windows

Fixes https://github.com/kubernetes/kubernetes/issues/39003

@dchen1107 @michmike @kubernetes/sig-node-misc
2017-01-10 19:48:16 -08:00
Kubernetes Submit Queue addc6cae4a Merge pull request #38212 from mikedanese/kubeletauth
Automatic merge from submit-queue (batch tested with PRs 38212, 38792, 39641, 36390, 39005)

Generate a kubelet CA and kube-apiserver cert-pair for kubelet auth.

cc @cjcullen
2017-01-10 19:48:09 -08:00
Mike Danese d2032fd83c kubelet: request client auth certificates from certificate API. 2017-01-10 17:57:39 -08:00
Yu-Ju Hong ec0e99c2ed Check the health of PLEG when updating the node status 2017-01-10 16:34:00 -08:00
Yu-Ju Hong 03106dd1cb kubelet: remove the pleg health check from healthz/
If docker hangs, we don't want kubelet to get killed as well.
2017-01-10 16:32:46 -08:00
Kubernetes Submit Queue 65d6a5c6a8 Merge pull request #39455 from kubernetes/revert-39306-oom_score_adj
Automatic merge from submit-queue (batch tested with PRs 39486, 37288, 39477, 39455, 39542)

Revert "Small improve for GetContainerOOMScoreAdjust"

Reverts kubernetes/kubernetes#39306

This does not help current code healthy, let's revert it to avoid further confusing.
2017-01-10 14:33:17 -08:00
Seth Jennings e2402b781b set qos class field in pod status 2017-01-10 16:31:52 -06:00
Seth Jennings 4c30459e49 switch from local qos types to api types 2017-01-10 10:54:30 -06:00
Marc-Antoine Ross c01c7023a0 Fix 2 `sucessfully` typos 2017-01-10 10:37:45 -05:00
Brendan Burns c050826fea Set MemorySwap to zero on Windows 2017-01-09 23:08:48 -08:00
deads2k 1df5b658f2 switch webhook to clientgo 2017-01-09 16:53:24 -05:00
Kubernetes Submit Queue 0bbb49d2d5 Merge pull request #39479 from fraenkel/podkiller
Automatic merge from submit-queue

Avoid panic when stopping the podKiller

use a mutex instead of a channel

fixes #38857
2017-01-06 16:02:16 -08:00
Kubernetes Submit Queue aa7509989b Merge pull request #39318 from NickrenREN/eviction-manager-start
Automatic merge from submit-queue

remove eviction-manager start return err
2017-01-06 11:55:41 -08:00
Kubernetes Submit Queue 402abd23ef Merge pull request #39493 from sjenning/fix-null-deref
Automatic merge from submit-queue (batch tested with PRs 39493, 39496)

kubelet: fix nil deref in volume type check

An attempt to address memory exhaustion through a build up of terminated pods with memory backed volumes on the node in PR https://github.com/kubernetes/kubernetes/pull/36779 introduced this.

For the `VolumeSpec`, either the `Volume` or `PersistentVolume` field is set, not both.  This results in a situation where there is a nil deref on PVs.  Since PVs are inherently not memory-backend, only local/temporal volumes should be considered.

This needs to go into 1.5 as well.

Fixes #39480

@saad-ali @derekwaynecarr @grosskur @gnufied

```release-note
fixes nil dereference when doing a volume type check on persistent volumes
```
2017-01-06 08:44:18 -08:00
NickrenREN 85e6076fab remove eviction-manager start return err
Start() function will never return err,we do not need the return value
2017-01-06 09:32:16 +08:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Seth Jennings c4e6725236 fix nil deref 2017-01-05 15:36:42 -06:00
Michael Fraenkel fb3a1d6851 Avoid panic when stopping the podKiller
use a mutex instead of a channel
2017-01-05 14:52:24 -05:00
deads2k 4d7fcae85a mechanicals 2017-01-05 11:14:27 -05:00
Harry Zhang 9712fe8455 Revert "Small improve for GetContainerOOMScoreAdjust" 2017-01-05 09:54:11 +08:00
Michael Fraenkel f6c9ab4312 Check if key is a valid after prefix is prepended
- Allow invalid keys to become valid by requiring a prefix
2017-01-04 17:26:44 -05:00
Kubernetes Submit Queue 5ee52e8bce Merge pull request #39384 from deads2k/generic-01-start-staging
Automatic merge from submit-queue

Start moving genericapiserver to staging

This moves `pkg/auth/user` to `staging/k8s.io/genericapiserver/pkg/authentication/user`.  I'll open a separate pull into the upstream gengo to support using `import-boss` on vendored folders to support staging.

After we agree this is the correct approach and see everything build, I'll start moving other packages over which don't have k8s.io/kubernetes deps.

@kubernetes/sig-api-machinery-misc @lavalamp 
@sttts @caesarxuchao ptal
2017-01-04 12:06:34 -08:00
Jess Frazelle db75904b42
fix when os.Remove should be os.RemoveAll
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-01-04 10:34:06 -08:00
Jess Frazelle 7db9c8b454
cleanup fooPodContainerDir in /tmp
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-01-04 10:27:08 -08:00
Jess Frazelle a2dbd456a7
cleanup all /tmp/kubelet_test files
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-01-04 10:26:24 -08:00
deads2k ca58ec0237 mechanical changes for move 2017-01-04 10:27:05 -05:00
Kubernetes Submit Queue 2cc9650e7e Merge pull request #39306 from hex108/oom_score_adj
Automatic merge from submit-queue (batch tested with PRs 38084, 39306)

Small improve for GetContainerOOMScoreAdjust

In `GetContainerOOMScoreAdjust`, make logic more clear for the case `oomScoreAdjust >= besteffortOOMScoreAdj`. If `besteffortOOMScoreAdj`  is defined to another value(e.g. 996), suppose `oomScoreAdjust` is 999, the function will return 998(which equals 999 - 1) instead of 995(996 -1).
2017-01-04 07:18:07 -08:00
Kubernetes Submit Queue 9b726d6b8f Merge pull request #38687 from ivan4th/remove-dockerlegacyservice-comment-from-kubelet
Automatic merge from submit-queue

Remove DockerLegacyService comment from kubelet
2017-01-03 23:28:22 -08:00
Kubernetes Submit Queue 819535b96a Merge pull request #36245 from fraenkel/env_configmap
Automatic merge from submit-queue (batch tested with PRs 38433, 36245)

Allow pods to define multiple environment variables from a whole ConfigMap

Allow environment variables to be populated from ConfigMaps

- ConfigMaps represent an entire set of EnvVars
- EnvVars can override ConfigMaps


fixes #26299
2017-01-03 23:28:09 -08:00
Kubernetes Submit Queue fe391d7bb0 Merge pull request #37350 from chentao1596/delete-meaningless-judgments
Automatic merge from submit-queue (batch tested with PRs 39280, 37350, 39389, 39390, 39313)

delete meaningless judgments

What this PR does / why we need it:
      Whether "err" is nil or not, "err" can be return, so the judgment "err !=nil " is unnecessary
2017-01-03 18:25:10 -08:00
Kubernetes Submit Queue 9eaf1aa38f Merge pull request #39273 from NickrenREN/kubelet-node-status
Automatic merge from submit-queue (batch tested with PRs 39001, 39104, 35978, 39361, 39273)

delete SetNodeStatus() function and fix some function notes words
2017-01-03 17:18:12 -08:00
CJ Cullen d0997a3d1f Generate a kubelet CA and kube-apiserver cert-pair for kubelet auth.
Plumb through to kubelet/kube-apiserver on gci & cvm.
2017-01-03 14:30:45 -08:00
Andy Goldstein 92a429887a Fix cadvisor_unsupported.go build tags
Make it so cadvisor_unsupported.go is used for linux without cgo or
non-linux/windows OSes.
2017-01-03 13:06:10 -05:00
Kubernetes Submit Queue 1cee8c45d6 Merge pull request #39237 from NickrenREN/pod-manager
Automatic merge from submit-queue (batch tested with PRs 39092, 39126, 37380, 37093, 39237)

Add unit test function to test DeletePod
2017-01-03 09:45:26 -08:00
Michael Fraenkel 2d803afc98 ConfigMaps populate environment variables 2017-01-03 11:02:15 -05:00
Dr. Stefan Schimanski 87dd990bb7 Move pkg/api.{Context,RequestContextMapper} into pkg/genericapiserver/api/request 2017-01-03 14:57:33 +01:00
NickrenREN fd336cde07 drop SetNodeStatus() function and fix some function notes words
drop SetNodeStatus() Since it is never called now. klet.defaultNodeStatusFuncs() is set to klet.setNodeStatusFuncs now and setNodeStatus() function is called by other functions.
2017-01-03 11:26:50 +08:00
NickrenREN 0f35ce1af3 drop NewManager() return err
NewManager will never return err,drop it
2017-01-03 11:24:12 +08:00
NickrenREN 2fa0935c19 Add unit test function to test DeletePod
Add unit test function to test DeletePod() of podManager
2017-01-03 11:08:39 +08:00
Jeff Grafton fae627dd65 Update generated for 2017 2017-01-01 23:11:09 -08:00
Kubernetes Submit Queue f5d9c430e9 Merge pull request #39298 from feiskyer/images
Automatic merge from submit-queue

Kubelet: add image ref to ImageService interfaces

This PR adds image ref (digest or ID, depending on runtime) to PullImage result, and pass image ref in CreateContainer instead of image name. It also

* Adds image ref to CRI's PullImageResponse
* Updates related image puller
* Updates related testing utilities

~~One remaining issue is: it breaks some e2e tests because they [checks image repoTags](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/framework/util.go#L1941) while docker always returns digest in this PR. Should we update e2e test or continue to return repoTags in `containerStatuses.image`?~~

Fixes #38833.
2016-12-30 22:51:18 -08:00
Pengfei Ni 67a5bf8454 Rename imageservice.IsImagePresent to GetImageRef 2016-12-31 08:36:55 +08:00