Commit Graph

41390 Commits

Author SHA1 Message Date
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
xilabao
2a77353164 extend err info when authorize failed 2016-12-22 14:47:56 +08:00
Kubernetes Submit Queue
4ee51fcc2d Merge pull request #39107 from spxtr/fix-kubeadmtest
Automatic merge from submit-queue

Fix kubeadm test in bazel.
2016-12-21 21:53:32 -08:00
Brian Grant
41e6357a07 Merge pull request #39123 from michelleN/docs-proposals-stubs
replace contents of docs/proposals with stubs
2016-12-21 21:31:55 -08:00
Brian Grant
f0125ef1b1 Merge pull request #39120 from michelleN/docs-devel-stubs
replace contents of docs/devel with stubs
2016-12-21 21:24:40 -08:00
xilabao
528a8d7d52 update prompt in create rolebinding/clusterrolebinding 2016-12-22 11:33:49 +08:00
Kubernetes Submit Queue
cba9c7d0ae Merge pull request #36004 from caesarxuchao/revert-hide-new-versions
Automatic merge from submit-queue (batch tested with PRs 39114, 36004)

Revert #32751 and #35840 in 1.6

Revert backward compatibility hacks (#36004, #32751) that are no-longer needed in release 1.6

@kubernetes/sig-api-machinery @liggitt
2016-12-21 18:51:31 -08:00
Kubernetes Submit Queue
66152b9066 Merge pull request #39114 from dchen1107/kube-proxy
Automatic merge from submit-queue (batch tested with PRs 39114, 36004)

assign -998 as the oom_score_adj for critical pods (e.g. kube-proxy)

I also validated this with a testing cluster: Fresh built cluster, and kill kube-proxy pod, etc. 

```
root      2660  2643  0 Dec21 ?        00:00:00 /bin/sh -c kube-proxy --master=https://104.198.79.64 --kubeconfig=/var/lib/kube-proxy/kubeconfig  --cluster-cidr=10.180.0.0/14 --resource-container="" --v=4   1>>/var/log/kube-proxy.log 2>&1
root      2667  2660  0 Dec21 ?        00:03:14 kube-proxy --master=https://104.198.79.64 --kubeconfig=/var/lib/kube-proxy/kubeconfig --cluster-cidr=10.180.0.0/14 --resource-container= --v=4
# cat /proc/2660/oom_score_adj 
-998
# cat /proc/2667/oom_score_adj 
-998
```

In this pr, I also include a small fix for import cycle issue. The right fix should remove the dependency on qos package from pkg/apis/componentconfig/v1alpha1. But since we plan to cherrypick this pr to both 1.5 and 1.4 (possible), I want touch the source as little as possible. 

Partial fix: #38322
2016-12-21 18:51:28 -08:00
Michelle Noorali
ed10c2332f replace contents of docs/proposals with stubs 2016-12-21 21:15:09 -05:00
xilabao
6b19a711ec fix group in create clusterrolebinding 2016-12-22 10:14:11 +08:00
Kubernetes Submit Queue
f87edaacac Merge pull request #39111 from spxtr/makeitwork
Automatic merge from submit-queue (batch tested with PRs 39115, 39111)

Make one of the go2idl unit tests pass in a sandbox.

Not sure how important this is.
2016-12-21 17:55:28 -08:00
Kubernetes Submit Queue
ee8c14ae6b Merge pull request #39115 from Random-Liu/no-sudo-when-untar
Automatic merge from submit-queue (batch tested with PRs 39115, 39111)

Node E2E: Do not use sudo when untar node e2e tar ball.

`sudo tar -x` will [extract files with original file ownership](http://unix.stackexchange.com/questions/264464/sudo-tar-changes-extracted-files-ownership-to-unknown-user), which is not what we want.
This also causes problem to https://github.com/kubernetes/test-infra/issues/1348.

Because in https://github.com/kubernetes/test-infra/issues/1348 we move node e2e runner into a docker container. Inside the container, the user is `root` by default, so the tar ball has `root` ownership.

If we untar the tar ball with `sudo`, it will recover the `root` ownership and the following operation may not have enough permission.

No matter what, we should not recover the file ownership inside the tar ball because:
* We don't care it.
* It may even not exist on the host.

@krzyzacy
2016-12-21 17:55:26 -08:00
tanshanshan
565a53871d fix help 2016-12-22 09:48:24 +08:00
Klaus Ma
cd6792ae08 Add default imagePullPolicy for initContainers. 2016-12-22 09:29:43 +08:00
Michelle Noorali
bc8f7e2c59 replace contents of docs/devel with stubs 2016-12-21 20:26:48 -05:00
NickrenREN
00123c343b add test functions in context_test.go
add test functions in context_test.go( pkg/api/context_test.go)
2016-12-22 09:25:40 +08:00
Bowei Du
994250f9ac Remove hostname endpoints annotation (was beta feature) 2016-12-21 17:21:57 -08:00
Dawn Chen
b03fca9783 Fixed an import cycle issue:
import cycle not allowed in test
package k8s.io/kubernetes/pkg/client/restclient (test)
	imports k8s.io/kubernetes/pkg/api/testapi
	imports k8s.io/kubernetes/pkg/apis/componentconfig/install
	imports k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1
	imports k8s.io/kubernetes/pkg/kubelet/qos
	imports k8s.io/kubernetes/pkg/kubelet/pod
	imports k8s.io/kubernetes/pkg/client/clientset_generated/clientset
	imports k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1
	imports k8s.io/kubernetes/pkg/client/restclient
2016-12-21 16:34:24 -08:00
Random-Liu
a719a7d7e7 Do not use sudo when untar node e2e tar ball. 2016-12-21 16:28:33 -08:00
Dawn Chen
53931fbce4 assign -998 as the oom_score_adj for critical pods. 2016-12-21 16:07:49 -08:00
Joe Finney
8ce98ba3d4 Make one of the go2idl unit tests pass in a sandbox. 2016-12-21 16:01:11 -08:00
Kubernetes Submit Queue
4495af3822 Merge pull request #39098 from ixdy/verify
Automatic merge from submit-queue

Disable verify-test-owners.sh and make `go vet` more obvious

**What this PR does / why we need it**: I and others keep seeing the verify-test-owners.sh failure and think that's why the PR failed checks. Rather than making verify-test-owners.sh pass with errors, just skip it entirely.

Also print out the `go vet` command we're running, to make that failure more obvious.

cc @k82cn @saad-ali 

**Release note**:

```release-note
NONE
```
2016-12-21 15:43:58 -08:00