Commit Graph

4395 Commits (2e671715e0c9a6ccb3238193e27cb8b040681ee7)

Author SHA1 Message Date
Kubernetes Submit Queue 83c5a1c895 Merge pull request #36343 from wojtek-t/bump_to_3_0_14
Automatic merge from submit-queue

Bump etcd to 3.0.14 in tests

Ref #20504
2016-11-07 03:11:17 -08:00
mbohlool f8863791f7 Add verify script federation OpenAPI spec generation 2016-11-07 02:41:50 -08:00
Jitendra Bhurat 4cf9b3c362
Added netsh util package. 2016-11-07 09:11:34 +00:00
Kubernetes Submit Queue cc7070d5d8 Merge pull request #35583 from justinsb/replace_ratelimit
Automatic merge from submit-queue

Create simple version of ratelimit package

Allows for better testing.
2016-11-07 00:01:18 -08:00
Wojciech Tyczynski b34ac6baef Bump etcd to 3.0.14 in tests 2016-11-07 08:41:17 +01:00
Kubernetes Submit Queue 9534c4f563 Merge pull request #32427 from Random-Liu/system-verification
Automatic merge from submit-queue

Node Conformance Test: Add system verification

For #30122 and #29081.

This PR introduces system verification test in node e2e and conformance test. It will run before the real test. Once the system verification fails, the test will just fail. The output of the system verification is like this:

```
I0909 23:33:20.622122    2717 validators.go:45] Validating os...
OS: Linux
I0909 23:33:20.623274    2717 validators.go:45] Validating kernel...
I0909 23:33:20.624037    2717 kernel_validator.go:79] Validating kernel version
KERNEL_VERSION: 3.16.0-4-amd64
I0909 23:33:20.624146    2717 kernel_validator.go:93] Validating kernel config
CONFIG_NAMESPACES: enabled
CONFIG_NET_NS: enabled
CONFIG_PID_NS: enabled
CONFIG_IPC_NS: enabled
CONFIG_UTS_NS: enabled
CONFIG_CGROUPS: enabled
CONFIG_CGROUP_CPUACCT: enabled
CONFIG_CGROUP_DEVICE: enabled
CONFIG_CGROUP_FREEZER: enabled
CONFIG_CGROUP_SCHED: enabled
CONFIG_CPUSETS: enabled
CONFIG_MEMCG: enabled
I0909 23:33:20.679328    2717 validators.go:45] Validating cgroups...
CGROUPS_CPU: enabled
CGROUPS_CPUACCT: enabled
CGROUPS_CPUSET: enabled
CGROUPS_DEVICES: enabled
CGROUPS_FREEZER: enabled
CGROUPS_MEMORY: enabled
I0909 23:33:20.679454    2717 validators.go:45] Validating docker...
DOCKER_GRAPH_DRIVER: aufs
```

It verifies the system following a predefined `SysSpec`:

``` go
// DefaultSysSpec is the default SysSpec.
 var DefaultSysSpec = SysSpec{
    OS:            "Linux",
    KernelVersion: []string{`3\.[1-9][0-9].*`, `4\..*`}, // Requires 3.10+ or 4+
    // TODO(random-liu): Add more config
    KernelConfig: KernelConfig{
        Required: []string{
            "NAMESPACES", "NET_NS", "PID_NS", "IPC_NS", "UTS_NS",
            "CGROUPS", "CGROUP_CPUACCT", "CGROUP_DEVICE", "CGROUP_FREEZER",
            "CGROUP_SCHED", "CPUSETS", "MEMCG",
        },
        Forbidden: []string{},
    },
    Cgroups: []string{"cpu", "cpuacct", "cpuset", "devices", "freezer", "memory"},
    RuntimeSpec: RuntimeSpec{
        DockerSpec: &DockerSpec{
            Version: []string{`1\.(9|\d{2,})\..*`}, // Requires 1.9+
            GraphDriver: []string{"aufs", "overlay", "devicemapper"},
        },
    },
 }
```

Currently, it only supports:
- Kernel validation: version validation and kernel configuration validation
- Cgroup validation: validating whether required cgroups subsystems are enabled.
- Runtime Validation: currently, only validates docker graph driver.

The validating framework is ready. The specific validation items could be added over time.

@dchen1107 
/cc @kubernetes/sig-node
2016-11-06 17:12:39 -08:00
Kubernetes Submit Queue b75c3a45a1 Merge pull request #35776 from jimmycuadra/petset-rename-docs-examples
Automatic merge from submit-queue

Rename PetSet to StatefulSet in docs and examples.

**What this PR does / why we need it**: Addresses some of the pre-code-freeze changes for implementing the PetSet --> StatefulSet rename. (#35534)

**Special notes for your reviewer**: This PR only changes docs and examples, as #35731 hasn't been merged yet and I don't want to create merge conflicts. I'll open another PR for any remaining code changes needed after that PR is merged. /cc @erictune @janetkuo @chrislovecnm
2016-11-06 13:30:21 -08:00
Derek Carr f11c5c6113 Fix hack/local-up by declaring defaults for unbound env vars 2016-11-06 12:50:54 -05:00
Kubernetes Submit Queue b7512d9c8b Merge pull request #36240 from wojtek-t/quota_bytes_backend
Automatic merge from submit-queue

Increase quota-bytes for etcd in v3 mode

Ref #20504
2016-11-06 09:45:59 -08:00
Kubernetes Submit Queue c04cab536b Merge pull request #36134 from liggitt/kubelet-auth-cleanup
Automatic merge from submit-queue

Cleanup auth logging, allow starting secured kubelet in local-up-cluster.sh

Cleanup for https://github.com/kubernetes/features/issues/89
2016-11-06 08:33:04 -08:00
Kubernetes Submit Queue 42fe4ab027 Merge pull request #35372 from justinsb/federation_dns_hosted_zone_1
Automatic merge from submit-queue

Federation: separate notion of zone-name & dns-suffix
2016-11-05 17:29:09 -07:00
Kubernetes Submit Queue afa99c68b8 Merge pull request #35144 from pipejakob/generate-token
Automatic merge from submit-queue

New command: "kubeadm token generate"

As part of #33930, this PR adds a new top-level command to kubeadm to just generate a token for use with the init/join commands. Otherwise, users are left to either figure out how to generate a token on their own, or let `kubeadm init` generate a token, capture and parse the output, and then use that token for `kubeadm join`.

At this point, I was hoping for feedback on the CLI experience, and then I can add tests. I spoke with @mikedanese and he didn't like the original propose of `kubeadm util generate-token`, so here are the runners up:

```
$ kubeadm generate-token          # <--- current implementation
$ kubeadm generate token          # in case kubeadm might generate other things in the future?
$ kubeadm init --generate-token   # possibly as a subcommand of an existing one
```

Currently, the output is simply the token on one line without any padding/formatting:

```
$ kubeadm generate-token
1087fd.722b60cdd39b1a5f
```

CC: @kubernetes/sig-cluster-lifecycle 

**Release note**:

<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->

``` release-note
New kubeadm command: generate-token
```
2016-11-05 16:12:52 -07:00
Kubernetes Submit Queue 47519962bf Merge pull request #35484 from smarterclayton/delete_warning
Automatic merge from submit-queue

Add --force to kubectl delete and explain force deletion

--force is required for --grace-period=0. --now is == --grace-period=1.
Improve command help to explain what graceful deletion is and warn about
force deletion.

Part of #34160 & #29033

```release-note
In order to bypass graceful deletion of pods (to immediately remove the pod from the API) the user must now provide the `--force` flag in addition to `--grace-period=0`.  This prevents users from accidentally force deleting pods without being aware of the consequences of force deletion.  Force deleting pods for resources like StatefulSets can result in multiple pods with the same name having running processes in the cluster, which may lead to data corruption or data inconsistency when using shared storage or common API endpoints.
```
2016-11-05 11:19:04 -07:00
Kubernetes Submit Queue f1603181a3 Merge pull request #35970 from deads2k/controller-15-enable
Automatic merge from submit-queue

make using service account credentials from controllers optional

Adds a flag to make the "SA per controller" behavior optional.
2016-11-05 08:11:10 -07:00
Jimmy Cuadra d42eabd9d2 Rename PetSet to StatefulSet in docs and examples. 2016-11-05 00:17:28 -07:00
deads2k ebf796a649 make using service account credentials from controllers optional 2016-11-04 14:17:34 -04:00
Wojciech Tyczynski ca99cbca02 Increase quota-bytes for etcd in v3 mode 2016-11-04 17:00:54 +01:00
Kubernetes Submit Queue 6a88de9fe1 Merge pull request #35648 from deads2k/api-32-reflective-checks
Automatic merge from submit-queue

add script to check for updates to the files for generation

Adds a verify script to help people writing APIs remember to wire all the individual pieces up.  Eventually it will be better to avoid this altogether, but this is a start.

@ncdc fyi
2016-11-04 01:16:52 -07:00
yarntime@163.com 5416c3133d add defaults test 2016-11-04 15:21:14 +08:00
Di Xu dd6c980949 specify custom ca file to verify the keystone server 2016-11-04 15:11:41 +08:00
Timothy St. Clair 2b012e822a Add minimum iptables sync period to the proxy, default is 2/sec 2016-11-04 00:38:35 -05:00
Bowei Du a06fc6ab7a Adds TCPCloseWaitTimeout option to kube-proxy for sysctl nf_conntrack_tcp_timeout_time_wait
Fixes issue-32551
2016-11-03 22:07:02 -07:00
Random-Liu b76b2f218b Add unit test for system verification 2016-11-03 20:38:28 -07:00
Random-Liu a5fdf3850c Add system verification. 2016-11-03 20:37:18 -07:00
saadali 402116aed4 Revert "Merge pull request #35821 from vishh/gci-mounter-scope"
This reverts commit 973fa6b334, reversing
changes made to 41b5fe86b6.
2016-11-03 20:23:25 -07:00
Kubernetes Submit Queue e4edd817af Merge pull request #35220 from MrHohn/kubectl-apply-type
Automatic merge from submit-queue

Implement --prune-whitelist(-w) flag to overwrite default whitelist for --prune

From #34274.

Updates:

As suggested, the new commits implement a default whitelist for `kubectl apply --prune`, which could be overwritten by using `--prune-whitelist`or `-w` flag. The default whitelist and example as below.

Also supports `--dry-run` for `--prune` to fix #35222.

whitelist:

```
type pruneResource struct {
    group      string
    version    string
    kind       string
    namespaced bool
}

*pruneResources = []pruneResource{
    {"", "v1", "ConfigMap", true},
    {"", "v1", "Endpoints", true},
    {"", "v1", "Namespace", false},
    {"", "v1", "PersistentVolumeClaim", true},
    {"", "v1", "PersistentVolume", false},
    {"", "v1", "Pod", true},
    {"", "v1", "ReplicationController", true},
    {"", "v1", "Secret", true},
    {"", "v1", "Service", true},
    {"batch", "v1", "Job", true},
    {"extensions", "v1beta1", "DaemonSet", true},
    {"extensions", "v1beta1", "Deployment", true},
    {"extensions", "v1beta1", "HorizontalPodAutoscaler", true},
    {"extensions", "v1beta1", "Ingress", true},
    {"extensions", "v1beta1", "ReplicaSet", true},
    {"apps", "v1beta1", "StatefulSet", true},
}
```

example:

```
$ kubectl apply -f /path/to/file --prune -l test=true \
      -w core/v1/Pod \
      -w core/v1/Service \
      -w extensions/v1beta1/Deployment 
```

@mikedanese
2016-11-03 18:46:17 -07:00
Kubernetes Submit Queue 710c840632 Merge pull request #36160 from kargakis/make-update
Automatic merge from submit-queue

Add make update to update most generated stuff

Closes https://github.com/kubernetes/kubernetes/issues/24737

@ixdy ptal
2016-11-03 17:27:22 -07:00
Kubernetes Submit Queue 6ac5887e8a Merge pull request #36148 from kargakis/edit-list
Automatic merge from submit-queue

kubectl: make edit work with lists again

@kubernetes/kubectl this is fixing https://github.com/kubernetes/kubernetes/issues/20519 and slightly changes the behavior of --recursive when the directory that is being edited has files with errors. Previously since `edit` was working on an object basis, bad objects would be skipped and the editor would load the next object. We want to load multiple objects in the same list and it's impossible to load invalid objects in a list so --recursive will not work if there is any error in the directory. I think this is an acceptable trade-off.

Review here: https://github.com/kubernetes/kubernetes/pull/36148/files?w=1
2016-11-03 17:27:13 -07:00
Kubernetes Submit Queue f0ca9fbd9e Merge pull request #35567 from mwielgus/allowed_disruptions_b2
Automatic merge from submit-queue

Switch DisruptionBudget api from bool to int allowed disruptions [only v1beta1]

Continuation of #34546. Apparently it there is some bug that prevents us from having 2 different incompatibile version of API in integration tests. So in this PR v1alpha1 is removed until testing infrastructure is fixed.

Base PR comment:

Currently there is a single bool in disruption budget api that denotes whether 1 pod can be deleted or not. Every time a pod is deleted the apiserver filps the bool to false and the disruptionbudget controller sets it to true if more deletions are allowed. This works but it is far from optimal when the user wants to delete multiple pods (for example, by decreasing replicaset size from 10000 to 8000).
This PR adds a new api version v1beta1 and changes bool to int which contains a number of pods that can be deleted at once.

cc: @davidopp @mml @wojtek-t @fgrzadkowski @caesarxuchao
2016-11-03 15:50:19 -07:00
Kubernetes Submit Queue 04a7457032 Merge pull request #36096 from rmmh/disable-verify-owners
Automatic merge from submit-queue

Disable the test-owners verify step until the merge conflicts are resolved

It's causing more pain than it's preventing currently. There should be some simpler ways to fix this.
2016-11-03 13:53:41 -07:00
Jordan Liggitt d3991aa7c6
Cleanup auth logging, allow starting secured kubelet in local-up-cluster.sh 2016-11-03 16:17:11 -04:00
Kubernetes Submit Queue c4eb04afa2 Merge pull request #36147 from jsafrane/fix-local-up
Automatic merge from submit-queue

Fix typo in local-up-cluster

Use curly braces instead of round ones for bash variable expansion. The
script complains about unknown ROOT_CA_FILE when running with
KUBE_ENABLE_CLUSTER_DNS=true.
2016-11-03 12:05:03 -07:00
Marcin 3872a47074 Autogenerated code and docs 2016-11-03 18:36:32 +01:00
Jacob Tanenbaum 13afa70c81 Implemented both the dry run and local flags.
Added test cases to show that both flags are operating as intended.
Removed the print statement "running in local mode" as in PR#35112

The previous attempt at the PR (PR#35050) was reverted for causeing a flake.
I believe that setting the deployments terminationGracePeriodSeconds to 0 should
take care of it. I ran hack/make-rules/test-cmd.sh 50 times in a row without encountering
the flake
2016-11-03 12:55:19 -04:00
Michail Kargakis 2bc5f45231 Add make update to update most generated stuff 2016-11-03 14:52:06 +01:00
Marcin 26acced6d8 Add policy api version v1beta1 and disable v1alpha1 2016-11-03 13:26:27 +01:00
Michail Kargakis 35f7d2513f kubectl: make edit work with lists again 2016-11-03 13:12:22 +01:00
Kubernetes Submit Queue 973fa6b334 Merge pull request #35821 from vishh/gci-mounter-scope
Automatic merge from submit-queue

[Kubelet] Use the custom mounter script for Nfs and Glusterfs only

This patch reduces the scope for the containerized mounter to NFS and GlusterFS on GCE + GCI clusters

This patch also enabled the containerized mounter on GCI nodes

Shepherding multiple PRs through the submit queue is painful. Hence I combined them into this PR. Please review each commit individually.

cc @jingxu97 @saad-ali

https://github.com/kubernetes/kubernetes/pull/35652 has also been reverted as part of this PR
2016-11-03 04:32:19 -07:00
Kubernetes Submit Queue 41b5fe86b6 Merge pull request #31546 from derekwaynecarr/systemd-pod-cgroups
Automatic merge from submit-queue

pod and qos level cgroup support

```release-note
[Kubelet] Add alpha support for `--cgroups-per-qos` using the configured `--cgroup-driver`. Disabled by default.
```
2016-11-03 03:56:56 -07:00
Kubernetes Submit Queue e817594648 Merge pull request #35731 from janetkuo/statefulset-v1beta1
Automatic merge from submit-queue

Move Statefulset (previously PetSet) to v1beta1

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

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

**Special notes for your reviewer**: depends on #35663 (PetSet rename)
cc @erictune @foxish @kubernetes/sig-apps 

**Release note**:

``` release-note
v1beta1/StatefulSet replaces v1alpha1/PetSet.
```
2016-11-03 02:46:57 -07:00
Jan Safranek 8876ff8901 Fix typo in local-up-cluster
Use curly braces instead of round ones for bash variable expansion. The
script complains about unknown ROOT_CA_FILE when running with
KUBE_ENABLE_CLUSTER_DNS=true.
2016-11-03 10:28:22 +01:00
Kubernetes Submit Queue 5bca864d20 Merge pull request #36119 from rmmh/godep-restore
Automatic merge from submit-queue

Retry "godep restore" once in verify-dockerized.sh

This should fix #36110. The current flake rate is 0.5%, so with the
unrealistic assumption of uncorrelated flakes, a single retry will bring
it down to <0.01% flake rate.
2016-11-03 02:08:58 -07:00
Kubernetes Submit Queue 695cbde84f Merge pull request #36089 from mikedanese/fix-mac
Automatic merge from submit-queue

fix verify-bazel.sh on mac and windows

mac bash doesn't like |& because mac bash is really old. the formating of wc
is also slightly different then on linux.


```console
$ # on linux
$ echo -n | wc -l
0
$ # on mac
$ echo -n | wc -l
       0
```
2016-11-03 02:08:30 -07:00
Kubernetes Submit Queue 2f84a7c8d2 Merge pull request #35594 from madhusudancs/federation-kubefed-init-00
Automatic merge from submit-queue

[Federation][init] Implement `kubefed init` command that performs federation control plane bootstrap.

Please review only the last commit here. This is based on PR #35593 which will be reviewed independently.

I am intentionally not including the unit tests in this PR to better distribute and parallelize reviews. This PR is already big.

I will add a release note separately for this entire feature, so please don't worry too much about the release note here in the PR.

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @quinton-hoole @nikhiljindal
2016-11-03 02:08:14 -07:00
saadali 62ee8b9d49 Move godeps to version v74 instead of v73 2016-11-03 00:43:06 -07:00
saadali 9e9a66ed22 Ensure verify-godep passes godep to godep-save 2016-11-02 23:49:30 -07:00
saadali 87636fdd78 Fix godep to v73 in verify-godeps 2016-11-02 21:08:26 -07:00
Saad Ali d41b3b0929 Revert "Add missing vendor files to make godeps happy" 2016-11-02 20:56:06 -07:00
saadali e9afbd5cdf Add missing vendor files to make godeps happy 2016-11-02 18:55:10 -07:00
Ryan Hitchman bfae674093 Retry "godep restore" once in verify-dockerized.sh
This should fix #36110. The current flake rate is 0.5%, so with the
unrealistic assumption of uncorrelated flakes, a single retry will bring
it down to <0.01% flake rate.
2016-11-02 17:14:08 -07:00
saadali 683ea197be Hard code godep version to v74
See issue #36111
2016-11-02 16:33:53 -07:00
Ryan Hitchman 57a152ca40 Disable the test-owners verify step until the merge conflicts are resolved.
Fixes #35850.

GitHub's merging doesn't support .gitattributes-- I verified this with
support. There may be a workaround with line padding or making the bot
do merges on its own, which is beneficial for custom merge conflict
resolution in general.
2016-11-02 15:39:06 -07:00
Vishnu Kannan 414e4ae549 Revert "Adding a root filesystem override for kubelet mounter"
This reverts commit e861a5761d.
2016-11-02 15:18:09 -07:00
Janet Kuo c25455e8b3 (Auto-gen) Run hack/update-all & update-bazel & update linted packages 2016-11-02 15:16:41 -07:00
Janet Kuo c15b9470f5 Replace apps/v1alpha1 with apps/v1beta1 and manually remove generated apps/v1alpha1 files
Manually remove generated apps/v1alpha1 types, protobuf, and api-reference doc files
Manually remove apps/v1alpha1 folder from 1.5 generated client
2016-11-02 15:16:23 -07:00
Kubernetes Submit Queue 9a7ad2e20d Merge pull request #35592 from madhusudancs/federation-kubefed-04
Automatic merge from submit-queue

[Federation][(Un)join-01] Refactor common functions and structs into a util package.

Please review only the last commit here. This is based on PR #35495 which will be reviewed independently.

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @quinton-hoole @nikhiljindal
2016-11-02 14:48:46 -07:00
Clayton Coleman 6e25830378
Add --force to kubectl delete and explain force deletion
--force is required for --grace-period=0. --now is == --grace-period=1.
Improve command help to explain what graceful deletion is and warn about
force deletion.
2016-11-02 17:44:05 -04:00
Kubernetes Submit Queue d28f7031a1 Merge pull request #35494 from madhusudancs/federation-kubefed-02
Automatic merge from submit-queue

[Federation][unjoin-00] Implement `kubefed unjoin` command.

Please review only the last commit here. This is based on PR #35493 which will be reviewed independently.

I will add a release note separately for this entire feature, so please don't worry too much about the release note here in the PR.

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @quinton-hoole @nikhiljindal
2016-11-02 13:36:43 -07:00
Madhusudan.C.S 4a9377027d [Federation][init] Implement `kubefed init` command that performs federation control plane bootstrap. 2016-11-02 13:36:41 -07:00
Mike Danese 93f737eae6 fix verify-bazel.sh on mac and windows
mac bash doesn't like |& because mac bash is really old. the formating of wc
is also sligthly different then on linux

```
$ # on linux
$ echo -n | wc -l
0
$ # on mac
$ echo -n | wc -l
       0
```
2016-11-02 13:14:00 -07:00
Madhusudan.C.S 3c692ebd77 [Federation] Implement the `kubefed` command.
Also:
1. Add it to the client build targets list.
2. Register `kubefed join` and `kubefed unjoin` commands.
2016-11-02 12:48:20 -07:00
Kubernetes Submit Queue 539165d899 Merge pull request #36075 from rmmh/root-gitattributes
Automatic merge from submit-queue

Move .gitattributes annotation to the root, so GitHub will respect them.

This should fix the merge conflicts by letting GitHub use the simpler line-by-line algorithm for this file. Having .gitattributes in a sub-directory would work for local merging, but would show conflicts on the web UI.
2016-11-02 12:13:54 -07:00
Madhusudan.C.S 90d46c8670 [Federation][unjoin-00] Implement `kubefed unjoin` command.
Also, add unit tests for `kubefed unjoin`.
2016-11-02 11:22:46 -07:00
Kubernetes Submit Queue df8db653da Merge pull request #35493 from madhusudancs/federation-kubefed-01
Automatic merge from submit-queue

[Federation][join-01] Implement `kubefed join` command.

Supersedes PR #35155.

Please review only the last commit here. This is based on PR #35492 which will be reviewed independently.

I will add a release note separately for this entire feature, so please don't worry too much about the release note here in the PR.

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @quinton-hoole @mwielgus
2016-11-02 10:35:55 -07:00
Ryan Hitchman 955f31353d Move .gitattributes annotation to the root, so GitHub will respect them. 2016-11-02 09:48:45 -07:00
derekwaynecarr 42289c2758 pod and qos level cgroup support 2016-11-02 08:07:04 -04:00
Kubernetes Submit Queue 46dc7e5244 Merge pull request #35841 from mbohlool/o2
Automatic merge from submit-queue

Update verify-openapi-spec script to check for extra generated spec

hack/verify-openapi-spec.sh only check for existing spec changes. If for some reason (here most probably I forgot to delete a file in api/openapi-spec folder in #35388 after a rebase) there is an old spec exists in the spec folder, it won't panic but it should. This resulted in an unused out of date v1.spec file in the api/openapi-spec folder that this PR also removes.
2016-11-01 23:15:16 -07:00
Kubernetes Submit Queue 21c0743c71 Merge pull request #36005 from zmerlynn/kops-configurable-timeout
Automatic merge from submit-queue

e2e.go/kops: Bump timeout to 20m, fix KUBERNETES_PROVIDER

**What this PR does / why we need it**: I don't have a ton of proof, but I think https://k8s-testgrid.appspot.com/google-aws#kops-aws-updown builds 4045-4047 are just AWS and DNS slowness.

In addition, my original PR was meant to change `KUBERNETES_PROVIDER` based on `KUBERNETES_CONFORMANCE_PROVIDER`.
2016-11-01 15:56:57 -07:00
Zach Loafman 02ec4c373b e2e.go/kops: Make up timeout configurable, bump to 20m
Along the way: Fix ginkgo-e2e.sh. This change got dropped in the
original PR, but it was meant to allow a conformance-style
kubectl-auth test and still have a legit cloud provider.
2016-11-01 14:56:34 -07:00
Zihong Zheng 4523ce8f32 Adds a test for apply --prune --prune-whitelist 2016-11-01 14:02:31 -07:00
Saad Ali 1c51ac4fc1 Revert "fixed some issues with kubectl set resources" 2016-11-01 13:53:17 -07:00
deads2k 4850314a5c add script to check for updates to the files for generation 2016-11-01 15:59:50 -04:00
Madhusudan.C.S 2342f6eefb [Federation][join-01] Implement `kubefed join` command.
Also, add unit tests for `kubefed join`.
2016-11-01 12:45:28 -07:00
Kubernetes Submit Queue 1fa8369074 Merge pull request #35639 from ncdc/lister-gen
Automatic merge from submit-queue

Add tooling to generate listers

Add lister-gen tool to auto-generate listers. So far this PR only demonstrates replacing the manually-written `StoreToLimitRangeLister` with the generated `LimitRangeLister`, as it's a small and easy swap.

cc @deads2k @liggitt @sttts @nikhiljindal @lavalamp @smarterclayton @derekwaynecarr  @kubernetes/sig-api-machinery @kubernetes/rh-cluster-infra
2016-11-01 09:29:06 -07:00
Kubernetes Submit Queue 44b684ad53 Merge pull request #33663 from pmorie/selinux-fixes
Automatic merge from submit-queue

SELinux Overhaul

Overhauls handling of SELinux in Kubernetes.  TLDR: Kubelet dir no longer has to be labeled `svirt_sandbox_file_t`.

Fixes #33351 and #33510.  Implements #33951.
2016-11-01 05:04:17 -07:00
Dr. Stefan Schimanski 5dc31d35a0 Add --tls-sni-cert-key to the apiserver for SNI support 2016-11-01 09:50:56 +01:00
mbohlool 034652b290 verify-openapi-spec.sh should not ignore extra file in the spec folder api/openapi-spec 2016-11-01 01:13:11 -07:00
Kubernetes Submit Queue d461262bf8 Merge pull request #35497 from liggitt/node-address
Automatic merge from submit-queue

Allow apiserver to choose preferred kubelet address type

Follow up to #33718 to stay compatible with clusters using DNS names for master->node communications. Adds the `--kubelet-preferred-address-types` apiserver flag for clusters that prefer a different node address type.

```release-note
The apiserver can now select which type of kubelet-reported address to use for master->node communications, using the --kubelet-preferred-address-types flag.
```
2016-10-31 18:33:27 -07:00
Jordan Liggitt 1a7f7c5399
Allow apiserver to choose preferred kubelet address type 2016-10-31 16:02:38 -04:00
Jacob Beacham cf6b6778dc Adding CLI tests for kubeadm. 2016-10-31 11:12:51 -07:00
Chao Xu 04f291e5b4 disable update-staging-client-go until code freeze 2016-10-31 10:57:14 -07:00
Kubernetes Submit Queue 9ecc131c05 Merge pull request #31220 from mfojtik/pause-patch
Automatic merge from submit-queue

Use PATCH to resume/pause deployment

Alternative version of: https://github.com/kubernetes/kubernetes/pull/30919
Fixes: https://github.com/kubernetes/kubernetes/issues/20437
2016-10-31 08:44:58 -07:00
Andy Goldstein 7b85985a72 Add generated listers 2016-10-31 11:13:43 -04:00
Andy Goldstein f85ac9023a Add lister-gen 2016-10-31 11:13:43 -04:00
Kubernetes Submit Queue f67ecd73f7 Merge pull request #35800 from deads2k/rbac-18-fix-local-up
Automatic merge from submit-queue

make localupcluster work with RBAC enabled

When `ENABLE_RBAC=true` is set to true, `local-up-cluster` fails because it can't reach the endpoint (get a 403).  This changes to an endpoint that the default policy allows anyone to see.
2016-10-31 05:28:54 -07:00
Michal Fojtik 0faa27e62d Use PATCH when pausing/resuming objects and CalculatePatches to get the patch 2016-10-31 13:13:59 +01:00
Kubernetes Submit Queue cda55a7847 Merge pull request #35783 from wojtek-t/support_rollback
Automatic merge from submit-queue

Better logging and support for running non-default version from etcd image

Ref #20504
2016-10-31 04:06:52 -07:00
Wojciech Tyczynski 62299921b5 Correctly support custom etcd migration 2016-10-31 09:03:39 +01:00
Justin Santa Barbara cebfc821a4 Create simple version of ratelimit package
Allows for more testing.
2016-10-30 20:55:03 -04:00
Justin Santa Barbara a3ba760a27 Federation: separate notion of zone-name & dns-suffix
We can put subdomains into hosted zones (for example,
foo.federation.example.com can be hosted in example.com)

By allowing sharing a common hosted zone, this means the user doesn't
have to do as much setup.
2016-10-30 20:50:09 -04:00
Kubernetes Submit Queue 8a202eddfe Merge pull request #35733 from mikedanese/set-gen
Automatic merge from submit-queue

bazel: implement set-gen as a bazel genrule

cc @caesarxuchao who is the gengo master until @lavalamp is back.
2016-10-30 08:43:41 -07:00
Kubernetes Submit Queue bc5682bbaa Merge pull request #35050 from JacobTanenbaum/resource_fixes
Automatic merge from submit-queue

fixed some issues with kubectl set resources

when using kubectl set resources it resets all resource fields that are not being set.

for example
  # kubectl set resources deployments nginx --limits=cpu=100m

followed by

  # kubectl set resources deployments nginx --limits=memory=256Mi

would result in the nginx deployment only limiting memory at 256Mi with the previous
limit placed on the cpu being wiped out. This behavior is corrected so that each invocation
only modifies fields set in that command and changed the testing so that the desired behavior
is checked.

Also a typo:

 you must specify an update to requests or limits or  (in the form of --requests/--limits)

corrected to

 you must specify an update to requests or limits (in the form of --requests/--limits)

 Implemented both the dry run and local flags.

Added test cases to show that both flags are operating as intended.
Removed the print statement "running in local mode" as in PR#35112
2016-10-30 06:18:56 -07:00
Kubernetes Submit Queue 6343db835a Merge pull request #35454 from bowei/image-for-issue-32551
Automatic merge from submit-queue

Add test image for networking related tests

This test image is to support the e2e test for #32551
2016-10-30 01:56:10 -07:00
Kubernetes Submit Queue a06a08a906 Merge pull request #34489 from caesarxuchao/time-copy.sh
Automatic merge from submit-queue

Verify and update client-go staging area for every PR

We need to keep the staging area up-to-date to prevent PRs from breaking client-go.

It's marked as "WIP" because we need to decide the [versioning strategy](https://github.com/kubernetes/client-go/issues/9) for client-go first. This PR contains breaking changes for client-go.

This is blocking #29934 and potentially #34441

cc @kubernetes/sig-api-machinery
2016-10-29 16:24:07 -07:00
Kubernetes Submit Queue 7f309f5fae Merge pull request #35471 from caesarxuchao/client-gen-multi-versions
Automatic merge from submit-queue

Let release_1_5 clientset include multiple versions of a group

Fix #35237 

This PR make versioned clientset to include multiple versions of a group. Currently only `batch` has `v1` and `v2alpha1`. The clientset interface now looks like:
```go
	BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface
	BatchV1() v1batch.BatchV1Interface
	// Deprecated: please explicitly pick a version if possible.
	Batch() v1batch.BatchV1Interface
```

Commit "update client-gen to say internalversion rather than unversioned" fixes https://github.com/kubernetes/kubernetes/issues/24481. 


cc @kubernetes/sig-api-machinery @soltysh @deads2k @nikhiljindal 



```release-note
release_1_5 clientset supports multiple versions of a group.
```
2016-10-29 15:40:13 -07:00
Kubernetes Submit Queue 7c9c8cbf28 Merge pull request #34952 from kargakis/update-observedgeneration-for-overlapping-deployments
Automatic merge from submit-queue

Make overlapping deployments deletable

@kubernetes/deployment ptal

Fixes https://github.com/kubernetes/kubernetes/issues/34466 by 1) not adding the overlapping annotation in the working deployment, 2) updates observedGeneration for overlapping deployments, and 3) updates the kubectl deployment reaper to do non-cascading deletion for deployments with the overlapping annotation.
2016-10-29 14:50:16 -07:00
Chao Xu d3c0d04285 add update-staging-client-go.sh and verify-staging-client-go.sh;
disable verify-staging-client-go.sh until 1.5 code freeze
2016-10-29 14:20:39 -07:00
Chao Xu 850729bfaf include multiple versions in clientset
update client-gen to use the term "internalversion" rather than "unversioned";
leave internal one unqualified;
cleanup client-gen
2016-10-29 13:30:47 -07:00
Kubernetes Submit Queue 739f78fad2 Merge pull request #33250 from ymqytw/edit_before_create
Automatic merge from submit-queue

support editing before creating resource

Support `kubectl create -f config.yaml --edit`
Support editing before creating resource from files, urls and stdin.
The behavior is similar to `kubectl edit`
It won't create anything when edit make no change.

partial: #18064

Based on: #33686 and #33973

```release-note
Support editing before creating resource from files, urls and stdin, e.g. `kubectl create -f config.yaml --edit`
It won't create anything when edit make no change.
```
2016-10-29 11:45:43 -07:00
Kubernetes Submit Queue 4ec036c8af Merge pull request #35452 from deads2k/auth-02-front-proxy
Automatic merge from submit-queue

allow authentication through a front-proxy

This allows a front proxy to set a request header and have that be a valid `user.Info` in the authentication chain.  To secure this power, a client certificate may be used to confirm the identity of the front proxy

@kubernetes/sig-auth fyi
@erictune per-request
@liggitt you wrote the openshift one, ptal.
2016-10-29 07:52:09 -07:00
Kubernetes Submit Queue bb992150fa Merge pull request #35694 from wojtek-t/update_etcd_3_0_13
Automatic merge from submit-queue

Update Godeps etcd to 3.0.13

Ref #20504
2016-10-29 05:00:55 -07:00
Ryan Hitchman 20754c0f5c Improve update_owners.py username detection and error message.
Also, skip _output.
2016-10-28 13:23:19 -07:00
deads2k 5b3e2b230b make localupcluster work with RBAC enabled 2016-10-28 13:19:25 -04:00
deads2k 3f9a4d51d5 wire up authenticating front proxy: 2016-10-28 08:36:46 -04:00
Kubernetes Submit Queue e37b7cbde0 Merge pull request #35663 from janetkuo/statefulset
Automatic merge from submit-queue

Rename PetSet to StatefulSet

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

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

**Special notes for your reviewer**: cc @erictune @foxish @kubernetes/sig-apps @ymqytw 

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```
2016-10-27 20:16:50 -07:00
Ryan Hitchman df04f33aa9 Make update_owners.py assign new tests to self by default. 2016-10-27 17:39:30 -07:00
Janet Kuo 10aee82ae3 Rename PetSet API to StatefulSet 2016-10-27 17:25:10 -07:00
Mike Danese 5dc7554ab2 bazel: implement set-gen as a bazel genrule 2016-10-27 15:16:30 -07:00
Ryan Hitchman 8e4e8944b6 Add hack/verify-test-owners.sh to ensure tests always have owners. 2016-10-27 12:35:43 -07:00
Jacob Tanenbaum a77cecb957 Implemented both the dry run and local flags.
Added test cases to show that both flags are operating as intended.
Removed the print statement "running in local mode" as in PR#35112
2016-10-27 14:05:46 -04:00
Jacob Tanenbaum fe3bcad128 fixed some issues with kubectl set resources
when using kubectl set resources it resets all resource fields that are not being set.

for example
  # kubectl set resources deployments nginx --limits=cpu=100m

followed by

  # kubectl set resources deployments nginx --limits=memory=256Mi

would result in the nginx deployment only limiting memory at 256Mi with the previous
limit placed on the cpu being wiped out. This behavior is corrected so that each invocation
only modifies fields set in that command and changed the testing so that the desired behavior
is checked.

Also a typo:

 you must specify an update to requests or limits or  (in the form of --requests/--limits)

corrected to

 you must specify an update to requests or limits (in the form of --requests/--limits)

changelog:
 - fixed a typo in hack/make-rules/test-cmd.sh "effecting" to "affecting"
2016-10-27 14:05:46 -04:00
Wojciech Tyczynski 543c2c20ac Update etcd in tests to 3.0.13 2016-10-27 15:06:08 +02:00
Kubernetes Submit Queue 5423eaf431 Merge pull request #35431 from deads2k/client-16-remove-old
Automatic merge from submit-queue

remove the non-generated client

Removes the non-generated client from kube.  The package has a few methods left, but nothing that needs updating when adding new groups.

@ingvagabund
2016-10-27 05:12:33 -07:00
Kubernetes Submit Queue f11d01076e Merge pull request #35503 from wojtek-t/fix_migration
Automatic merge from submit-queue

Fix migration script to make it sh-friendly

Ref #22448

There is no bash in etcd image, so the script needs to be "sh-friendly".

Also, few fixes to the script.
2016-10-27 02:59:37 -07:00
Wojciech Tyczynski 44e66a97f3 Fix migration script 2016-10-27 10:17:56 +02:00
Vishnu kannan e861a5761d Adding a root filesystem override for kubelet mounter
This is useful for supporting hostPath volumes via containerized
mounters in kubelet.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-10-26 21:42:59 -07:00
Kubernetes Submit Queue 10061ac358 Merge pull request #35523 from luxas/remove_reconcile
Automatic merge from submit-queue

Deprecate the --reconcile-cidr flag

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: Follows up https://github.com/kubernetes/kubernetes/pull/34906

**Special notes for your reviewer**: I'm not sure why coreos had set `--reconcile-cidr` to `false` and what the implications are now.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
Deprecate the --reconcile-cidr kubelet flag because it has no function anymore
```

PTAL @thockin @freehan @justinsb @yujuhong 
@kubernetes/sig-node @kubernetes/sig-network 

**I will add `hack/update-all.sh` contents soon to fix builds**
2016-10-26 20:18:37 -07:00
Kubernetes Submit Queue f300d7ed69 Merge pull request #35646 from vishh/klet-relative-mount
Automatic merge from submit-queue

rename kubelet flag mounter-path to experimental-mounter-path

```release-note
* Kubelet flag '--mounter-path' renamed to '--experimental-mounter-path'
```

The feature the flag controls is an experimental feature and this renaming ensures that users do not depend on this feature just yet.
2016-10-26 16:57:33 -07:00
Brian Grant 2ae2339d6a Merge pull request #35546 from thockin/kill-head-scary-warning-on-master
Remove obsolete munger on docs
2016-10-26 16:44:53 -07:00
Vishnu kannan adef4675a0 rename kubelet flag mounter-path to experimental-mounter-path
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-10-26 14:50:33 -07:00
Kubernetes Submit Queue d9873f4556 Merge pull request #35644 from thockin/build-fix-rsync
Automatic merge from submit-queue

Build: Use checksum to rsync results

If dependencies are touched, the Makefile will detect that tools like
deepcopy-gen need to be rebuilt.  It will rebuild them, but if Go decides the
dependencies are not ACTUALLY updated (maybe it was a test file - known
limitation of the current Makefile), it does not touch the resulting binary.
The Makefile touches the result explicitly to mark that the dep change has
been handled.  But rsync blows away that change with the older file, and
helpfully preserves the timestamp.  This repeats on every build.

Now rsync ignores it if the checksum is the same.  Result = faster build.

@wojtek-t @gmarek
2016-10-26 12:42:42 -07:00
deads2k 969e945a9e delete non-generated client 2016-10-26 15:14:41 -04:00
Lucas Käldström 6846e0b48a Remove usage of --reconcile-cidr 2016-10-26 20:26:07 +03:00
Tim Hockin 7aa91bbff6 Use checksum to rsync results
If dependencies are touched, the Makefile will detect that tools like
deepcopy-gen need to be rebuilt.  It will rebuild them, but Go decides the
dependencies are not actually updated (maybe it was a test file - known
limitation of the current Makefile) and does not touch the resulting binary.
Then the Makefile touches the result explicitly to mark thatthe dep change has
been handled.  Then rsync blows away that change with the older file, and
helpfully preserves the timestamp.

Now rsync ignores it if the checksum is the same.  Result = faster build.
2016-10-26 16:30:18 +02:00
Paul Morie ea423110cc Remove SELinux relabel of Kubelet dir from test-e2e-node.sh 2016-10-26 09:38:03 -04:00
Paul Morie 38f6f9b956 Remove SELinux relabel of Kubelet dir from local-up-cluster.sh 2016-10-26 09:38:03 -04:00
Kubernetes Submit Queue fc7f64a99a Merge pull request #35388 from mbohlool/co2
Automatic merge from submit-queue

Add GroupVersion tags to OpenAPI spec and remove all specs except main one

Tags are used as a grouping mechanism in OpenAPI. We generated one spec per GroupVersion before for this grouping but by adding those tags in this PR, those files have no use. We can always add them back if there were a use-case for them.

**Release note**:

```release-note
Deprecate OpenAPI spec for GroupVersion endpoints in favor of single spec /swagger.json
```

Reference: #13414
2016-10-25 21:25:37 -07:00
Kubernetes Submit Queue a898f3d996 Merge pull request #34381 from liggitt/kubelet-auth
Automatic merge from submit-queue

kubelet authn/authz

Implements https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/kubelet-auth.md

Part of [Authenticated/Authorized access to kubelet API](https://github.com/kubernetes/features/issues/89) feature
2016-10-25 17:40:27 -07:00
Tim Hockin b0fa2056a6 Remove 'this is HEAD' warning on docs 2016-10-26 00:06:59 +02:00
mbohlool 75451b49f4 - Add GroupVersion as tags to OpenAPI spec
- Remove all end-point specs as they are not useful in light of GroupVersion tags in main spec
2016-10-25 14:27:48 -07:00
Bowei Du efa3db9f78 Add test image for networking related tests 2016-10-25 13:34:03 -07:00
Ryan Hitchman 78eeb76386 Make hack/update_owners.py get list from local repo, add --check option. 2016-10-25 12:26:21 -07:00
Kubernetes Submit Queue 85207190f5 Merge pull request #35373 from mikedanese/bindata
Automatic merge from submit-queue

add genrule for hack/update-bindata.sh
2016-10-25 11:54:30 -07:00
Kubernetes Submit Queue ebd53c6f76 Merge pull request #35468 from bprashanth/exp_shim_local
Automatic merge from submit-queue

Pass --experimental-runtime-integration-type in local-up-cluster

why not?
2016-10-25 11:02:30 -07:00
Jordan Liggitt 426caf5bd1
Kubelet auth flags 2016-10-25 03:40:08 -04:00
Mike Danese 61bd6aa6a2 remove docs/user-guide from bindata search path 2016-10-24 18:00:08 -07:00
Mike Danese 224e32bcb3 make godep licenses/copyright check case insensitive 2016-10-24 18:00:08 -07:00
Mike Danese 1cd2968917 godep: vendor go-bindata 2016-10-24 18:00:08 -07:00
Mike Danese d380cb1da3 fix realpath issue on mac 2016-10-24 17:10:47 -07:00
bprashanth 9d7c57ff2e Pass --experimental-runtime-integration-type in local-up-cluster 2016-10-24 15:01:45 -07:00
Mike Danese ea632fa813 Revert "disable bazel build"
This reverts commit ee15c80de2.
2016-10-24 14:47:26 -07:00
Mike Danese 27116c6818 rename build/ to build-tools/ 2016-10-24 14:41:56 -07:00
ymqytw c641834bb3 support editing before creating resource 2016-10-24 09:56:37 -07:00
Bowei Du 65966995e9 Update linted_packages 2016-10-22 21:40:08 -07:00
Bowei Du a6550b332e Add verbose mode to boilerplate
hack/verify-boilerplate.sh -v will now print out why the file does
not match along with a diff if possible.

Note: boilerplate.py now has a unit test that is run along with
hack/verify-boilerplate.sh.
2016-10-22 21:40:08 -07:00
Mike Danese ee15c80de2 disable bazel build 2016-10-22 15:50:06 -07:00
mbohlool 3e67cf8b9b Add authentication to openapi Spec 2016-10-22 02:43:42 -07:00
Mike Danese 999c967767 ignore BUILD in the flags-underscore.py validation 2016-10-21 17:32:33 -07:00
Mike Danese b250a8809d don't check BUILD file when verifying godeps 2016-10-21 17:32:33 -07:00
Mike Danese a2eec91a53 add bazel presubmits to verify BUILD files are up to date 2016-10-21 17:32:33 -07:00