Commit Graph

42209 Commits

Author SHA1 Message Date
Cole Mickens
8adcf077f3 azure disk: restrict length of name 2017-01-17 09:38:53 -08:00
Kubernetes Submit Queue
685e421b89 Merge pull request #40020 from wojtek-t/really_enable_etcd3
Automatic merge from submit-queue (batch tested with PRs 34763, 38706, 39939, 40020)

Really enable etcd3

Ref #39589

@timothysc @hongchaodeng
2017-01-17 09:14:52 -08:00
Kubernetes Submit Queue
c0a1fa73f5 Merge pull request #39939 from resouer/statefulset
Automatic merge from submit-queue (batch tested with PRs 34763, 38706, 39939, 40020)

Use Statefulset instead in e2e and controller

Quick fix ref: #35534

We should finish the issue to meet v1.6 milestone.
2017-01-17 09:14:51 -08:00
Kubernetes Submit Queue
27d486c663 Merge pull request #38706 from deads2k/auth-12-stomp-anonymous
Automatic merge from submit-queue (batch tested with PRs 34763, 38706, 39939, 40020)

prevent anonymous auth and allow all

https://github.com/kubernetes/kubernetes/pull/38696 for master

@kubernetes/sig-auth 

```release-note
Anonymous authentication is now automatically disabled if the API server is started with the AlwaysAllow authorizer.
```
2017-01-17 09:14:49 -08:00
Kubernetes Submit Queue
65f6875ec4 Merge pull request #34763 from juanvallejo/jvallejo/add-warning-on-export-invalid-output-version
Automatic merge from submit-queue

log info on invalid --output-version

**Release note**:

``` release-note
release-note-none
```

Object versions default to the current version (v1) when a specified
`--output-version` is invalid. This patch logs a warning when this is
the case. Cases affected are all commands with the `--output-version`
option, and anywhere runtime objects are converted to versioned objects.

**Example**

```
$ kubectl get pod <mypod> -o json --output-version=invalid
W1013 17:24:16.810278   26719 result.go:238]  info: the output version
specified (invalid) is invalid, defaulting to v1
{
        "kind": "Pod",
            "apiVersion": "v1",
                "metadata": {
                            "name": "mypod",
                                    "namespace": "test",
...
```
2017-01-17 09:01:31 -08:00
sadlil
e075e2e633 Use kube-dns:1.11.0 2017-01-17 08:37:24 -08:00
deads2k
b2586830c3 add heapster role 2017-01-17 11:27:57 -05:00
deads2k
76af9ded47 disable setgen that no one uses and generates improperly 2017-01-17 11:10:33 -05:00
Kubernetes Submit Queue
f7305e6f43 Merge pull request #39974 from deads2k/api-60-move-patch
Automatic merge from submit-queue

Move PatchType to apimachinery/pkg/types

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

`PatchType` is shared by the client and server, they have to agree, and its critical for our API to function.

@smarterclayton @kubernetes/sig-api-machinery-misc
2017-01-17 07:29:06 -08:00
deads2k
de725e56e2 prevent anonymous auth and allow all 2017-01-17 10:16:33 -05:00
Wojciech Tyczynski
61f2201304 Really enable etcd3 2017-01-17 15:57:43 +01:00
Kubernetes Submit Queue
3aa29bca4f Merge pull request #40009 from kargakis/fix-dryrun-for-rollout
Automatic merge from submit-queue (batch tested with PRs 39911, 40002, 39969, 40012, 40009)

kubectl: fix rollback dryrun when version is not specified

@kubernetes/sig-cli-misc
2017-01-17 06:47:00 -08:00
Kubernetes Submit Queue
936a94f0a8 Merge pull request #40012 from Crassirostris/fluentd-liveness-probe-sync
Automatic merge from submit-queue (batch tested with PRs 39911, 40002, 39969, 40012, 40009)

Sync fluentd daemonset liveness probe with static pod liveness probe

Syncing change from https://github.com/kubernetes/kubernetes/pull/39949

Should also be cherry-picked
2017-01-17 06:46:58 -08:00
Kubernetes Submit Queue
ea1118aab6 Merge pull request #39969 from shyamjvs/proxy-rbac-fix
Automatic merge from submit-queue (batch tested with PRs 39911, 40002, 39969, 40012, 40009)

Fix RBAC role for kube-proxy in Kubemark

Ref #39959 

This should ensure that kube-proxy (in Kubemark) has the required role and RBAC binding.
@deads2k PTAL

cc @kubernetes/sig-scalability-misc @wojtek-t @gmarek
2017-01-17 06:46:57 -08:00
Kubernetes Submit Queue
b79765e38d Merge pull request #40002 from apprenda/kubeadm_dns_1_11_0
Automatic merge from submit-queue (batch tested with PRs 39911, 40002, 39969, 40012, 40009)

kubeadm: upgrade kube-dns to 1.11.0.

**What this PR does / why we need it**: See kubernetes/dns#25

**Which issue this PR fixes**: fixes kubernetes/kubeadm#121

**Special notes for your reviewer**: /cc @luxas
I know this is not the template solution you are looking for but seems to me it's important enough to do this now because of the issues it fixes.
Tested manually and it works.

`NONE`
2017-01-17 06:46:55 -08:00
Kubernetes Submit Queue
6d19340d95 Merge pull request #39911 from bruceauyeung/k8s-branch-check-docker-service-active-when-resetting-cluster
Automatic merge from submit-queue

[kubeadm] resetting cluster should check whether docker service is active

Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>

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

if not, `kubeadm reset` will fail to remove kubernetes-managed containers
2017-01-17 06:41:57 -08:00
juanvallejo
e796ea28b9 don't show deleted pull secrets - kubectl describe
This patch appends "(not found)" to any image pull secrets that are
present in a service account, but no longer present in the namespace.
2017-01-17 09:38:50 -05:00
deads2k
e100e8990b update generation bash to handle vendor dir 2017-01-17 09:06:34 -05:00
Mik Vyatskov
83df5b8495 Remove library copying from fluentd image 2017-01-17 15:00:48 +01:00
Kubernetes Submit Queue
81f9fec45d Merge pull request #39943 from sttts/sttts-cut-off-generic-version
Automatic merge from submit-queue

genericapiserver: cut off kube pkg/version dependency

Move type into k8s.io/apiserver and use fake version for now in genericapiserver tests.
2017-01-17 05:45:15 -08:00
deads2k
f31ecdd0f7 generated changes 2017-01-17 08:32:05 -05:00
deads2k
26c46971f2 move PatchType to apimachinery 2017-01-17 08:32:05 -05: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
deads2k
a6b655fb6a add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
Kubernetes Submit Queue
002cdfa1ae Merge pull request #39861 from Traum-Ferienwohnungen/hostname_as_nodename
Automatic merge from submit-queue

Use $HOSTNAME as node.name by default

**What this PR does / why we need it**:
Allows to identify elasticsearch instances more easily.
As $HOSTNAME of a pod is unique, this should be no problem.
2017-01-17 04:57:09 -08:00
deads2k
67fac70ea3 remove files moved to apimachinery 2017-01-17 07:46:34 -05:00
Paulo Pires
6b5d803e8a
kubeadm: improve init token logging. 2017-01-17 12:42:06 +00:00
Mik Vyatskov
5b96233423 Sync fluentd daemonset liveness probe with static pod liveness probe 2017-01-17 13:29:54 +01:00
Dr. Stefan Schimanski
7271921405 Fix wrong rename pkg/storage.Is{TestFail -> Conflict} 2017-01-17 13:18:11 +01:00
Kubernetes Submit Queue
0bd13332e9 Merge pull request #39447 from gyliu513/patch1
Automatic merge from submit-queue

Corrected a typo in scheduler factory.go.

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

**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-17 04:12:44 -08:00
Kubernetes Submit Queue
b1506004cc Merge pull request #39601 from mqliang/upstream-tolerates-taints-bugfix
Automatic merge from submit-queue (batch tested with PRs 39945, 39601)

bugfix for PodToleratesNodeTaints

`PodToleratesNodeTaints`predicate func should return true if pod has no toleration annotations and node's taint effect is `PreferNoSchedule`
2017-01-17 04:08:47 -08:00
Dr. Stefan Schimanski
52f6831576 genericapiserver: cut off kube pkg/version dependency 2017-01-17 12:34:05 +01:00
Kubernetes Submit Queue
f0b0cd0399 Merge pull request #39945 from sttts/sttts-cutoff-pkg-serviceaccount-dep
Automatic merge from submit-queue

genericapiserver: cut off pkg/serviceaccount dependency

**Blocked** by pkg/api/validation/genericvalidation to be split up and moved into apimachinery.
2017-01-17 03:09:21 -08:00
Michail Kargakis
9c820a5793 kubectl: fix rollback dryrun when version is not specified 2017-01-17 12:01:09 +01:00
Shyam Jeedigunta
491c26feca Fix RBAC role for kube-proxy in Kubemark 2017-01-17 11:39:00 +01:00
Paulo Pires
2e8df3b569
kubeadm: init must validate or generate token before anything else.
Fixes kubernetes/kubeadm#112
2017-01-17 10:29:15 +00:00
Kubernetes Submit Queue
550f8be73a Merge pull request #39997 from soltysh/cronjob_leftovers
Automatic merge from submit-queue (batch tested with PRs 39948, 39997)

Fix ScheduledJob -> CronJob rename leftovers

I found a few leftovers from the rename I did some time ago.

@kubernetes/sig-apps-misc ptal
2017-01-17 02:09:34 -08:00
Kubernetes Submit Queue
3b4e222184 Merge pull request #39948 from sttts/sttts-move-pkg-api-rest-into-genericapiserver
Automatic merge from submit-queue

Move pkg/api/rest into genericapiserver

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

**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-17 02:08:10 -08:00
Dr. Stefan Schimanski
3a17d433aa Move first pkg/api/validation's into apimachinery 2017-01-17 10:30:35 +01:00
Paulo Pires
262eeea0d3
kubeadm: upgrade kube-dns to 1.11.0.
Fixes kubernetes/kubeadm#121
2017-01-17 09:13:04 +00:00
Harry Zhang
a88cbdc52d Update bazel 2017-01-17 16:55:06 +08:00
Kubernetes Submit Queue
9d2fce7c22 Merge pull request #39608 from peay/cronjob-too-many-times-to-list
Automatic merge from submit-queue

Do not list CronJob unmet starting times beyond deadline

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

See #36311. `getRecentUnmetScheduleTimes` gives up after 100 unmet times to avoid wasting too much CPU or memory generating all the times, as it generates them sequentially.

When concurrency is forbidden, this is conceptually un-necessary: we only need the last unmet start time. This suggests that when concurrency is forbidden, we could generate times by going backward in time from now. This is not very practical as CronJob currently relies on a package that only provides `Next` and no `Prev`. Hand-cooking a `Prev` does not seem like a good idea. I could submit a PR to the cron library to add a `Prev` method, and use that when concurrency is forbidden through something like `getLastUnmetScheduleTime`. This would be `O(1)` and there would be no limit involved.

(edit: actually, even for the other concurrency settings, we only start the last unmet start times -- there is a `TODO` in the controller to actually start all of them, but that is not implemented at the moment. This means the solution would apply, at least temporarily, to all concurrency settings).

cc @soltysh what do you think?

In the meantime, I would suggest to do something simple. Currently, the user has no way to configure anything to ensure that his CronJob will not get stuck if one job takes more that 100 unmet times.

 `getRecentUnmetScheduleTimes` starts with an initial time corresponding to the last start (or to the creation of the CronJob, if nothing has started yet). However, when `StartingDeadlineSeconds` is set, the controller will not start anything that is older than the deadline, so if the last start is way beyond the deadline, we are generating potentially lots of unmet start times that will not be considered by the scheduler for scheduling anyway.

Consider a job running every minute, where the last instance has taken 120 minutes. This means there are more than 100 unmet times when we start counting from the last start time.

**The PR makes `getRecentUnmetScheduleTimes` only consider times that do not fall beyond the deadline.** Here, the CronJob can be configured with a `StartingDeadlineSeconds` of, say, 10 minutes. After the 120min job has run, `getRecentUnmetScheduleTimes` will only consider the times in the last 10 minutes from now, and will not get stuck.

As a side note on the max. number of unmet times to use as limits in terms of CPU used by the controller: I have run a quick benchmark on my i7 mac. Schedules corresponding to "once a week" tend to be more expensive to generate unmet times for. Just FYI.

```
+--------------+---------------+--------------+
|   SCHEDULE   | MISSED STARTS |    TIMING    |
+--------------+---------------+--------------+
| */1 * * * ?  |           100 | 383.645µs    |
| */30 * * * ? |           100 | 354.765µs    |
| 30 1 * * ?   |           100 | 1.065124ms   |
| 30 1 * * 0   |           100 | 1.80034ms    |
| */1 * * * ?  |           500 | 1.341365ms   |
| */30 * * * ? |           500 | 1.814441ms   |
| 30 1 * * ?   |           500 | 8.475012ms   |
| 30 1 * * 0   |           500 | 10.020613ms  |
| */1 * * * ?  |          1000 | 2.551697ms   |
| */30 * * * ? |          1000 | 4.075813ms   |
| 30 1 * * ?   |          1000 | 17.674945ms  |
| 30 1 * * 0   |          1000 | 19.149324ms  |
| */1 * * * ?  |         10000 | 25.725531ms  |
| */30 * * * ? |         10000 | 87.520022ms  |
| 30 1 * * ?   |         10000 | 174.29216ms  |
| 30 1 * * 0   |         10000 | 196.565748ms |
+--------------+---------------+--------------+
```

using

```.go
package main

import (
    "fmt"
    "time"
    "os"
    "strconv"

    "github.com/robfig/cron"
    "github.com/olekukonko/tablewriter"
)

func timeSchedule(schedule string, iterations int) (time.Duration) {
    sched, err := cron.ParseStandard(schedule)

    if err != nil {
        panic(fmt.Sprintf("Unparseable schedule: %s", err))
    }

    start := time.Now()
    t := time.Now()

    for i := 1; i <= iterations; i++ {
        t = sched.Next(t)
    }

    return time.Since(start)
}

func main() {
    table := tablewriter.NewWriter(os.Stdout)
    table.SetHeader([]string{"Schedule", "Missed starts", "Timing"})

    schedules := []string{"*/1 * * * ?", "*/30 * * * ?", "30 1 * * ?", "30 1 * * 0"}
    iteration_nums := []int{100, 500, 1000, 10000}

    for _, iterations := range iteration_nums {
        for _, schedule := range schedules {
            table.Append([]string{schedule,
                                  strconv.Itoa(iterations),
                                  timeSchedule(schedule, iterations).String()})
        }
    }
    table.Render()
}
```

**Which issue this PR fixes**: fixes #36311

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-01-17 00:41:45 -08:00
Dr. Stefan Schimanski
bf307d9948 genericapiserver: cut off pkg/serviceaccount dependency 2017-01-17 09:36:10 +01:00
Dr. Stefan Schimanski
1c4849c403 Fix hack/verify-staging-imports.sh on Mac 2017-01-17 09:36:10 +01:00
Dr. Stefan Schimanski
8fe0958ba0 Update bazel 2017-01-17 09:30:48 +01:00
Dr. Stefan Schimanski
5c88b7d05a Fix imports 2017-01-17 09:30:30 +01:00
Dr. Stefan Schimanski
e561d5c1c9 Move pkg/api/rest into pkg/genericapiserver/api/rest 2017-01-17 09:29:13 +01:00
Maciej Szulik
4a0c9fa536 Fix ScheduledJob -> CronJob rename leftovers 2017-01-17 09:24:07 +01:00
Kubernetes Submit Queue
7b471136ba Merge pull request #39968 from timothysc/sched_owners
Automatic merge from submit-queue (batch tested with PRs 37680, 39968)

Update Owners for Scheduler

Update Owners file for scheduler component to spread the reviews around. 

/cc @davidopp  per previous sig-mtg.
2017-01-17 00:04:34 -08: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