Commit Graph

37568 Commits (77db65d6bbbed412ceefdc491f6cf9233a0461ce)

Author SHA1 Message Date
Dan Kohn 77db65d6bb Change code of conduct to call CNCF CoC by reference 2016-10-19 13:22:35 -04:00
Kubernetes Submit Queue 10a0d2a468 Merge pull request #35120 from eparis/hack-sort
Automatic merge from submit-queue

Use LC_ALL=C with sort

In some user env LANG=C might lose:

Wrong:
```
echo -e "test/images/port-forward-tester\ntest/images/porter" | LANG=C sort
test/images/porter
test/images/port-forward-tester
```
Right:
```
echo -e "test/images/port-forward-tester\ntest/images/porter" | LC_ALL=C sort
test/images/port-forward-tester
test/images/porter
```
2016-10-19 08:45:19 -07:00
Kubernetes Submit Queue d4087d0b73 Merge pull request #35022 from jsafrane/gluster-secrets2
Automatic merge from submit-queue

Remove PV annotations for Gluster provisioner.

Don't store Gluster SotrageClass parameters in annotations, it's insecure.
Instead, expect that there is the StorageClass available at the time
when it's needed by Gluster deleter.

See #34822 for detais

@kubernetes/sig-storage
2016-10-19 08:45:08 -07:00
Kubernetes Submit Queue 5133e1f0df Merge pull request #34683 from asalkeld/cmd/testing/fake
Automatic merge from submit-queue

Move the common test functions from cmd_test.go to cmd/testing/fake.go

**What this PR does / why we need it**:
This is so that we can use NewAPIFactory() from cmd/set/*test.go
Up until now we would get a import loop error.

This commit also adds a basic unit test case for cmd/set/set_image.go

**Which issue this PR fixes**
partial #34592

**Special notes for your reviewer**:
None

**Release note**:
```release-note
NONE
```
2016-10-19 08:03:07 -07:00
Eric Paris b670f76232 Use LC_ALL=C with sort
In some user env LANG=C might lose:

Wrong:
```
echo -e "test/images/port-forward-tester\ntest/images/porter" | LANG=C sort
test/images/porter
test/images/port-forward-tester
```
Right:
```
echo -e "test/images/port-forward-tester\ntest/images/porter" | LC_ALL=C sort
test/images/port-forward-tester
test/images/porter
```
2016-10-19 09:47:21 -04:00
Kubernetes Submit Queue be1996ee64 Merge pull request #35112 from errordeveloper/fix-35105
Automatic merge from submit-queue

Get rid of output line that break automated usage of `kubectl set image`

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

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

**Special notes for your reviewer**: We could consider printing it to stderr, or using `IsTerminal()`, but I went for the simplest thing first.

**Release note**:
```release-note
Make `kubectl set image` easier to script
```
2016-10-19 06:23:38 -07:00
Kubernetes Submit Queue 6b56d7baa2 Merge pull request #34976 from deads2k/api-30-separate-third-party
Automatic merge from submit-queue

separate third party resources from master (moves + consequences)

Remove the third party resource code from the main `Master` struct.  I think we may be able to get this down to particular way to configure/`New` a generic API server.
2016-10-19 06:23:29 -07:00
Kubernetes Submit Queue 8290366a8f Merge pull request #33966 from dims/fix-issue-33375
Automatic merge from submit-queue

Enable local-up-cluster.sh to start with the secured port

related to #33375
2016-10-19 05:40:32 -07:00
Ilya Dmitrichenko 2494462e5f
Get rid of output line that break automated usage of `kubectl set image` (fix #35105) 2016-10-19 13:13:20 +01:00
deads2k f9cbc42581 separate third party resources from master (moves + consequences) 2016-10-19 07:40:58 -04:00
Kubernetes Submit Queue cbe65701a2 Merge pull request #35104 from gmarek/root_disk
Automatic merge from submit-queue

Allow setting master root disk size in kubemark
2016-10-19 04:25:06 -07:00
Kubernetes Submit Queue bf0d323460 Merge pull request #35102 from gmarek/mount_disk
Automatic merge from submit-queue

Mount disk in kubemark earlier
2016-10-19 04:24:58 -07:00
Kubernetes Submit Queue 06c0416de4 Merge pull request #35034 from sttts/sttts-remove-srvrunoption-apigroupprefix
Automatic merge from submit-queue

Make APIGroupPrefix constant: "/apis"

It's not wired externally, so let's get rid of it and make it constant.
2016-10-19 04:24:49 -07:00
gmarek 16d8e6400e Allow setting master root disk size in kubemark 2016-10-19 12:37:17 +02:00
Davanum Srinivas 20d1818d78 Enable local-up-cluster.sh to start with the secured port
Generate a kubeconfig for use with controller-manager, kubelet,
scheduler etc. This kubeconfig should use the secure https
port of the api server with appropriate ca cert for the components
to talk to api server.

With this change, one can set API_PORT=0 to completely switch off
insecure access for testing admission controllers etc.

Fixes #33375
2016-10-19 06:36:01 -04:00
gmarek cde44bc07c Mount disk in kubemark earlier 2016-10-19 12:11:10 +02:00
Kubernetes Submit Queue e05ef8724f Merge pull request #35099 from gmarek/startpods
Automatic merge from submit-queue

Fix StartPods

Fix #34221
2016-10-19 03:09:51 -07:00
Dr. Stefan Schimanski 08d4fa5c4f Turn APIGroupPrefix into a constant 2016-10-19 11:52:15 +02:00
gmarek 959044ad91 Fix StartPods 2016-10-19 11:03:47 +02:00
Kubernetes Submit Queue c900a0ed7b Merge pull request #35037 from davidwalter0/patch-1
Automatic merge from submit-queue

update oscodenames supporting systemd
2016-10-19 01:42:45 -07:00
Kubernetes Submit Queue c8004a1b7b Merge pull request #34908 from jansel/flannel_other_net_config
Automatic merge from submit-queue

Don't overwrite FLANNEL_OTHER_NET_CONFIG in ubuntu config

Make it easier to pass options to flannel through environment variables.
2016-10-19 01:03:49 -07:00
Kubernetes Submit Queue 61e0113019 Merge pull request #34906 from luxas/remove_old_networking
Automatic merge from submit-queue

WIP: Remove the legacy networking mode

<!--  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**:
Removes the deprecated configure-cbr0 flag and networking mode to avoid having untested and maybe unstable code in kubelet, see: #33789

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

**Special notes for your reviewer**: There are a lot of deployments who rely on this networking mode. Not sure how we deal with that: force switch to kubenet or just delete the old deployment?

But please review the code changes first (the first commit)

**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
Removed the deprecated kubelet --configure-cbr0 flag, and with that the "classic" networking mode as well
```

PTAL @kubernetes/sig-network @kubernetes/sig-node @mikedanese
2016-10-19 01:03:39 -07:00
Kubernetes Submit Queue cd44cec587 Merge pull request #34765 from ivan4th/fix-more-typos
Automatic merge from submit-queue

Fix typos
2016-10-19 00:21:11 -07:00
Kubernetes Submit Queue 3fc8cff07d Merge pull request #35071 from thockin/volume-mount-merge-key
Automatic merge from submit-queue

Change merge key for VolumeMount to mountPath

Fixes #34800
2016-10-19 00:21:03 -07:00
Kubernetes Submit Queue 743e0689cc Merge pull request #35079 from dchen1107/test1
Automatic merge from submit-queue

Collect resource usage test with 0 pod for node benchmark.
2016-10-18 22:36:31 -07:00
Kubernetes Submit Queue db2d8e0cc4 Merge pull request #34819 from feiskyer/AppArmor
Automatic merge from submit-queue

CRI: add docs for AppArmor and Seccomp

This PR adds docs for AppArmor and Seccomp in CRI.

cc/ @yujuhong @Random-Liu
2016-10-18 21:52:04 -07:00
Kubernetes Submit Queue 2e5303d206 Merge pull request #34612 from jellonek/jell/fix_version_generation
Automatic merge from submit-queue

build: Fix version generation.

This PR provides update to version string generation procedure to handle additional case - working on branch delivered from release tag, instead of working on `-(alpha|beta).no` suffixed tag.

Reason of it is that actually if someone would start working on branch forked from release tag (`v1.4.1` for example), will add some commits and then would try to build k8s/run conformance tests - will end up with broken version string in form similar to `v1.4.1.X+YYYY` where `X` is a dictance/number of commits from base tag and `YYYY` will be first 14 characters from commit hash.
Such version - containing four dotted parts is rejected during conformance tests with error similar to:
```
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:843
Oct 11 12:38:33.726: Failed to get server version: Unable to parse server version "v1.4.1.5+somecommithash": Invalid character(s) found in patch number "1.5"
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/util.go:413
```

This PR provides a cure for this situation creating version string in form `v1.4.1-X+YYYY` which then should be readable for version validation checks. 

Release note:
```release-note
Fix version string generation for local version different from release and not based on `-alpha.no` or `-beta.no` suffixed tag.
```
2016-10-18 21:11:36 -07:00
Kubernetes Submit Queue 2ea4e1f066 Merge pull request #33352 from smarterclayton/unified_defaulters
Automatic merge from submit-queue

Split conversion and defaulting

Separate conversion and defaulting.   Defaulting occurs mixed with conversion today - change the server so that the `VersioningCodec` performs defaulting on the external type during decoding.  

* Add a new method to `Scheme` - `func (*runtime.Scheme) Default(runtime.Object)` - that takes an object and performs defaulting.  
* Call `Default` during decoding and at static initialization time
* Use the new `defaulter-gen` to generate top level object defaulters (`v1.Pod`) at build time for any type that needs to perform defaulting.  
* Add tests and alter the existing code to adapt as necessary
* Fix a few bugs in conversions that depended on defaulting behavior

---

Step 1 of decoupling conversion and defaulting. The generator will assist in creating top level defaulters that in a single method invoke all nested defaulters, preventing the need to recurse via reflection or conversion. These top level defaulters will be registered in the scheme and invoked instead of the nested recursion path. This will set the stage for a future generator, capable of creating defaulters from embedded struct tags on external types. However, we must gradually switch these over.

The immediate goal here is to split defaulting and conversion so that the unsafe convertor can be used to maximum potential (we would be able to use direct memory conversion for any identical nested struct, even those that must be defaulted).

The generator uses `k8s:defaulter-gen=TypeMeta` on most public packages to flag any top level type that has defaulters to get a `SetObjectDefaults_NAME` function created (types that don't have defaulters won't have functions).  This also creates a `RegisterDefaults` method that applies a default to an interface{} and returns true if the object was handled.  Existing defaults are left as is.

Add a test to verify old and new path generate the same outcomes.  Defaulter will move to gengo before this is merged, and subsequent PRs will remove defaulting during conversion and have the VersioningCodec apply defaults.
2016-10-18 20:34:13 -07:00
Kubernetes Submit Queue 29af9853fe Merge pull request #35047 from deads2k/controller-11-rs-flakes
Automatic merge from submit-queue

fix more RS controller flakes

I saw another flake:

```
panic: Fail in goroutine after TestUpdatePods has completed
/usr/local/go/src/runtime/panic.go:500 +0x1ae
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:56 +0x17d
/usr/local/go/src/runtime/panic.go:458 +0x271
/usr/local/go/src/testing/testing.go:412 +0x182
/usr/local/go/src/testing/testing.go:484 +0x95
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/controller/replicaset/replica_set_test.go:619 +0x1d2
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/controller/replicaset/replica_set.go:414 +0x191
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/controller/replicaset/replica_set.go:403 +0x39
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/controller/replicaset/replica_set.go:169 +0x42
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:87 +0x70
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:88 +0xbe
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:49 +0x5b
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/controller/replicaset/replica_set_test.go:625 +0x369
```

This resolves that by separating the listers from the watch like it used to be in this set of tests.  The tests were like this before the refactor.  I think they limit utility, but I'm not prepared to re-write them all.

@kargakis
2016-10-18 19:52:48 -07:00
Kubernetes Submit Queue 2832efabd7 Merge pull request #34804 from YuPengZTE/devTypos
Automatic merge from submit-queue

Clean up typos in links in README

**What this PR does / why we need it**:
Clean up the link in README for mysql-wordpress-pd and nfs

Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
2016-10-18 19:10:50 -07:00
Kubernetes Submit Queue c1b342b1fb Merge pull request #35063 from slang800/patch-1
Automatic merge from submit-queue

Change link to official Ceph Kubernetes docs
2016-10-18 19:10:39 -07:00
Kubernetes Submit Queue 20841a5b0e Merge pull request #34537 from AdoHe/get_info
Automatic merge from submit-queue

kubectl get print filter info use verbose

add a quick fix #34469
2016-10-18 19:10:27 -07:00
Kubernetes Submit Queue 103dc654a9 Merge pull request #35023 from k82cn/remove_empty_line
Automatic merge from submit-queue

Removed empty line.
2016-10-18 18:27:29 -07:00
Clayton Coleman 957c0955aa
Run defaulting on the scheduler startup 2016-10-18 21:07:35 -04:00
Clayton Coleman 3ee591d7ab
Invoke init container defaulting in conversion
Because annotations...

Remove old references to DefaultingInterface in manual conversions.
2016-10-18 21:07:35 -04:00
Clayton Coleman 1694cfb72d
Make defaulting part of versioning codec
Most normal codec use should perform defaulting. DirectCodecs should not
perform defaulting. Update the defaulting_test to fuzz the list of known
defaulters. Use the new versioning.NewDefaultingCodec() method.
2016-10-18 21:07:35 -04:00
Clayton Coleman 742fb698d4
generated: Remove defaulting from conversion 2016-10-18 21:07:34 -04:00
Clayton Coleman f294175d60
Make defaulting optional during conversion generation
Set the Kubernetes default to "no defaulting"
2016-10-18 21:07:34 -04:00
Clayton Coleman 4f8d1a86e5
Add a defaulting test that verifies old and new defaults are equivalent 2016-10-18 21:07:34 -04:00
Clayton Coleman 89b3a0d863
Register new defaulting functions 2016-10-18 21:07:34 -04:00
Clayton Coleman 745690a2d4
generated: Defaulters 2016-10-18 21:07:33 -04:00
Clayton Coleman 4324e39393
Flag all packages as needing defaulters 2016-10-18 21:07:33 -04:00
Clayton Coleman ca6fc3a68b
Update makefile to generate defaulters 2016-10-18 21:07:33 -04:00
Clayton Coleman 1c49fc57ed
Create a generator for defaulters
Given an object that wishes to have a top level defaulter, traverse the
object looking for nested fields that have defaulters and generate a
single function for that type that invokes all defaulters. The function
will have the name `SetObjectDefaults_NAME`.

Types use `// +k8s:defaulter-gen=true` to indicate they wish a defaulter
generated. If a function already exists with the desired name
`SetObjectDefaults_NAME` then no generation will occur. At a package
level, authors can bulk select the types to generate by setting the
value of the comment to the name of a field - all objects with that
field name without `// +k8s:defaulter-gen=false` defined on the type
will get a defaulter.

Because the defaulting behavior from conversions happens recursively,
all defaulters are expected to be invoked. We call these defaulters
"non-covering" (other defaulters may be invoked beneath them). The
defaulters we generate, by comparison, are "covering" - no nested
defaulters should be invoked. To distinguish between these two types, we
introduce the `// +k8s:defaulter-gen=covers` comment on a defaulter
function which will instruct the generator that the function should
terminate recursion.

This sets the stage for future defaulter generation from comments by
subsuming our existing generators
2016-10-18 21:07:32 -04:00
Clayton Coleman 5062406b77
Hand generated conversion should check nil 2016-10-18 21:07:32 -04:00
Clayton Coleman 0aa8da19a9
Move old defaulters to public functions
Also make Deployment defaulting resilient to fuzzing
2016-10-18 21:07:32 -04:00
Clayton Coleman 68a9983ec7
Add a new Default() method on Scheme
Allow defaulter functions to be registered with the scheme.
2016-10-18 21:07:32 -04:00
Clayton Coleman 85368d070b
bump(k8s.io/gengo):4a9ebbace691333e73f9978d798b1bad6c53a50d 2016-10-18 21:07:28 -04:00
Dawn Chen 6339b32a93 Collect resource usage test with 0 pod for node benchmark. 2016-10-18 17:38:09 -07:00
Kubernetes Submit Queue b844a0722c Merge pull request #35060 from ixdy/get-kube-binaries-script
Automatic merge from submit-queue

Add option to get-kube-binaries.sh to download and extract tests

A follow-on to #33701.

My goal is to use `cluster/get-kube.sh` and `cluster/get-kube-binaries.sh` instead of the custom download/extraction logic in `e2e-runner.sh`. In addition to simplifying the logic, it'll also allow me to properly test removing the arch-specific binaries from `kubernetes.tar.gz`.

Anyone on @kubernetes/test-infra-maintainers want to take a look?
2016-10-18 17:03:44 -07:00