Commit Graph

43633 Commits

Author SHA1 Message Date
Kubernetes Submit Queue
416c1a498e Merge pull request #41367 from apprenda/kubeadm_validation_pkg_tests
Automatic merge from submit-queue (batch tested with PRs 41342, 41257, 41295, 41367, 41230)

kubeadm: unit tests for apis/kubeadm/validation

**What this PR does / why we need it**: added tests to apis/kubeadm/validation pkg and raised coverage from ~21% to 100%.  

Adding unit tests is a WIP from #34136

**Special notes for your reviewer**: /cc @luxas @pires 

**Release note**:
```release-note
NONE
```
2017-02-13 23:48:07 -08:00
Kubernetes Submit Queue
3ada0514b0 Merge pull request #41295 from andrewrynhard/sa_key
Automatic merge from submit-queue (batch tested with PRs 41342, 41257, 41295, 41367, 41230)

Use a dedicated key for service account token signing

**What this PR does / why we need it**:
See https://github.com/kubernetes/kubeadm/issues/146

**Special notes for your reviewer**:
`pki_helpers.go` had to be refactored a bit to allow one-off cert/key generation.

```
bash-4.2# cat /etc/kubernetes/manifests/kube-apiserver.yaml | grep service-account
    - --service-account-key-file=/etc/kubernetes/pki/sa.key
bash-4.2# cat /etc/kubernetes/manifests/kube-controller-manager.yaml | grep service-account
    - --service-account-private-key-file=/etc/kubernetes/pki/sa.key
bash-4.2# ls /etc/kubernetes/pki/
apiserver.crt  apiserver-kubelet-client.crt  ca.crt  sa.key
apiserver.key  apiserver-kubelet-client.key  ca.key  tokens.csv
bash-4.2# kubectl get pods -n kube-system
NAME                                 READY     STATUS    RESTARTS   AGE
dummy-2165365107-nt0xm               1/1       Running   0          11m
kube-apiserver-k8s-master            1/1       Running   0          11m
kube-controller-manager-k8s-master   1/1       Running   0          11m
kube-discovery-2187510969-gp26r      1/1       Running   0          11m
kube-dns-421332118-58tl8             3/3       Running   0          11m
kube-flannel-ds-03cvf                2/2       Running   0          7m
kube-flannel-ds-llxw5                2/2       Running   0          7m
kube-proxy-j8jhz                     1/1       Running   0          11m
kube-proxy-z761d                     1/1       Running   0          8m
kube-scheduler-k8s-master            1/1       Running   0          11m
```

@luxas @liggitt @pires
2017-02-13 23:48:05 -08:00
Kubernetes Submit Queue
c13eb9b259 Merge pull request #41257 from spxtr/flaky
Automatic merge from submit-queue (batch tested with PRs 41342, 41257)

Move two flaky e2e tests to the flaky suite.

cc @kargakis @davidopp 

We should have moved these a long time ago.
**Release note**:
```release-note
NONE
```
2017-02-13 23:07:07 -08:00
Kubernetes Submit Queue
d4e2699a48 Merge pull request #41342 from apprenda/kubeadm_token_panic_fix
Automatic merge from submit-queue (batch tested with PRs 41342, 41257)

kubeadm: fix to avoid panic if token not provided

**What this PR does / why we need it**: Prior to this, kubeadm would panic if no token was provided running `kubeadm ex token delete`. This does a check to verify an arg has been passed and prints out a more reasonable message if it is not provided. 


**Special notes for your reviewer**: /cc @luxas @pires 

**Release note**:
```release-note
NONE
```
2017-02-13 23:07:06 -08:00
Kubernetes Submit Queue
8db5ca1fbb Merge pull request #41278 from perotinus/nsdeletion-e2etest
Automatic merge from submit-queue (batch tested with PRs 41357, 41178, 41280, 41184, 41278)

[Federation] Add an end-to-end test verifying that deleting a federated namespace deletes child replicasets.

Verifies #38225.

Also, remove a few custom package aliases.
2017-02-13 21:07:12 -08:00
Kubernetes Submit Queue
1f4e2efc5b Merge pull request #41184 from liggitt/subject-apigroup
Automatic merge from submit-queue (batch tested with PRs 41357, 41178, 41280, 41184, 41278)

Switch RBAC subject apiVersion to apiGroup in v1beta1

Referencing a subject from an RBAC role binding, the API group and kind of the subject is needed to fully-qualify the reference.

The version is not, and adds complexity around re-writing the reference when returning the binding from different versions of the API, and when reconciling subjects.

This PR:
* v1beta1: change the subject `apiVersion` field to `apiGroup` (to match roleRef)
* v1alpha1: convert apiVersion to apiGroup for backwards compatibility
* all versions: add defaulting for the three allowed subject kinds
* all versions: add validation to the field so we can count on the data in etcd being good until we decide to relax the apiGroup restriction

```release-note
RBAC `v1beta1` RoleBinding/ClusterRoleBinding subjects changed `apiVersion` to `apiGroup` to fully-qualify a subject. ServiceAccount subjects default to an apiGroup of `""`, User and Group subjects default to an apiGroup of `"rbac.authorization.k8s.io"`.
```

@deads2k @kubernetes/sig-auth-api-reviews @kubernetes/sig-auth-pr-reviews
2017-02-13 21:07:10 -08:00
Kubernetes Submit Queue
1dcb1a237b Merge pull request #41280 from spxtr/gofmt
Automatic merge from submit-queue (batch tested with PRs 41357, 41178, 41280, 41184, 41278)

Add verify-gofmt as a Bazel test.

Also, moved `--flaky_test_attempts=3` out of `.bazelrc` since it was annoying. I think this verify-all pattern is working well in test-infra, we should try and make it happen here.

**Release note**:
```release-note
NONE
```
2017-02-13 21:07:09 -08:00
Kubernetes Submit Queue
bfca2d4d44 Merge pull request #41178 from jeffvance/kubelet-wedge2
Automatic merge from submit-queue (batch tested with PRs 41357, 41178, 41280, 41184, 41278)

fix flaky host cleanup test

**What this PR does / why we need it**:
Fixes 2 flakes in the "HostCleanup tests in e2e/_kubelet.go_
Also does some very minor refactoring.

**Which issue this PR fixes**
This is an improved fix for issue [31272](https://github.com/kubernetes/kubernetes/issues/31272)

**Special notes for your reviewer**:
```release-note
NONE
```
2017-02-13 21:07:07 -08:00
Kubernetes Submit Queue
b1e0d0ee5e Merge pull request #41357 from freehan/kube-proxy-skip
Automatic merge from submit-queue

fix healthcheck update problem introduced by #41223

ref: https://github.com/kubernetes/kubernetes/pull/41223

surgical fix for https://github.com/kubernetes/kubernetes/pull/41223#issuecomment-279120970
2017-02-13 20:24:56 -08:00
Derek McQuay
c8b830a848
kubeadm: unit tests for apis/kubeadm/validation
code coverage from ~21% to 100%
2017-02-13 19:54:23 -08:00
Kubernetes Submit Queue
dc1302c5ef Merge pull request #40464 from csbell/testing0
Automatic merge from submit-queue

Add finalizers to federated configmaps

Initial commit for finalizers in configmap.
```release-note
Add support for finalizers in federated configmaps (deletes configmaps from underlying clusters).
```
2017-02-13 18:43:32 -08:00
Kubernetes Submit Queue
68814c0203 Merge pull request #41172 from janetkuo/node-taint-scheduler
Automatic merge from submit-queue (batch tested with PRs 41115, 41212, 41346, 41340, 41172)

Enable PodTolerateNodeTaints predicate in DaemonSet controller

Ref #28687, this enables the PodTolerateNodeTaints predicate to the daemonset controller

cc @Random-Liu @dchen1107 @davidopp @mikedanese @kubernetes/sig-apps-pr-reviews @kubernetes/sig-node-pr-reviews @kargakis @lukaszo 

```release-note
Make DaemonSet controller respect node taints and pod tolerations. 
```
2017-02-13 17:03:53 -08:00
Kubernetes Submit Queue
fa5a2fe269 Merge pull request #41340 from deads2k/client-02-add-informers
Automatic merge from submit-queue (batch tested with PRs 41115, 41212, 41346, 41340, 41172)

Add informers to client-go

Adds informers and listers to client-go so that you can build a controller on it. 

@sttts @caesarxuchao @kubernetes/sig-api-machinery-misc
2017-02-13 17:03:51 -08:00
Kubernetes Submit Queue
456b9dc5cc Merge pull request #41346 from ncdc/shared-informers-08-route
Automatic merge from submit-queue (batch tested with PRs 41115, 41212, 41346, 41340, 41172)

Switch route controller to shared informers

Initially part of #40097 

@smarterclayton @gmarek @wojtek-t @timothysc @kubernetes/sig-scalability-pr-reviews @sttts @deads2k @liggitt
2017-02-13 17:03:49 -08:00
Kubernetes Submit Queue
f693e1e598 Merge pull request #41212 from bowei/limit-dnsmasq
Automatic merge from submit-queue (batch tested with PRs 41115, 41212, 41346, 41340, 41172)

Send only cluster domain queries to kube-dns

Queries not involving the cluster domain should be forwarded out (not to kube-dns)

```release-note
none
```
2017-02-13 17:03:48 -08:00
Kubernetes Submit Queue
cfb08cd9a0 Merge pull request #41115 from rajatchopra/kube_service_fix
Automatic merge from submit-queue

fix service spec for kube api server

For the auto generated kube api-server service, the service spec re-uses the service port itself. The endpoint is created correctly using public port. Fix the service also because there are some plugin controllers that react to service spec itself.

Before fix:
```
sh-4.2# kubectl get endpoints
NAME         ENDPOINTS                                         AGE
kubernetes   172.17.0.2:8443,172.17.0.2:8053,172.17.0.2:8053   20h

sh-4.2# kubectl get services kubernetes -o json
...
...
        "spec": {
                "clusterIP": "172.30.0.1",
                "ports": [
                    {
                        "name": "https",
                        "port": 443,
                        "protocol": "TCP",
                        "targetPort": 443     ## <--- same as port, even if the endpoint really means 8443
                    },
                    {
                        "name": "dns",
                        "port": 53,
                        "protocol": "UDP",
                        "targetPort": 8053
                    },
                    {
                        "name": "dns-tcp",
                         ...
```

After fix:
```
"spec": {
                "clusterIP": "172.30.0.1",
                "ports": [
                    {
                        "name": "https",
                        "port": 443,
                        "protocol": "TCP",
                        "targetPort": 8443     # <-- fixed, now matches the endpoint object
                    },
                    {
                        "name": "dns",
                        "port": 53,
                        "protocol": "UDP",
                        "targetPort": 8053
                    },
                    {
                        "name": "dns-tcp",

``
2017-02-13 17:03:22 -08:00
Kubernetes Submit Queue
7cb30052d3 Merge pull request #41310 from oscerd/hazelcast-example-test-e2e
Automatic merge from submit-queue

Fixes Hazelcast example e2e test

**What this PR does / why we need it**:
This PR fixes the Hazelcast example e2e test

**Special notes for your reviewer**:
It is related to this PR https://github.com/kubernetes/kubernetes/pull/39580
2017-02-13 15:31:17 -08:00
Jonathan MacMillan
2e7683d3a9 [Federation] Add an end-to-end test verifying that deleting a federated namespace deletes child replicasets.
Verifies #38225.

Also, remove a few custom package aliases.
2017-02-13 14:46:10 -08:00
Christian Bell
eceba860d4 Add finalizers to federated configmaps 2017-02-13 14:36:17 -08:00
Kubernetes Submit Queue
4e01d1d141 Merge pull request #41345 from liggitt/node-update-delete
Automatic merge from submit-queue

give nodes update/delete permissions

delete permission is logically paired with create permission (and is used during self-registration scenarios when a node has been restarted and an existing node object has a mismatched externalID)

we already need to scope update nodes/status permission to only let a node update itself, and we would scope these at the same time.

fixes https://github.com/kubernetes/kubernetes/issues/41224
2017-02-13 13:36:27 -08:00
Bowei Du
da291a7beb Send only cluster domain queries to kube-dns
Note: all PTR request must still traverse kube-dns. We can restrict
this to just the clusterCIDR in the future to reduce the amount of
PTR traffic.
2017-02-13 13:27:09 -08:00
Derek McQuay
ff5801ad0c
kubeadm: fix to avoid panic if token not provided
Prior to this, kubeadm would panic if no token was provided. This does a
check and prints out a more reasonable message.
2017-02-13 13:06:18 -08:00
Janet Kuo
b593427105 Enable PodTolerateNodeTaints predicate in DaemonSet controller 2017-02-13 12:52:02 -08:00
deads2k
f2b27c4074 depend on client-go listwatcher 2017-02-13 15:36:18 -05:00
deads2k
5ae5829a1d sync client-go with listers and informers 2017-02-13 15:35:58 -05:00
deads2k
8312bc8334 add informers to client-go 2017-02-13 15:35:58 -05:00
Jordan Liggitt
09d51e3ee8
generated files 2017-02-13 15:33:10 -05:00
Jordan Liggitt
2a76fa1c8f
Switch RBAC subject apiVersion to apiGroup in v1beta1 2017-02-13 15:33:09 -05:00
Andy Goldstein
effde6b8dd Switch route controller to shared informers 2017-02-13 15:21:33 -05:00
Kubernetes Submit Queue
8621bd3e50 Merge pull request #41334 from deads2k/agg-07-snip-cli
Automatic merge from submit-queue

copy pkg/util/logs to apiserver

This is a copy, not a move.  API servers need to be able to init the logs, but so do clients.  It would be weird to have the client-side commands depending on the server side logs utilities.

I updated all the server side references, but left the client-side ones.

@sttts @kubernetes/sig-api-machinery-pr-reviews acceptable?
2017-02-13 12:19:03 -08:00
Kubernetes Submit Queue
a75b61d7a3 Merge pull request #39928 from humblec/iscsi-multipath-backuptp
Automatic merge from submit-queue

Add mulitpath support to iscsi plugin

#issue https://github.com/kubernetes/kubernetes/issues/39345
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-13 12:18:55 -08:00
Minhan Xia
572e3bebcc fix healthcheck update problem introduced by #41223 2017-02-13 12:18:42 -08:00
Kubernetes Submit Queue
dcbcee8365 Merge pull request #41338 from ncdc/kcm-csr-policy
Automatic merge from submit-queue

Allow controller manager to list/watch CSRs

Accidentally left out of #41084 

cc @mikedanese @deads2k
2017-02-13 10:54:53 -08:00
Kubernetes Submit Queue
1e0e961bcd Merge pull request #41079 from deads2k/apiserver-06-auto-loopback
Automatic merge from submit-queue

auto-create the loopback token

Users of the apiserver library have no need to specify particular loopback tokens, we can autogenerate and provision them.

@kubernetes/sig-api-machinery-misc @sttts
2017-02-13 10:54:46 -08:00
Jordan Liggitt
967d4fb5f7
give nodes update/delete permissions 2017-02-13 13:14:47 -05:00
Kubernetes Submit Queue
95badd95ce Merge pull request #41190 from php-coder/minor_capabilities_comment_fixes
Automatic merge from submit-queue

Minor comments improvements

Fix typo and wrong comment.
2017-02-13 09:57:13 -08:00
deads2k
78d8a8efa8 copy pkg/util/logs to apiserver 2017-02-13 12:07:15 -05:00
Andy Goldstein
9947216abd Allow controller manager to list/watch CSRs 2017-02-13 12:02:34 -05:00
Kubernetes Submit Queue
beaf5ffacc Merge pull request #39852 from xingzhou/kube-39596
Automatic merge from submit-queue

Added kubectl create role command

Added `kubectl create role` command.

Fixed part of #39596 

**Release note**:
```
   Added one new command `kubectl create role` to help user create a single role from command line.
```
2017-02-13 08:40:50 -08:00
Andrew Rynhard
3ea7b29e8e Use a dedicated key for service account token signing 2017-02-13 08:39:46 -08:00
deads2k
2b6b02c6ba auto-create the loopback token 2017-02-13 11:18:34 -05:00
Kubernetes Submit Queue
7585c46bc1 Merge pull request #41192 from deads2k/agg-06-informer
Automatic merge from submit-queue (batch tested with PRs 41319, 41192)

Split informers by internal and external to allow inclusion in client-go

client-go doesn't have any internal clients, so informers which require internal clients can never be included in it.  This splits the informer generation into internal and external so we can safely include them.

@kubernetes/sig-api-machinery-misc @ncdc
2017-02-13 08:01:41 -08:00
Kubernetes Submit Queue
7bac525001 Merge pull request #41319 from deads2k/client-01-sync
Automatic merge from submit-queue (batch tested with PRs 41319, 41192)

sync client-go

Straight mechanical sync of client-go after updating apimachinery.

@caesarxuchao @sttts @pwittrock

I tagged it since its straight mechanical.
2017-02-13 08:01:39 -08:00
deads2k
fd34b11e13 react to informer updates 2017-02-13 09:18:32 -05:00
deads2k
ddd3efb075 sync client-go 2017-02-13 08:45:11 -05:00
Dr. Stefan Schimanski
f25ef92cd0 client-go: make examples and OWNERS authorative 2017-02-13 08:40:58 -05:00
Kubernetes Submit Queue
e80afed777 Merge pull request #41035 from vishh/fluentd-critical
Automatic merge from submit-queue

Make fluentd a critical pod

For #40573
Based on https://github.com/kubernetes/kubernetes/pull/40655#issuecomment-277790544

```release-note
If `experimentalCriticalPodAnnotation` feature gate is set to true, fluentd pods will not be evicted by the kubelet.
```
2017-02-13 05:10:19 -08:00
deads2k
a86fabb9d2 regenerate informers 2017-02-13 07:59:34 -05:00
deads2k
c5359fd059 split generated informers by internal and external 2017-02-13 07:55:15 -05:00
Kubernetes Submit Queue
06e2a0820e Merge pull request #41289 from ferdinandhuebner/fix-cinder-udevadm-exec
Automatic merge from submit-queue (batch tested with PRs 41312, 41289)

resolve udevadm from PATH in cinder_util.go

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

When a cinder volume gets attached to a node, the cinder volume plugin calls `udevadm` with an absolute path `/usr/bin/udevadm`. This path is incorrect for recent versions of debian, ubuntu or the hyperkube image on gcr.io where `udevadm` is located at `/bin/udevadm` or `/sbin/udevadm`. A variant of the hyperkube image is used on CoreOS to run kubelet with rkt fly stage 1.
As a result of the failed `udevadm` exec, the `AttachDisk` function in `cinder_util.go` returns an error.

This PR removes the absolute path from the `udevadm` exec. As a result, `udevadm` is resolved by looking it up in `PATH`. 
This is consistent with the gce volume plugin, which executes `udevadm` the same way.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-02-13 04:28:34 -08:00