Commit Graph

41356 Commits

Author SHA1 Message Date
Kubernetes Submit Queue
58d319e589 Merge pull request #39093 from dgoodwin/token-default
Automatic merge from submit-queue

kubeadm: Default to using token discovery.

Recent changes to support multiple methods for discovery meant that
"kubeadm init" no longer was sufficient and users would need to add
"--discovery token://" to achieve the same results.

Instead lets assume discovery if the user does not specify anything else
to maintain parity and the brevity of our original instructions.


**Release note**:

```release-note
NONE
```

CC @mikedanese @luxas
2016-12-23 01:20:00 -08:00
Kubernetes Submit Queue
5f0ece92de Merge pull request #39008 from brendandburns/unicode
Automatic merge from submit-queue

Support loading UTF16 files if a byte-order-mark is present

Add support in kubectl for loading UTF16 encoded files if they have a correct BOM (Byte-Order-Mark https://en.wikipedia.org/wiki/Byte_order_mark) at the beginning
of the file. Falls back on UTF8 encoding, if no understandable BOM is present.

Fixes part of https://github.com/kubernetes/kubernetes/issues/39007

@fabianofranz @deads2k @kubernetes/sig-cli-misc
2016-12-22 22:11:13 -08:00
Kubernetes Submit Queue
c200f27245 Merge pull request #38090 from xingzhou/kube-37654
Automatic merge from submit-queue (batch tested with PRs 38920, 38090)

Improve error message for name/label validation.

Instead of just providing regex in name/label validation error output, we need to add the naming rules of the name/label, which is more end-user readable.

Fixed #37654
2016-12-22 22:00:30 -08:00
Kubernetes Submit Queue
ff8e8c6778 Merge pull request #38920 from k82cn/k8s_37979
Automatic merge from submit-queue

Add event when failed to open local port.

fixes #37979 .
2016-12-22 21:32:27 -08:00
Pengfei Ni
16bcafb775 Update bazel 2016-12-23 11:54:16 +08:00
Kubernetes Submit Queue
9541c38f39 Merge pull request #37296 from ncdc/skip-dash-in-protobuf-tags
Automatic merge from submit-queue

Fix skipping - protobuf fields

**What this PR does / why we need it**: fixes the protobuf generator to skip fields with a protobuf tag of `"-"`

Match changes in https://github.com/kubernetes/gengo/pull/19

I couldn't get godeps to work to vendor this change in from gengo, so I made the same edits manually in cmd/libs/go2idl. A task for another day...

@smarterclayton
2016-12-22 19:36:25 -08:00
Kubernetes Submit Queue
f1aa025837 Merge pull request #38655 from abrarshivani/fsGroupforvSphere
Automatic merge from submit-queue (batch tested with PRs 39059, 39175, 35676, 38655)

Fix fsGroup to vSphere

**What this PR does / why we need it**:
Fixes #34039 by adding support for fsGroup to vSphere Volume. 

**Special notes for your reviewer**:
Tested with example from http://stackoverflow.com/questions/35213589/docker-container-with-non-root-user-deployed-in-google-container-engine-can-not
Before this fix got error ```Permission Denied```.

**Release note**:

`NONE`

cc @pdhamdhere @kerneltime @BaluDontu
2016-12-22 18:50:34 -08:00
Kubernetes Submit Queue
af54124f23 Merge pull request #35676 from krmayankk/contr-ref
Automatic merge from submit-queue (batch tested with PRs 39059, 39175, 35676, 38655)

ReplicaSet has onwer ref of the Deployment that created it

**What this PR does / why we need it**:
This enabled garbage collection for ReplicaSets and ensures they are owned by their respective Deployment objects.

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

This is an initial PR to get feedback. Will update this quickly with unit tests if this seems like in the right direction
2016-12-22 18:50:32 -08:00
Kubernetes Submit Queue
eda64e885f Merge pull request #39175 from kubernetes/revert-39146-make-fluentd-critical
Automatic merge from submit-queue (batch tested with PRs 39059, 39175, 35676, 38655)

Revert "Make fluentd pods critical"

Reverts kubernetes/kubernetes#39146
2016-12-22 18:50:30 -08:00
Pengfei Ni
1a67e0ee7a Do not test linux-specific cases on OSX in dockertools 2016-12-23 10:37:10 +08:00
Kubernetes Submit Queue
d04fd1bd6c Merge pull request #39059 from bprashanth/static_evict
Automatic merge from submit-queue

Don't evict static pods

A follow up to https://github.com/kubernetes/kubernetes/pull/38914, the desired behavior is to:    

1. deprioritize critical pods
2. never evict static pods

I don't think 1 needs a cherrypick if 2 goes in. 

partial fix for #https://github.com/kubernetes/kubernetes/issues/38322
2016-12-22 18:21:42 -08:00
Łukasz Oleś
84d0a5d1d9 Increase number of iterations in TestDefaulting
Fixes #39180
2016-12-23 03:04:32 +01:00
Kubernetes Submit Queue
ae4db79d1c Merge pull request #39118 from bowei/cleanup-dns
Automatic merge from submit-queue (batch tested with PRs 39006, 39078, 37188, 39118)

Cleanup dns

* Remove hostname endpoints annotation (was beta feature)
* Remove references to non-client-go API
* Replaces references to internal kubernetes API with client-go.
2016-12-22 17:47:31 -08:00
Kubernetes Submit Queue
0a750599fd Merge pull request #37188 from NickrenREN/context_test
Automatic merge from submit-queue (batch tested with PRs 39006, 39078, 37188, 39118)

add test functions in context_test.go
2016-12-22 17:47:30 -08:00
Kubernetes Submit Queue
7f60e1dc04 Merge pull request #39078 from wojtek-t/fix_missing_watch_events
Automatic merge from submit-queue (batch tested with PRs 39006, 39078, 37188, 39118)

Fix bug of missing random watch events in the event stream

Fix #39072
2016-12-22 17:47:28 -08:00
Andy Goldstein
f0247ea595 Fix skipping - protobuf fields
Match changes in https://github.com/kubernetes/gengo/pull/19
2016-12-22 20:45:05 -05:00
Kubernetes Submit Queue
dba16d052c Merge pull request #39006 from fabianofranz/issues_38834
Automatic merge from submit-queue

In-cluster configs must take flag overrides into account

**What this PR does / why we need it**: Some flags must override in-cluster configs if provided to `kubectl` inside a cluster.

**Which issue this PR fixes**: Fixes https://github.com/kubernetes/kubernetes/issues/38834

**Release note**:
```release-note
Fixed a bug where the --server, --token, and --certificate-authority flags were not overriding the related in-cluster configs when provided in a `kubectl` call inside a cluster.
```
2016-12-22 17:42:27 -08:00
Mayank Kumar
777977612b ReplicaSet has owner ref of the Deployment that created it 2016-12-22 16:45:50 -08:00
bprashanth
1743c6b6ab Don't evict static pods 2016-12-22 16:22:14 -08:00
Dawn Chen
9d3f4d7152 Revert "Make fluentd pods critical" 2016-12-22 15:58:36 -08:00
Anirudh
7f0bcb3688 Add PDB to kubectl get --help. 2016-12-22 14:47:11 -08:00
wlan0
75da310757 sanitize names and add more comments, and other essential boilerplate changes 2016-12-22 14:37:15 -08:00
wlan0
1e48fd18cb add cloud-controller-manager as the first step in breaking controller-manager 2016-12-22 14:37:15 -08:00
wlan0
731616e0b2 start breaking up controller manager into two pieces
Addresses: kubernetes/features#88

This commit starts breaking the controller manager into two pieces, namely,

1. cloudprovider dependent piece
2. coudprovider agnostic piece

the controller manager has the following control loops -

   - nodeController
   - volumeController
   - routeController
   - serviceController
   - replicationController
   - endpointController
   - resourcequotacontroller
   - namespacecontroller
   - deploymentController etc..

among the above controller loops,

   - nodeController
   - volumeController
   - routeController
   - serviceController

are cloud provider dependent. As kubernetes has evolved tremendously, it has become difficult
for different cloudproviders (currently 8), to make changes and iterate quickly. Moreover, the
cloudproviders are constrained by the kubernetes build/release lifecycle. This commit is the first
step in moving towards a kubernetes code base where cloud providers specific code will move out of
the core repository, and will be maintained by the cloud providers themselves.

Finally, along with the controller-manager, the kubelet also has cloud-provider specific code, and that will
be addressed in a different commit/issue.
2016-12-22 14:37:14 -08:00
Klaus Ma
b0dfa4ad47 Add event when failed to open local port. 2016-12-23 04:51:12 +08:00
Ritesh H Shukla
35a750ac21 Remove kube-up for vsphere 2016-12-22 20:15:37 +00:00
Eric Paris
9ef610b672 Merge pull request #39165 from deads2k/fed-18-tolerate-missingsar
tolerate missing subjectaccessreview in e2e
2016-12-22 14:53:43 -05:00
Bowei Du
820062897e Remove references to non-client-go API
Replaces references to internal kubernetes API with client-go.
2016-12-22 11:06:23 -08:00
deads2k
2444e0f270 tolerate missing subjectaccessreview in e2e 2016-12-22 14:03:57 -05:00
Wojciech Tyczynski
d31ff83fdc Fix bug of delivering random parts of events 2016-12-22 20:03:38 +01:00
Devan Goodwin
bf69fb1747 kubeadm: Default to using token discovery.
Recent changes to support multiple methods for discovery meant that
"kubeadm init" no longer was sufficient and users would need to add
"--discovery token://" to achieve the same results.

Instead lets assume discovery if the user does not specify anything else
to maintain parity and the brevity of our original instructions.
2016-12-22 12:54:34 -04:00
pospispa
ef43f82de8 Recycle Pod Template Check
The kube-controller-manager has two command line arguments (--pv-recycler-pod-template-filepath-hostpath and --pv-recycler-pod-template-filepath-nfs) that specify a recycle pod template. The recycle pod template may not contain the volume that shall be recycled.

A check is added to make sure that the recycle pod template contains at least a volume.
2016-12-22 17:44:32 +01:00
Eric Paris
89a506a9b5 Merge pull request #39154 from deads2k/rbac-34-add-gke-user
add kubekins as cluster-admin
2016-12-22 11:24:13 -05:00
Fabiano Franz
bdea92bccd In-cluster configs must take flag overrides into account 2016-12-22 14:22:01 -02:00
Kubernetes Submit Queue
fc41bc6ec6 Merge pull request #39091 from deads2k/api-54-move-authn
Automatic merge from submit-queue

remove unneeded authenticator dependencies from genericapiserver

Refactors the authenticator options to remove unneeded dependencies.

@sttts
2016-12-22 06:48:24 -08:00
Jordan Liggitt
0a80b412ef
Fix json tags 2016-12-22 09:32:58 -05:00
Jordan Liggitt
0e028b3964
Add test for json tags in internal/external types 2016-12-22 09:32:57 -05:00
deads2k
7f2d33dfdf add kubekins as cluster-admin 2016-12-22 09:32:00 -05:00
Kubernetes Submit Queue
38882c3727 Merge pull request #37537 from xilabao/extend-err-info-when-authorize-failed
Automatic merge from submit-queue

extend err info when authorize failed

if rolebinding related to a non-existent role,  kubectl get po will return a error.

old result:
```shell
$ kubectl --token=/test get po
Error from server (InternalError): an error on the server ("Internal Server Error: \"/api/v1/namespaces/default/pods\"") has prevented the request from succeeding (get pods)
```
new result (output the reason):
```shell
$ kubectl --token=hi/test get po
Error from server (Forbidden): User "hi" cannot list pods in the namespace "default".: "role.rbac.authorization.k8s.io \"admin-resource-role\" not found" (get pods)
```

test.yaml
```
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
  name:  admin-resource-binding
  namespace: default
subjects:
  - kind: Group
    name: test
roleRef:
  kind: Role
  name: admin-resource-role
```
2016-12-22 06:10:37 -08:00
Kubernetes Submit Queue
8e7154502a Merge pull request #39094 from deads2k/rbac-32-finish-e2es
Automatic merge from submit-queue (batch tested with PRs 39146, 39094)

cleanup last e2e authorization failures

Builds on https://github.com/kubernetes/kubernetes/pull/39080.  This adds rbac role bindings during e2e tests for test that use SA permissions to loopback to the API server.

Assigned to me until its ready.
2016-12-22 05:30:19 -08:00
Michail Kargakis
3ee150fcc0 kubectl: ignore deleted pods in the rolling updater 2016-12-22 14:26:17 +01:00
Kubernetes Submit Queue
0e9cb8f86b Merge pull request #39146 from Crassirostris/make-fluentd-critical
Automatic merge from submit-queue

Make fluentd pods critical

Related to https://github.com/kubernetes/kubernetes/issues/38322

Make fluentd critical so it will be evicted with less probability.

CC @piosz @fgrzadkowski
2016-12-22 05:17:25 -08:00
deads2k
ab1b77673f decouple genericapiserver from non-generic authenticator 2016-12-22 07:48:08 -05:00
deads2k
a3564c0aa8 start kubeapiserver package for sharing between kubeapiserver and federation 2016-12-22 07:43:42 -05:00
Kubernetes Submit Queue
a30b6e2d16 Merge pull request #38622 from Crassirostris/fluentd-liveness-probe
Automatic merge from submit-queue

Add liveness probe for fluentd-gcp

It's known that fluentd can hung up during execution until manual restart.

Liveness probe fixes this problem in the following way: if no buffer chunks were sent or created in the last 5 minutes, fluentd is hanging and should be restarted.

CC @piosz
2016-12-22 02:43:28 -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
9a0a724313 Merge pull request #39067 from xilabao/fix-newconfig-file-in-test-cmd
Automatic merge from submit-queue (batch tested with PRs 39076, 39068, 39067)

fix the newconfig.yaml in test-cmd.sh

fix #39066
2016-12-22 00:54:22 -08:00
Klaus Ma
e901800687 Update NodeRef to v1.ObjectReference. 2016-12-22 16:28:20 +08:00
Kubernetes Submit Queue
ab91500f15 Merge pull request #39068 from NickrenREN/imageManager-start
Automatic merge from submit-queue (batch tested with PRs 39076, 39068)

fix image manager Start() function return
2016-12-22 00:27:30 -08:00
Kubernetes Submit Queue
ec897a16ab Merge pull request #39076 from NickrenREN/kubelet-volume-test
Automatic merge from submit-queue

add unit test for ListVolumesForPod

the result  of function ListVolumesForPod() checking
2016-12-22 00:27:18 -08:00