Commit Graph

1247 Commits (3215e8535ae8afcf850fbaac9df7ff9abe42f9e0)

Author SHA1 Message Date
Doug Davis 9d5bac6330 Change minion to node
Contination of #1111

I tried to keep this PR down to just a simple search-n-replace to keep
things simple.  I may have gone too far in some spots but its easy to
roll those back if needed.

I avoided renaming `contrib/mesos/pkg/minion` because there's already
a `contrib/mesos/pkg/node` dir and fixing that will require a bit of work
due to a circular import chain that pops up. So I'm saving that for a
follow-on PR.

I rolled back some of this from a previous commit because it just got
to big/messy. Will follow up with additional PRs

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-09-28 10:53:30 -07:00
Kubernetes Submit Queue c1e8c6d878 Merge pull request #32559 from guangxuli/k8s_lock
Automatic merge from submit-queue

the lockfile should be handled after function return
2016-09-28 01:46:56 -07:00
Justin Santa Barbara 54195d590f Use strongly-typed types.NodeName for a node name
We had another bug where we confused the hostname with the NodeName.

To avoid this happening again, and to make the code more
self-documenting, we use types.NodeName (a typedef alias for string)
whenever we are referring to the Node.Name.

A tedious but mechanical commit therefore, to change all uses of the
node name to use types.NodeName

Also clean up some of the (many) places where the NodeName is referred
to as a hostname (not true on AWS), or an instanceID (not true on GCE),
etc.
2016-09-27 10:47:31 -04:00
Kubernetes Submit Queue 4d9581345e Merge pull request #32449 from smarterclayton/defend_get
Automatic merge from submit-queue

Unwrap aggregates of size 1 when writing errors

Our special error logic was being defeated by aggregates.

Also, only use aggregate in get when we actually are dealing with
multiple errors.

@kubernetes/kubectl

For other kubectl reviewers - no one should use an aggregate unless you are ranging over a list, and even then ask yourself whether you really care about returning all errors.
2016-09-27 03:09:00 -07:00
Kubernetes Submit Queue e02b73ff67 Merge pull request #33464 from liggitt/terminating-namespace-check
Automatic merge from submit-queue

Fix cache expiration check

The check for whether an entry in the `forceLiveLookup` cache had expired was backwards. Fixed the logic and added tests
2016-09-26 21:51:34 -07:00
Clayton Coleman 9bfa63dbba
Unwrap aggregates of size 1 when writing errors
Also, only use aggregate in get when we actually are dealing with
multiple errors.
2016-09-26 15:56:38 -04:00
Timothy St. Clair d5e3832bc0 Revert "Revert "Follow on for 1.4 to default HTTP2 on by default""
This reverts commit 8cb799c789.
2016-09-26 10:09:26 -05:00
Jordan Liggitt 6cb0db2651
Allow testing LRUExpireCache with fake clock 2016-09-26 10:16:08 -04:00
Kubernetes Submit Queue 7144f54d78 Merge pull request #32390 from liggitt/ecdhe
Automatic merge from submit-queue

Remove duplicated ECDHE key handling

This PR removes the duplicated ECDHE private key handling. `x509.CreateCertificateRequest` picks the signature type for ECDHE keys already (see https://golang.org/src/crypto/x509/x509.go `signingParamsForPublicKey`). Only the RSA key signature needed customization.

It also defers to `CreateCertificateRequest` to return errors on unknown private key types.
2016-09-23 01:53:20 -07:00
Daniel Smith db3e549bd1 more usages of go2idl 2016-09-22 13:42:46 -07:00
Jordan Liggitt ec200a9edf
Remove duplicated ECDHE key handling 2016-09-22 14:52:10 -04:00
Kubernetes Submit Queue a8053c7c59 Merge pull request #33238 from mbohlool/openapi
Automatic merge from submit-queue

Move openapi common code to genericapiserver/openapi/common

a follow up to #32622

Reference: #13414
2016-09-22 10:20:48 -07:00
Kubernetes Submit Queue 5af04d1dd1 Merge pull request #32876 from errordeveloper/more-cert-utils
Automatic merge from submit-queue

Refactor cert utils into one pkg, add funcs from bootkube for kubeadm to use

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

We have ended-up with rather incomplete and fragmented collection of utils for handling certificates. It may be worse to consider using `cfssl` for doing all of these things, but for now there is some functionality that we need in `kubeadm` that we can borrow from bootkube. It makes sense to move the utils from bookube into core, as discussed in #31221.

**Special notes for your reviewer**: I've taken the opportunity to review names of existing funcs and tried to make some improvements in that area (with help from @peterbourgon).

**Release note**:

```release-note
NONE
```
2016-09-22 01:29:46 -07:00
Kubernetes Submit Queue fee69eedbf Merge pull request #33141 from liggitt/tls-config-mutation
Automatic merge from submit-queue

don't mutate original master->kubelet TLS config

fixes https://github.com/kubernetes/kubernetes/issues/33140

```release-note
Resolves x509 verification issue with masters dialing nodes when started with --kubelet-certificate-authority
```
2016-09-21 19:22:46 -07:00
mbohlool c25ecc43ab Move openapi common code to genericapiserver/openapi/common 2016-09-21 17:01:54 -07:00
Jordan Liggitt f3c80048f6
don't mutate original client TLS config 2016-09-21 00:57:20 -04:00
Michail Kargakis 59da5385e0 controller: enhance timeout error message for Recreate deployments 2016-09-20 15:53:24 +02:00
Ilya Dmitrichenko 386fae4592
Refactor utils that deal with certs
- merge `pkg/util/{crypto,certificates}`
- add funcs from `github.com/kubernetes-incubator/bootkube/pkg/tlsutil`
- ensure naming of funcs is fairly consistent
2016-09-19 09:03:42 +01:00
Vish Kannan a1fe3adbc7 Revert "Revert "[kubelet] Fix oom-score-adj policy in kubelet"" 2016-09-16 16:32:58 -07:00
Vish Kannan 492ca3bc9c Revert "[kubelet] Fix oom-score-adj policy in kubelet" 2016-09-15 19:28:59 -07:00
guangxuli 05d0c720f1 the lockfile should be handled after function return 2016-09-15 21:02:55 +08:00
Vishnu kannan e4acad7afb Fix oom-score-adj policy in kubelet.
Docker daemon and kubelet needs to be protected by setting oom-score-adj to -999.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-09-14 11:56:10 -07:00
Kubernetes Submit Queue 804de8a149 Merge pull request #32244 from tksm/fix-cache-race
Automatic merge from submit-queue

LRUExpireCache#Get requires write lock

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

[LRUExpireCache#Get](dbfad789e3/pkg/util/cache/lruexpirecache.go (L48)) requires write lock since [groupcache/lru#Get](a6b377e340/lru/lru.go (L74)) needs to manipulate its list to track recently used item. Currently it uses read lock so it may introduce race condition.

- [test code which introduces race condition with current LRUExpireCache#Get](https://gist.github.com/tksm/17c7a610ed0574c165e6f6edeca351b7#file-lru_race_test-go)

**Which issue this PR fixes** #31081
2016-09-13 14:36:26 -07:00
Kubernetes Submit Queue 6ffd30c2df Merge pull request #31468 from mbohlool/master
Automatic merge from submit-queue

Improvements on OpenAPI spec generation

- Generating models using go2idl library (no reflection anymore)
- Remove dependencies on go-restful/swagger
- Generate one swagger.json file for each web-service
- Bugfix: fixed a bug in trie implementation

Reference: #13414


**Release note**:

```release-note
Generate separate OpenAPI spec for each API GroupVersion on /<Group>/<Version>/swagger.json
```
2016-09-13 01:56:23 -07:00
Kubernetes Submit Queue 630c7532c6 Merge pull request #32274 from ping035627/ping035627-patch-0908
Automatic merge from submit-queue

Change all jsonmerge to strategicpatch

Implement all jsonmerge changed to strategicpatch in edit.go.
2016-09-13 01:15:52 -07:00
mbohlool 8153267ea8 Update generated proto and swagger docs 2016-09-12 18:47:03 -07:00
mbohlool 6ba271b9ae Customize OpenAPI definition types
customize intstr, unversioned.time, and quantity OpenAPI definitions.
2016-09-12 18:47:03 -07:00
deads2k 385831825b update error handling for daemoncontroller 2016-09-12 11:01:46 -04:00
Kubernetes Submit Queue dceb33d120 Merge pull request #32097 from brendandburns/dev
Automatic merge from submit-queue

Don't return an error if a file doesn't exist for IsPathDevice(...)

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

@saad-ali @thockin fyi, since linux devices and storage.
2016-09-09 01:37:40 -07:00
Kubernetes Submit Queue 3651765077 Merge pull request #31714 from smarterclayton/sync
Automatic merge from submit-queue

Allow missing keys in jsonpath
2016-09-08 22:22:16 -07:00
PingWang 121f6fb289 change all jsonmerge to strategicpatch
Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update preconditions define

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-09-09 08:28:10 +08:00
Takashi Kusumi 0bd475676b LRUExpireCache#Get requires write lock 2016-09-08 00:22:07 +09:00
Clayton Coleman 4189062a03
Feature gate is not stable sorted - docs change each gen 2016-09-06 23:36:24 -04:00
Kubernetes Submit Queue c9fde2ba8a Merge pull request #32082 from gmarek/namespace
Automatic merge from submit-queue

Make ExponentialFailureRateLimiter slightly slower and cap the backof…

Fix #27503

cc @deads2k @derekwaynecarr @ncdc @wojtek-t

For the context of this change see: https://github.com/kubernetes/kubernetes/issues/27503#issuecomment-244741161
2016-09-06 10:34:49 -07:00
Kubernetes Submit Queue 2a7d0df30d Merge pull request #30727 from asalkeld/iptables-caps
Automatic merge from submit-queue

Clean up IPTables caps i.e.: sed -i "s/Iptables/IPTables/g"

Fixes #30651
2016-09-06 09:01:27 -07:00
gmarek 0b8aeaf500 Make ExponentialFailureRateLimiter slightly slower and cap the backoff 2016-09-06 15:53:52 +02:00
Brendan Burns 07c8f9a173 Don't return an error if a file doesn't exist for IsPathDevice(...) 2016-09-05 20:45:22 -07:00
m1093782566 90bf34cafd fix errors.NewAggregate nil pointer panic
Change-Id: I82b376898f9170d237a3bd1a1ac898cc6c636d12
2016-09-02 15:37:42 +08:00
Clayton Coleman bcea2c8a4e
Allow missing keys in jsonpath
It is common in constrained circumstances to prefer an empty string
result from JSONPath templates for missing keys over an error. Several
other implementations provide this (the canonical JS and PHP, as well as
the Java implementation).  This also mirrors gotemplate, which allows
Options("missingkey=zero").

Added simple check and simple test case.
2016-08-30 13:06:26 -04:00
Tim St. Clair 68e0f01043
AppArmor was flipped to beta, update feature gate 2016-08-29 10:22:05 -07:00
Angus Salkeld f785f3d3ef Clean up IPTables caps i.e.: sed -i "s/Iptables/IPTables/g" 2016-08-29 10:34:42 +10:00
Kubernetes Submit Queue cefc4c3027 Merge pull request #31473 from timstclair/aa-gate
Automatic merge from submit-queue

Add AppArmor feature gate

Add option to disable AppArmor via a feature gate. This PR treats AppArmor as Beta, and thus depends on https://github.com/kubernetes/kubernetes/pull/31471 (I will remove `do-not-merge` once that merges).

Note that disabling AppArmor means that pods with AppArmor annotations will be rejected in validation. It does not mean that the components act as though AppArmor was never implemented. This is by design, because we want to make it difficult to accidentally run a Pod with an AppArmor annotation without AppArmor protection.

/cc @dchen1107
2016-08-26 21:04:42 -07:00
Kubernetes Submit Queue eeac23282d Merge pull request #31446 from liggitt/log-streaming
Automatic merge from submit-queue

Fix hang/websocket timeout when streaming container log with no content

When streaming and following a container log, no response headers are sent from the kubelet `containerLogs` endpoint until the first byte of content is written to the log. This propagates back to the API server, which also will not send response headers until it gets response headers from the kubelet. That includes upgrade headers, which means a websocket connection upgrade is not performed and can time out.

To recreate, create a busybox pod that runs `/bin/sh -c 'sleep 30 && echo foo && sleep 10'`

As soon as the pod starts, query the kubelet API:
```
curl -N -k -v 'https://<node>:10250/containerLogs/<ns>/<pod>/<container>?follow=true&limitBytes=100'
```

or the master API:
```
curl -N -k -v 'http://<master>:8080/api/v1/<ns>/pods/<pod>/log?follow=true&limitBytes=100'
```

In both cases, notice that the response headers are not sent until the first byte of log content is available.

This PR:
* does a 0-byte write prior to handing off to the container runtime stream copy. That commits the response header, even if the subsequent copy blocks waiting for the first byte of content from the log.
* fixes a bug with the "ping" frame sent to websocket streams, which was not respecting the requested protocol (it was sending a binary frame to a websocket that requested a base64 text protocol)
* fixes a bug in the limitwriter, which was not propagating 0-length writes, even before the writer's limit was reached
2016-08-26 06:09:43 -07:00
Kubernetes Submit Queue d3ecad111e Merge pull request #28717 from freehan/ebtable
Automatic merge from submit-queue

Filter duplicate network packets in promiscuous bridge mode (with ebtables)

also fixes: #30783
2016-08-25 19:12:09 -07:00
Tim St. Clair 9bde6f0770
Add AppArmor feature gate 2016-08-25 17:40:18 -07:00
Kubernetes Submit Queue 75fba4c953 Merge pull request #31445 from pmorie/goroutinemap-godoc
Automatic merge from submit-queue

Improve godoc for goroutinemap

Improves the godoc of goroutinemap; found while preparing to use this type in another PR.

@saad-ali
2016-08-25 14:07:08 -07:00
Jordan Liggitt ebd44347a5
Make limitWriter respect 0-byte writes until limit is reached 2016-08-25 14:27:17 -04:00
Paul Morie 1294267450 Improve godoc for goroutinemap 2016-08-25 14:25:05 -04:00
Jordan Liggitt 8b1a00b6d9
Send ping frame using specified encoding
If base-64 encoding was requested, send the ping frame as a 0-length text frame, rather than as a 0-length binary frame.
2016-08-25 14:24:59 -04:00
Kubernetes Submit Queue c63cd8fc20 Merge pull request #31396 from foxish/integer-overflow
Automatic merge from submit-queue

Fixed integer overflow bug in rate limiter.

```release-note
Fix overflow issue in controller-manager rate limiter
```

This PR fixes a bug in the delayed work-queue used by some controllers.
The integer overflow bug would previously cause hotlooping behavior after a few failures 
as `time.Duration(..)` on values larger than MaxInt64 behaves unpredictably, and 
after a certain value returns 0 always.

cc @bprashanth @pwittrock
2016-08-25 11:17:38 -07:00