Commit Graph

605 Commits (8e26fa25da6d3b1deb333fe2484f794795d1c6b9)

Author SHA1 Message Date
Kubernetes Submit Queue d5ff69468e Merge pull request #29378 from vefimova/docker_resolv
Automatic merge from submit-queue

Re-writing of the resolv.conf file generated by docker

Fixes #17406 

Docker 1.12 will contain feature "The option --dns and --net=host should not be mutually exclusive" (docker/docker#22408)
This patch adds optional support for this ability in kubelet (for now in case of "hostNetwork: true" set all dns settings are ignored if any).
To enable feature use newly added kubelet flag: --allow-dns-for-hostnet=true
2017-03-01 14:19:08 -08:00
Chao Xu aae25271d9 generated 2017-03-01 14:19:06 -08:00
Chao Xu b326064d45 copy.sh rewrites rev of apimachinery with dummy rev in Godeps.json; remove _vendor 2017-03-01 14:13:10 -08:00
Jess Frazelle cc3166e2d7
fix client-go
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-03-01 13:05:47 -08:00
Jess Frazelle 5bb53133a9
update staging client
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-03-01 13:05:44 -08:00
Chao Xu 19fc6a5d21 ignore base.go 2017-03-01 10:33:41 -08:00
Kubernetes Submit Queue c713ef434d Merge pull request #42327 from deads2k/api-06-debug
Automatic merge from submit-queue

show patch error as string not byte slice

Debugging for https://github.com/kubernetes/kubernetes/issues/39471 shows

```
client_test.go:309: Failed updating patchpod with patch type application/json-patch+json: Operation cannot be fulfilled on pods "patchpod": there is a meaningful conflict:
	 diff1=[123 34 109 101 116 97 100 97 116 97 34 58 123 34 108 97 98 101 108 115 34 58 123 34 102 111 111 34 58 110 117 108 108 125 44 34 114 101 115 111 117 114 99 101 86 101 114 115 105 111 110 34 58 34 49 52 50 50 34 125 125]
	, diff2=[123 34 109 101 116 97 100 97 116 97 34 58 123 34 108 97 98 101 108 115 34 58 110 117 108 108 125 125]
```

I don't speak byte slice, so this makes it a string for next time.

@sttts
2017-03-01 10:18:42 -08:00
vefimova fc8a37ec86 Added ability for Docker containers to set usage of dns settings along with hostNetwork is true
Introduced chages:
   1. Re-writing of the resolv.conf file generated by docker.
      Cluster dns settings aren't passed anymore to docker api in all cases, not only for pods with host network:
      the resolver conf will be overwritten after infra-container creation to override docker's behaviour.

   2. Added new one dnsPolicy - 'ClusterFirstWithHostNet', so now there are:
      - ClusterFirstWithHostNet - use dns settings in all cases, i.e. with hostNet=true as well
      - ClusterFirst - use dns settings unless hostNetwork is true
      - Default

Fixes #17406
2017-03-01 17:10:00 +00:00
deads2k ea887557d3 show patch error as string not byte slice 2017-03-01 11:32:16 -05:00
deads2k 49f8a37c64 discovery restmapping should always prefer /v1 2017-03-01 10:59:23 -05:00
Maciej Szulik b844f7d4a4 Staging changes for apps/v1beta1.deployments 2017-03-01 15:14:41 +01:00
Maciej Szulik 1f04d9353e Remove comment from all staging Godeps.json 2017-03-01 12:56:39 +01:00
Maciej Szulik 44bc6dadde Godeps updater should ignore comments 2017-03-01 12:56:06 +01:00
Kubernetes Submit Queue 3afefae02a Merge pull request #38676 from caesarxuchao/sync-gc
Automatic merge from submit-queue (batch tested with PRs 38676, 41765, 42103, 41833, 41702)

Add synchronous garbage collection

Fix https://github.com/kubernetes/kubernetes/issues/29891.

Split into five commits:
1. generated: don't need review
2. API: got reviewed in #38678, i addressed @lavalamp's comments there.
3. registry changes: @nikhiljindal could you help take a look?
4. gc changes: reviewed by @deads2k in #38679. It needs another pass.
5. tests: @lavalamp @deads2k could take a look?

TODO:
- [ ] Update doc. Note that the existing doc has been refactored in https://github.com/kubernetes/kubernetes.github.io/pull/2488.
- [ ] add an admission controller to check if a user can set OwnerReference.BlockOwnerDeletion
- [ ] https://github.com/kubernetes/kubernetes/pull/38676#discussion_r103277274
- [ ] split the unit tests garbagecollector_test.go according to the components tested.
- [ ] try if it's practically safe to use the cached object status in attempToDeleteItem(), after synchronous GC feature is stable. (Also see https://github.com/kubernetes/kubernetes/pull/38676#discussion_r103056971)
- [ ] add blockOwnerDeletion for rs adoption https://github.com/kubernetes/kubernetes/pull/38679#discussion_r93817284
- [ ] https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/38676/pull-kubernetes-e2e-gce-etcd3/20101/ (improve the log message)

```release-note
Added foreground garbage collection: the owner object will not be deleted until all its dependents are deleted by the garbage collector. Please checkout the [user doc](https://kubernetes.io/docs/concepts/abstractions/controllers/garbage-collection/) for details.
deleteOptions.orphanDependents is going to be deprecated in 1.7. Please use deleteOptions.propagationPolicy instead.
```
2017-03-01 01:44:02 -08:00
Kubernetes Submit Queue 499f089230 Merge pull request #42178 from derekwaynecarr/decode-node-list-spam
Automatic merge from submit-queue (batch tested with PRs 41597, 42185, 42075, 42178, 41705)

stop spamming logs on restart of api server

**What this PR does / why we need it**:
This PR reduces an excessive amount of log spam on startup of any API server with larger amounts of content.  We have experienced server restart times ~5 minutes that is a consequence of us tracing each directory in etcd during our initial decoding.  This spams the journald process, and results in much of those messages getting rate limited and dropped, and making actual problems much harder to debug.  This stops us logging discrete keys in favor of just knowing that an operation was slow for the particular object type (which is enough information!)

this PR also makes it so we know what trace operation was ended in our log messages!

sample log now:

```
Trace "decodeNodeList *[]api.PolicyBinding" (started 2017-02-20 22:20:33.98771112 +0000 UTC)
Decoded 10718 nodes
decodeNodeList *[]api.PolicyBinding [500ms] END
```
2017-03-01 00:36:09 -08:00
Kubernetes Submit Queue f1939a77b7 Merge pull request #42075 from deads2k/agg-22-auth-auto
Automatic merge from submit-queue (batch tested with PRs 41597, 42185, 42075, 42178, 41705)

auto discovery CA for extension API servers

This is what the smaller pulls were leading to.  Only the last commit is unique and I expect I'll still tweak some pod definitions, but this is where I was going.

@sttts @liggitt
2017-03-01 00:36:07 -08:00
Kubernetes Submit Queue 17b6c17536 Merge pull request #42185 from smarterclayton/watch_log
Automatic merge from submit-queue (batch tested with PRs 41597, 42185, 42075, 42178, 41705)

Don't log context or full request URI due to security concerns
2017-03-01 00:36:04 -08:00
Chao Xu 93686da104 registry changes 2017-02-28 23:05:41 -08:00
Chao Xu 5bfacf59f6 API 2017-02-28 23:05:40 -08:00
Chao Xu e4aa9db258 generated 2017-02-28 23:05:40 -08:00
Jordan Liggitt cfb1cd486e
Apply custom defaults to init containers 2017-03-01 01:50:30 -05:00
Kubernetes Submit Queue 992b18065d Merge pull request #42183 from sttts/sttts-bool-parse-warning
Automatic merge from submit-queue (batch tested with PRs 42216, 42136, 42183, 42149, 36828)

Fix bool parse warning in apimachinery

```golang
var DefaultConverter = NewConverter(parseBool(os.Getenv("KUBE_PATCH_CONVERSION_DETECTOR")))
func parseBool(key string) bool {
	value, err := strconv.ParseBool(key)
	if err != nil {
		utilruntime.HandleError(fmt.Errorf("Couldn't parse '%s' as bool for unstructured mismatch detection", key))
	}
	return value
}
````

leading to

```
W0227 10:06:01.037] E0227 10:06:01.023502   16550 converter.go:87] Couldn't parse '' as bool for unstructured mismatch detection
```
2017-02-28 21:17:00 -08:00
Clayton Coleman 60d8365751
Server timeout returns an incorrect error
Not a valid Status object in JSON
2017-02-28 19:21:06 -05:00
Aditya Dani 28df55fc31 Portworx Volume Driver in Kubernetes
- Add a new type PortworxVolumeSource
- Implement the kubernetes volume plugin for Portworx Volumes under pkg/volume/portworx
- The Portworx Volume Driver uses the libopenstorage/openstorage specifications and apis for volume operations.

Changes for k8s configuration and examples for portworx volumes.

- Add PortworxVolume hooks in kubectl, kube-controller-manager and validation.
- Add a README for PortworxVolume usage as PVs, PVCs and StorageClass.
- Add example spec files

Handle code review comments.

- Modified READMEs to incorporate to suggestions.
- Add a test for ReadWriteMany access mode.
- Use util.UnmountPath in TearDown.
- Add ReadOnly flag to PortworxVolumeSource
- Use hostname:port instead of unix sockets
- Delete the mount dir in TearDown.
- Fix link issue in persistentvolumes README
- In unit test check for mountpath after Setup is done.
- Add PVC Claim Name as a Portworx Volume Label

Generated code and documentation.
- Updated swagger spec
- Updated api-reference docs
- Updated generated code under pkg/api/v1

Godeps update for Portworx Volume Driver
- Adds github.com/libopenstorage/openstorage
- Adds go.pedge.io/pb/go/google/protobuf
- Updates Godep Licenses
2017-02-28 23:24:56 +00:00
Jordan Liggitt 6951023759
Only set a groupresource on errors if a resource was specified 2017-02-28 15:46:15 -05:00
deads2k 3d039f60cf allow incluster authentication info lookup 2017-02-28 13:29:59 -05:00
deads2k 1cb582a03a add roles and bindings for bootstrap controllers 2017-02-28 13:14:58 -05:00
Kubernetes Submit Queue b26fb689f6 Merge pull request #42059 from deads2k/agg-19-integration-test
Automatic merge from submit-queue (batch tested with PRs 35094, 42095, 42059, 42143, 41944)

add aggregation integration test

Wires up an integration test which runs a full kube-apiserver, the wardle server, and the kube-aggregator and creates the APIservice object for the wardle server.  Without services and DNS the aggregator doesn't proxy, but it does ensure we don't have an obvious panic or bring up failure.

@sttts @ncdc
2017-02-28 09:20:16 -08:00
Jordan Liggitt 0cf9b0df56
Fix panic on nil invalid field error 2017-02-28 10:46:17 -05:00
Dr. Stefan Schimanski fc6d87c0a2 Update client 2017-02-28 15:34:34 +01:00
Dr. Stefan Schimanski ee8ce696d6 client-gen: create private registry for fake clientset 2017-02-28 15:25:10 +01:00
deads2k 5cfe26dece add aggregation integration test 2017-02-28 08:42:06 -05:00
Kubernetes Submit Queue 4a17b8b100 Merge pull request #42067 from deads2k/agg-21-cleanup-default
Automatic merge from submit-queue

clean up generic apiserver options

Clean up generic apiserver options before we tag any levels.  This makes them more in-line with "normal" api servers running on the platform.

Also remove dead example code.

@sttts
2017-02-28 05:23:34 -08:00
Eric Chiang 6891505db9 apiserver/pkg/server: include scheme in insecure self client config 2017-02-27 14:02:36 -08:00
Dr. Stefan Schimanski f11d76ae44 Update client 2017-02-27 22:01:57 +01:00
Dr. Stefan Schimanski 395be3b401 apimachinery: handle duplicated and conflicting type registration 2017-02-27 21:58:21 +01:00
Dr. Stefan Schimanski 6050f59b7b apimachinery: merge Scheme.AddKnownTypes and Scheme.AddKnownTypeWithName 2017-02-27 21:58:21 +01:00
Derek Carr 9211e0380f stop spamming logs on restart of api server 2017-02-27 15:14:09 -05:00
Clayton Coleman f6300555f4
Don't log context or full request URI due to security concerns
These lines may contain information that cannot be safely logged to
disk. Only deal with known parameters, also bump to V(2) to be
consistent with other logging.
2017-02-27 14:35:16 -05:00
Dr. Stefan Schimanski 1900810f97 Fix bool parse warning in apimachinery 2017-02-27 19:56:39 +01:00
Dr. Stefan Schimanski 3f2056e498 Update client-go 2017-02-27 14:18:04 +01:00
deads2k acba2cbd6d tweak defaults for recommended apiserver options 2017-02-27 07:47:19 -05:00
Kubernetes Submit Queue 8124705c81 Merge pull request #41987 from sttts/sttts-verify-staging-client-go-unify-with-copy-sh
Automatic merge from submit-queue (batch tested with PRs 42044, 41694, 41927, 42050, 41987)

Simplify and fix hack/{verify,update}-staging-{client-go,godeps}.sh

- merge `hack/{verify,update}-staging-client-go.sh`
- pin godep with shared code
- remove godep-restore completely from the process and replace with a simple check that godeps are restored
- add safety check in `staging/copy.sh` that there is no lingering `k8s.io/apimachinery` in the GOPATH which would lead to inconsistent client-go builds (!)
- check that all these scripts only operate in a clean working dir.
2017-02-26 23:16:56 -08:00
Kubernetes Submit Queue 082cfac707 Merge pull request #35408 from xilabao/add-secret-to-pflag
Automatic merge from submit-queue (batch tested with PRs 35408, 41915, 41992, 41964, 41925)

add secret option to flag

To resolve the issue of security(pr #35030 ),

> @smarterclayton commented 5 days ago
> This is unfortunately not all flags that could be secrets. The best option would be to add support in spf13/pflag to tag a flag as a secret, and then use that bit to determine the list.
> 
> Also, Command() could be used in contexts that need exact parameters (for subshell execution), so we would need to add a new method or extend the signature here to allow exact flags to be retrieved.

we could add a secret option to the flags.
2017-02-26 18:07:53 -08:00
Kubernetes Submit Queue 945b041fab Merge pull request #41165 from nikhiljindal/del202
Automatic merge from submit-queue (batch tested with PRs 41954, 40528, 41875, 41165, 41877)

Updating apiserver to return 202 when resource is being deleted asynchronously via cascading deletion

As per https://github.com/kubernetes/kubernetes/issues/33196#issuecomment-278440622.

cc @kubernetes/sig-api-machinery-pr-reviews @smarterclayton @caesarxuchao @bgrant0607 @kubernetes/api-reviewers 

```release-note
Updating apiserver to return http status code 202 for a delete request when the resource is not immediately deleted because of user requesting cascading deletion using DeleteOptions.OrphanDependents=false.
```
2017-02-26 14:54:54 -08:00
Kubernetes Submit Queue 44dcde0c59 Merge pull request #40522 from wojtek-t/use_new_conversions_in_patch
Automatic merge from submit-queue (batch tested with PRs 41857, 41864, 40522, 41835, 41991)

Use new conversions in patch

Ref #39017
2017-02-26 11:13:55 -08:00
Kubernetes Submit Queue 5c3791b9e0 Merge pull request #41729 from smarterclayton/refactor_printers
Automatic merge from submit-queue (batch tested with PRs 41621, 41946, 41941, 41250, 41729)

Refactor printers and describers into their own package.

This sets the stage for using printer code from the server side (decoupled from kubectl) and loosens the coupling between kubectl and the printers. `pkg/printers` contains interfaces and has an import restriction against pulling in API specific code, while `pkg/printers/internalversion` can be used for internal types.

Add a method on `Factory` for retrieving PrinterForCommand which uses the Scheme and RESTMapper from the Factory, not the hardcoded ones.  This further separates kubectl from the core API scheme and allows better composition.

Change NamePrinter to use RESTMapper (previously it was hardcoding those conversions). This means that we now return plural resource names (`pods/foo`) but is correct once aliases and shortnames start being returned by the mapper.

This is a prerequisite for server side get, but is pure refactor (contains no new features).

@deads2k @liggitt
2017-02-26 06:47:03 -08:00
Kubernetes Submit Queue cb17b636a8 Merge pull request #42094 from sttts/sttts-sample-apiserver-OWNERS
Automatic merge from submit-queue (batch tested with PRs 42106, 42094, 42069, 42098, 41852)

Add OWNERS for sample-apiserver in staging
2017-02-26 04:33:57 -08:00
Dr. Stefan Schimanski 0b07908358 staging/copy.sh: add safety check for k8s.io/apimachinery/ in GOPATH 2017-02-25 22:39:15 +01:00
Dr. Stefan Schimanski dd9219f304 update-staging-{client-go,godeps}.sh: no godep-restore, pin godep, check workdir 2017-02-25 22:38:23 +01:00
xilabao 131802a5cd add secret flag to options 2017-02-25 23:40:50 +08:00
xilabao db65bed243 godep update github.com/spf13/pflag 2017-02-25 23:39:22 +08:00
Kubernetes Submit Queue 1a46a167f3 Merge pull request #41882 from sttts/sttts-loopback-selfsigned-cert
Automatic merge from submit-queue

apiserver: self-signed in-memory cert for loopback

We had complicated logic before to find a matching (SNI- or server-) cert for the loopback device. In the worst case, bootstrapping failed because the provided certs didn't have the binding IP or localhost.

We now pass an artifical `ServerName` "apiserver-loopback-client" with the loopback client and install a self-signed in-memory cert+key into the server for that hostname. The client accepts the corresponding cert.

Fixing https://github.com/kubernetes/kubernetes/issues/41081
2017-02-25 06:23:17 -08:00
Kubernetes Submit Queue 0ace44346c Merge pull request #41590 from deads2k/agg-16-hyperkube
Automatic merge from submit-queue (batch tested with PRs 41854, 41801, 40088, 41590, 41911)

add kube-aggregator to hyperkube

Adds kube-aggregator to hyperkube.

@lavalamp @pwittrock @kubernetes/sig-api-machinery-misc @smarterclayton 

Google publishes a hyperkube image somewhere, right?
2017-02-25 05:02:56 -08:00
Dr. Stefan Schimanski 9f7aa7a760 Add OWNERS for sample-apiserver in staging 2017-02-25 10:25:54 +01:00
linyouchong 506b88e070 update kubeconfig document url in comments 2017-02-24 19:20:32 +08:00
Kubernetes Submit Queue 46dda7e32a Merge pull request #41821 from deads2k/apiserver-15-healthz
Automatic merge from submit-queue

redact detailed errors from healthz and expose in default policy

Makes `/healthz` less sensitive and exposes it by default.

@kubernetes/sig-auth-pr-reviews @kubernetes/sig-api-machinery-misc @liggitt
2017-02-24 00:22:55 -08:00
Kubernetes Submit Queue e5c2d716d9 Merge pull request #41887 from liggitt/watch-verb
Automatic merge from submit-queue (batch tested with PRs 39855, 41433, 41567, 41887, 41652)

Use watch param instead of deprecated /watch/ prefix

Reopen of https://github.com/kubernetes/kubernetes/pull/41722 after reverted in https://github.com/kubernetes/kubernetes/pull/41774

Required https://github.com/kubernetes/kubernetes/pull/41797 to merge first

cc @deads2k @wojtek-t
2017-02-23 09:36:35 -08:00
Wojciech Tyczynski 8a954a7a5c Fix staging Godeps 2017-02-23 10:08:51 +01:00
Wojciech Tyczynski e34e1abe33 Use new runtime.Object <-> map[string]interface{} converter 2017-02-23 09:08:35 +01:00
Dr. Stefan Schimanski 726c46e2da apiserver: self-signed in-memory cert for loopback 2017-02-23 08:06:02 +01:00
Kubernetes Submit Queue 3e3133bc59 Merge pull request #41781 from wojtek-t/dont_use_base64_encoding_with-etcd3
Automatic merge from submit-queue (batch tested with PRs 41797, 41793, 41795, 41807, 41781)

Don't use base64 encoding with etcd v3

In https://github.com/kubernetes/kubernetes/pull/36229 we changed the default storage to etcd v3.

This in fact is a fix to that PR.

With etcd v3, the base64-encoding is no longer needed - so we use it only if etcd v2 is explicitly requested as storage format.

@lavalamp
2017-02-22 22:06:37 -08:00
Kubernetes Submit Queue c6036b6acc Merge pull request #41797 from deads2k/apiserver-14-instrument
Automatic merge from submit-queue (batch tested with PRs 41797, 41793, 41795, 41807, 41781)

tweak a list to a watch verb when requested

Related to https://github.com/kubernetes/kubernetes/pull/41774

@wojtek-t does this do what's needed?
2017-02-22 22:06:30 -08:00
Clayton Coleman a9c03f292b
UnstructuredList should return 'items' set to the children
The set of items is not mutable (can't add or remove items) but the list
now is. Needs to be improved to make mutability is clear.
2017-02-23 00:28:31 -05:00
Kubernetes Submit Queue e49f44d89c Merge pull request #41486 from sttts/sttts-clientset-scheme
Automatic merge from submit-queue (batch tested with PRs 41146, 41486, 41482, 41538, 41784)

client-gen: independent scheme for clientsets

This PR adds a clientset internal scheme instead of using `pkg/api.Scheme`. **The clientset API stays the same.**

In detail:

- introduce a scheme for each clientset, i.e. do not use `pkg/api.Scheme+Registry+Codec+ParameterCodecs`.

  This makes it easier to compose client-go's clientset (which is rewritten in `staging/copy.sh` and therefore hardcoded to use `k8s.io/client-go/pkg/api.Scheme+Registry+Codecs+ParameterCodecs`) with third-party clientsets (kube-aggregator, openshift, federation) which are not rewritten using `copy.sh` as all of them are self-contained and therefore relocatable.

  This fixes https://github.com/kubernetes/kubernetes/pull/41403/files#diff-76edfb07dee54ff7ddeda25c33c10d29R81 and prepares client-gen for use in OpenShift.

- register types into the clientset scheme via `AddToScheme` for versioned clientsets. This decouples the client-go clients from announce+registration (internal clients continue using announce+registry and apigroup installers).

  This reduces complexity for client-go, possibly remove the necessity for the announce+register machinery for many use-cases, maybe even to delete it mid-term.
- port federation and testgroup  `install/install.go` to `announced.GroupMetaFactory` in order to have a proper `Install.Install(...)` func for registration.

With the first change it's easy to add the types of one clientset to the scheme of the other using the `clientset/scheme.AddToScheme` method. This allows to use cross-clientset `runtime.RawExtensions`:

```golang
import (
     "k8s.io/client-go/kubernetes"
     clientsetscheme "k8s.io/client-go/kuberentes/scheme"
     aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
)

kclientset, _ := kubernetes.NewForConfig(c)
aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
```
Kubernetes types with a `RawExtension` can en/decode aggregator types after this.

TODO:
- [x] fix fake clientsets
- [x] get the `*Options` types registered correctly for core, compare DO-NOT-MERGE commit.
- [x] get prefered version right in internal client. Do we need all versions registered in the internal client to support negotiation?
- [x] run `staging/copy.sh` and run tests: https://github.com/kubernetes/kubernetes/pull/41744
- ~~[ ] fixup usage through-out the code-base~~
- **Follow-up**: move `import_known_versions.go` files somewhere such that import of the `api.Scheme` package automatically installs the apigroups. It looks like we depended on the import fo the clientset for this purpose.
2017-02-22 21:09:33 -08:00
Kubernetes Submit Queue 7cca0d1867 Merge pull request #41851 from janetkuo/deployment-duplicate-rs
Automatic merge from submit-queue (batch tested with PRs 38957, 41819, 41851, 40667, 41373)

Fix deployment helper - no assumptions on only one new ReplicaSet

#40415

**Release note**:

```release-note
NONE
```

@kubernetes/sig-apps-bugs
2017-02-22 19:59:34 -08:00
Kubernetes Submit Queue 6024f56f80 Merge pull request #38957 from aveshagarwal/master-taints-tolerations-api-fields
Automatic merge from submit-queue (batch tested with PRs 38957, 41819, 41851, 40667, 41373)

Change taints/tolerations to api fields

This PR changes current implementation of taints and tolerations from annotations to API fields. Taint and toleration are now part of `NodeSpec` and `PodSpec`, respectively. The annotation keys: `scheduler.alpha.kubernetes.io/tolerations` and `scheduler.alpha.kubernetes.io/taints`  have been removed.

**Release note**:
Pod tolerations and node taints have moved from annotations to API fields in the PodSpec and NodeSpec, respectively. Pod tolerations and node taints that are defined in the annotations will be ignored. The annotation keys: `scheduler.alpha.kubernetes.io/tolerations` and `scheduler.alpha.kubernetes.io/taints`  have been removed.
2017-02-22 19:59:31 -08:00
Janet Kuo a8506813dc Generated: update staging GoDeps 2017-02-22 13:29:33 -08:00
Seth Jennings 258f54bdf4 fix staging godeps 2017-02-22 12:15:21 -06:00
Dr. Stefan Schimanski 595f4ed2cb Update generated files 2017-02-22 19:03:25 +01:00
Kubernetes Submit Queue e43e663a53 Merge pull request #41650 from deads2k/api-02-godep
Automatic merge from submit-queue

add godep manifest files to staging repos

The staging repos should have manifests that match the godeps of kube so we know what they build against.  We don't need the actual vendored code, since a sync script on the other side needs to find the correct level of other staging directories and thus requires its own `godep restore && go get && godep save` cycle.

@sttts ptal
@lavalamp @caesarxuchao client-go needs a lot of unwinding to do something similar, but the idea is that you can run an acyclic path to get this updated by copying the types and dependencies with `go list`, then generate the clients, then generate this manifest.  Then in your sync script you can pull the proper levels and finish the actual vendoring.
2017-02-22 08:56:27 -08:00
Kubernetes Submit Queue c58266c826 Merge pull request #41532 from ericchiang/kubectl-auth-providers
Automatic merge from submit-queue (batch tested with PRs 41349, 41532, 41256, 41587, 41657)

client-go: don't import client auth provider packages

Both of these auth providers are useful for kubectl but not so much for everyone importing client-go. Let users optionally import them (example [0]) and reduce the overall number of imports that client-go requires.

Quick grep seems to imply it wont import it after.

```
$ grep -r 'client-go/plugin/pkg/client/auth' staging/
staging/src/k8s.io/client-go/plugin/pkg/client/auth/plugins.go:	_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
staging/src/k8s.io/client-go/plugin/pkg/client/auth/plugins.go:	_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
staging/src/k8s.io/client-go/examples/third-party-resources/main.go:	_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go:	_ "k8s.io/client-go/plugin/pkg/client/auth"
staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go:	_ "k8s.io/client-go/plugin/pkg/client/auth"
```

closes https://github.com/kubernetes/client-go/issues/49
updates https://github.com/kubernetes/client-go/issues/79 (removes cloud.google.com/go import)

cc @kubernetes/sig-api-machinery-pr-reviews @kubernetes/sig-auth-pr-reviews 

```release-notes
client-go no longer imports GCP OAuth2 and OpenID Connect packages by default.
```

[0] 8b466d64c5/examples/third-party-resources/main.go (L34-L35)
2017-02-22 08:12:40 -08:00
Avesh Agarwal 9b640838a5 Change taint/toleration annotations to api fields. 2017-02-22 09:27:42 -05:00
Jordan Liggitt 4202489a89
regenerate clients 2017-02-22 08:54:13 -05:00
Jordan Liggitt 7b6ef2cedc
Switch watch prefixes to params 2017-02-22 08:54:08 -05:00
Jordan Liggitt e6dbe5f57e
Pass typed options to dynamic client 2017-02-22 08:53:57 -05:00
Kubernetes Submit Queue e1b174842a Merge pull request #41129 from atlassian/cleanup-client-example
Automatic merge from submit-queue (batch tested with PRs 41844, 41803, 39116, 41129, 41240)

Cleanup client example

**What this PR does / why we need it**:
- Package level `config` variable in `third-party-resources/main.go` is not used, it is shadowed by the one defined in `main()`. Should probably be deleted.
- Package level `kubeconfig ` variable in `out-of-cluster/main.go` is global - make it private to `main()`.

**Which issue this PR fixes**
This fixes https://github.com/kubernetes/client-go/issues/59, except the part about global `api.Scheme`, also adds test with interface check. Supersedes https://github.com/kubernetes/client-go/pull/61.

**Special notes for your reviewer**:
This is my first PR to Kubernetes :)
2017-02-22 05:48:43 -08:00
Kubernetes Submit Queue e8ff10ce29 Merge pull request #39116 from caesarxuchao/fix-event-expansion
Automatic merge from submit-queue (batch tested with PRs 41844, 41803, 39116, 41129, 41240)

core/v1/event_expansion.go use v1.GetReference

Fix https://github.com/kubernetes/client-go/issues/47.
2017-02-22 05:48:40 -08:00
deads2k 4cd0b7cdbe redact detailed errors from healthz and expose in default policy 2017-02-22 07:52:13 -05:00
Wojciech Tyczynski fc3de292be Merge pull request #41731 from heartlock/patch-2
fix misspell "roughly" in config.go
2017-02-22 08:51:27 +01:00
nikhiljindal 2dc404fcb7 Update REST Handler to return 202 for cascading deletion 2017-02-21 11:00:36 -08:00
nikhiljindal 4ee81eb037 Updating tests for deleted boolean from Delete() 2017-02-21 11:00:36 -08:00
nikhiljindal 1d32897eed Updating the registry to return whether the resource was immediately deleted 2017-02-21 11:00:35 -08:00
Chao Xu ec00f67ab3 should use v1.GetReference 2017-02-21 10:35:17 -08:00
Eric Chiang 163f37f775 *: update codegen and bazel 2017-02-21 09:26:03 -08:00
Eric Chiang 58dde796ec client-go: don't import client auth provider packages 2017-02-21 09:26:03 -08:00
deads2k 0625db73db update godep.json files 2017-02-21 09:38:55 -05:00
deads2k a53611ab3e add godep.json to staging repos 2017-02-21 09:38:55 -05:00
deads2k 22e10bbc29 remove cycle that snuck into tests 2017-02-21 08:03:48 -05:00
deads2k ec91c009e7 tweak a list to a watch verb when requested 2017-02-21 07:48:38 -05:00
Kubernetes Submit Queue 43fec5afb5 Merge pull request #41685 from liggitt/edit-refactor-unknown-field
Automatic merge from submit-queue (batch tested with PRs 41709, 41685, 41754, 41759, 37237)

Tolerate unknown fields in strategic merge patch

When using `apply` or `edit` with an object that has a compiled-in struct, if an unknown server-side field is sent, or is present in a provided file, the strategic merge patch computation fails looking up type info from the go struct

If the field only exists in one side of the patch (is being added or removed), or is identical in both sides of the patch, we should tolerate missing type info, since it doesn't affect the patch.
2017-02-21 04:27:46 -08:00
Kubernetes Submit Queue d70dc20e62 Merge pull request #39063 from xingzhou/kube-28678
Automatic merge from submit-queue (batch tested with PRs 41706, 39063, 41330, 41739, 41576)

Added bool type support for jsonpath.

Added keywords "true" and "false" for
supporting bool type in jsonpath.

Fixed #28678
2017-02-21 02:24:39 -08:00
Wojciech Tyczynski ce37b18728 Don't use base64 encoding with etcd v3 2017-02-21 10:31:34 +01:00
Wojciech Tyczynski a21b08d00f Revert "Use watch param instead of deprecated /watch/ prefix" 2017-02-21 08:37:51 +01:00
Jordan Liggitt 06f7e71fd2
Allow strategic patch to deal with unknown fields that don't require merging 2017-02-20 20:40:03 -05:00
Kubernetes Submit Queue 79bef05f2d Merge pull request #36344 from anguslees/gophercloud
Automatic merge from submit-queue (batch tested with PRs 41756, 36344, 34259, 40843, 41526)

Migrate rackspace/gophercloud -> gophercloud/gophercloud

`gophercloud` is the go library we use to interact with openstack.  It has recently been renamed and incorporated a number of breaking code cleanups.  This change migrates the Kubernetes openstack code (openstack provider, keystone auth, cinder volumes) to the new library.

Fixes #30404

```release-note
The openstack cloud provider config no longer supports the deprecated `api-key` option. 
```

Note this PR doesn't change the rackspace provider.  It uses some rackspace-specific APIs and continues to use the older rackspace/gophercloud library.
2017-02-20 13:39:36 -08:00
Kubernetes Submit Queue 894b987a74 Merge pull request #41454 from fate-grand-order/patch-1
Automatic merge from submit-queue

fix misspell "underlying" in cacher.go
2017-02-20 11:22:40 -08:00
Kubernetes Submit Queue dfacc61c5f Merge pull request #41722 from liggitt/watch-prefix
Automatic merge from submit-queue (batch tested with PRs 41421, 41440, 36765, 41722)

Use watch param instead of deprecated /watch/ prefix

Switches clients to use watch param instead of /watch/ prefix

```release-note
Clients now use the `?watch=true` parameter to make watch API calls, instead of the `/watch/` path prefix
```
2017-02-20 10:37:44 -08:00
Kubernetes Submit Queue 21ee9f208c Merge pull request #41421 from liggitt/patch-proxy
Automatic merge from submit-queue

Support PATCH operation in root proxy

Not sure if we want to continue to expand the root proxy capabilities, but if we do, this fixes #40383
2017-02-20 10:34:39 -08:00
jg Chen 268a1306b4 fix misspell "roughly" in config.go 2017-02-20 12:52:00 +08:00
Jordan Liggitt 029cf08e6f
regenerate clients 2017-02-19 23:51:59 -05:00
Jordan Liggitt f950171003
Switch watch prefixes to params 2017-02-19 23:51:58 -05:00
Jordan Liggitt 308fdcd13f
Pass typed options to dynamic client 2017-02-19 22:12:55 -05:00
Angus Lees c077c30004 Migrate rackspace/gophercloud -> gophercloud/gophercloud
This change migrates the 'openstack' provider and 'keystone'
authenticator plugin to the newer gophercloud/gophercloud library.

Note the 'rackspace' provider still uses rackspace/gophercloud.

Fixes #30404
2017-02-20 11:03:05 +11:00
Kubernetes Submit Queue 4a75c1b2aa Merge pull request #41617 from timothysc/affinity_annotations_flaggate
Automatic merge from submit-queue (batch tested with PRs 39373, 41585, 41617, 41707, 39958)

Feature-Gate affinity in annotations 

**What this PR does / why we need it**:
Adds back basic flaggated support for alpha Affinity annotations

**Special notes for your reviewer**:
Reconcile function is placed in the lowest common denominator, which in this case is schedulercache, because you can't place flag-gated functions in apimachinery. 

**Release note**:

```
NONE
```

/cc @davidopp
2017-02-19 13:50:40 -08:00
Kubernetes Submit Queue eb8e1dd5f1 Merge pull request #41021 from jcbsmpsn/rotate-certificate
Automatic merge from submit-queue (batch tested with PRs 41043, 39058, 41021, 41603, 41414)

Rotate the kubelet certificate when about to expire.

Changes the kubelet so it doesn't use the cert/key files directly for
starting the TLS server. Instead the TLS server reads the cert/key from
the new CertificateManager component, which is responsible for
requesting new certificates from the Certificate Signing Request API on
the API Server.
2017-02-19 00:58:45 -08:00
Kubernetes Submit Queue 4bae7f18a5 Merge pull request #41043 from soltysh/issue20208
Automatic merge from submit-queue (batch tested with PRs 41043, 39058, 41021, 41603, 41414)

Allow setting replace patchStrategy for structs

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

@liggitt and @ymqytw ptal, you were in the original issue
2017-02-19 00:58:37 -08:00
Timothy St. Clair 2bcd63c524 Cleanup work to enable feature gating annotations 2017-02-18 09:25:57 -06:00
Robert Rati 32c4683242 Feature-Gate affinity in annotations 2017-02-18 09:08:38 -06:00
Jacob Simpson 855627e5cb Rotate the kubelet certificate when about to expire.
Changes the kubelet so it doesn't use the cert/key files directly for
starting the TLS server. Instead the TLS server reads the cert/key from
the new CertificateManager component, which is responsible for
requesting new certificates from the Certificate Signing Request API on
the API Server.
2017-02-17 17:42:35 -08:00
Wojciech Tyczynski 924e9a5b3a Unified unstructured converter interface and setup 2017-02-17 21:07:04 +01:00
Wojciech Tyczynski 975db6ff9a Detection of failed unstructured conversions. 2017-02-17 18:58:16 +01:00
Wojciech Tyczynski edb36d4df7 Minor cleanup in unstructured converter 2017-02-17 18:56:55 +01:00
deads2k 612a8fafb8 add kube-aggregator to hyperkube 2017-02-17 08:13:11 -05:00
Dr. Stefan Schimanski 3a6469c5ac staging/src/*: run gofmt 2017-02-17 08:51:32 +01:00
Kubernetes Submit Queue dfd4e6ba0b Merge pull request #41431 from jcbsmpsn/split-make-csr
Automatic merge from submit-queue (batch tested with PRs 38101, 41431, 39606, 41569, 41509)

Split MakeCSR for new signature.
2017-02-16 15:49:15 -08:00
Kubernetes Submit Queue 1e5f7c7641 Merge pull request #41514 from deads2k/agg-14-register-in-local
Automatic merge from submit-queue (batch tested with PRs 41505, 41484, 41544, 41514, 41022)

several issues hit while trying to make it easy to register APIs

I was trying to create a script that would register all API versions on a given server and ended up hitting several problems.  These are the fixes.

@sttts I suspect that I won't be able to continue down the host-network approach, since that means I won't be able to use in-cluster DNS without some finagling.  It *could* be set up (and we make it work as a for instance), but the simple enablement approach will be hosted on the infrastructure.  I'll go back to that.
2017-02-16 14:28:21 -08:00
Mikhail Mazurskiy 8af6cea1eb
Test for types 2017-02-17 08:42:46 +11:00
Mikhail Mazurskiy 70eef5b3e1
Remove global variables 2017-02-17 08:40:15 +11:00
Kubernetes Submit Queue 2509ab0c7a Merge pull request #41416 from smarterclayton/error_panic
Automatic merge from submit-queue (batch tested with PRs 41466, 41456, 41550, 41238, 41416)

Don't use json.Marshal when printing error bodies

Internal types panic when json.Marshal is called to prevent accidental
use.

Fixes #40491
2017-02-16 10:14:12 -08:00
deads2k b53b7f2062 make the on-infrastructure of kube-aggregator case easier 2017-02-16 09:31:20 -05:00
deads2k 23b22d645e stop registering the same group multiple times 2017-02-16 09:28:55 -05:00
deads2k a8409af5b5 add script to register everything 2017-02-16 09:28:55 -05:00
Dr. Stefan Schimanski 3a963b0da5 pkg/api/testing: add deepcopy smoke test to roundtrip test 2017-02-16 10:19:42 +01:00
Kubernetes Submit Queue 28123f959c Merge pull request #37137 from ingvagabund/stop-controller-when-the-stop-channel-is-closed
Automatic merge from submit-queue

Stop controller when the stop channel is closed (when queue is empty and Pop is hanging)

Fixes: #28158

When a ``Pop`` function is invoked over empty queue, the control loop inside the functions is stacked indefinitely. In order to break the loop, introduce logic that waits for a signal to exit the loop.

Intention of the PR is not to handle situation where manipulation operations are invoked over closed queue. Intention is to break the indefinite loop.
2017-02-15 19:35:48 -08:00
Kubernetes Submit Queue 92360ffc5f Merge pull request #41439 from deads2k/apiserver-12-sample-fuzz
Automatic merge from submit-queue (batch tested with PRs 41104, 41245, 40722, 41439, 41502)

add sample fuzzing tests

Make fuzzing tests as simple as possible from both the API installer and the scheme, so its easy to add for api groups and so that I can build a scheme and then make sure I got it right.

@kubernetes/sig-api-machinery-pr-reviews @sttts @mikedanese
2017-02-15 16:28:11 -08:00
Kubernetes Submit Queue e73e25422f Merge pull request #40907 from cblecker/clientgo-pem-functions
Automatic merge from submit-queue

Move private key parsing from serviceaccount/jwt.go to client-go/util/cert

**What this PR does / why we need it**:
Unify private key parsing from serviceaccount/jwt.go into the client-go library.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*:
Partial fix to #40807 - only private key functions.

**Special notes for your reviewer**:

**Release note**:

```release-note
Move private key parsing from serviceaccount/jwt.go to client-go/util/cert
```
2017-02-15 14:26:34 -08:00
Clayton Coleman 45ec4e1151
Don't use json.Marshal when printing error bodies
Internal types panic when json.Marshal is called to prevent accidental
use.
2017-02-15 15:44:56 -05:00
Kubernetes Submit Queue 14bdeceeb4 Merge pull request #41474 from wojtek-t/debug_decode_parameters
Automatic merge from submit-queue (batch tested with PRs 41332, 41069, 41470, 41474)

Fix unnecessary conversions in parameter codec.

Fix #41472

@deads2k @smarterclayton @sttts
2017-02-15 10:10:12 -08:00
Kubernetes Submit Queue a2e4d377ec Merge pull request #41470 from kubernetes/revert-41018-revert-40735-avoid_copy_in_cacher
Automatic merge from submit-queue (batch tested with PRs 41332, 41069, 41470, 41474)

"Avoid unnecessary copies in cacher""

This is resend of #40735 (which I reverted when I suspected it to cause issues). But the issue was a completely different. So it's safe to resubmit.
2017-02-15 10:10:10 -08:00
deads2k 2d5fe9d855 add sample fuzzing tests 2017-02-15 10:34:44 -05:00
Kubernetes Submit Queue 5802799e56 Merge pull request #40928 from deads2k/agg-01-local-up
Automatic merge from submit-queue

make kube-aggregator run as static pod for local-up-cluster

Runs the kube-aggregator as a static pod for local-up-cluster.  Looks like someone broke kubectl negotiation again, so I'll fix that up separately.

@kubernetes/sig-api-machinery-misc 
@lavalamp you're probably looking to run kube-aggregator as a static pod, here's an example.
@jwforres I'll make a secure variant for wiring up to openshift.
2017-02-15 07:25:07 -08:00
deads2k 45d274bb52 allow specification of core kubeconfig in aggregator 2017-02-15 09:00:10 -05:00
deads2k c2ac9e5ca3 kube-aggregator manifests based on hostpath 2017-02-15 09:00:10 -05:00
Kubernetes Submit Queue 61ec96781b Merge pull request #41313 from sttts/sttts-apiserver-server-storage
Automatic merge from submit-queue (batch tested with PRs 41134, 41410, 40177, 41049, 41313)

apiserver: further cleanup of apiserver storage plumbing

- move kubeapiserver`s `RESTOptionsFactory` back to EtcdOptions by adding a `AddWithStorageFactoryTo`
- factor out storage backend `Config` construction from EtcdOptions
- move all `StorageFactory` related code into server/storage subpackage.

In short: remove my stomach ache about `kubeapiserver.RESTOptionsFactory`.

approved based on #40363
2017-02-15 05:58:32 -08:00
Wojciech Tyczynski fb78390f83 Fix unnecessary conversions in parameter codec. 2017-02-15 14:03:02 +01:00
Wojciech Tyczynski eb0420e44c Revert "Revert "Avoid unnecessary copies in cacher"" 2017-02-15 11:50:11 +01:00
Dr. Stefan Schimanski 5e77d01897 k8s.io/apiserver: straighten EtcdOptions, backend Config and kube RESTOptionsFactory 2017-02-15 10:24:59 +01:00
Dr. Stefan Schimanski 27e01b5c46 k8s.io/apiserver: fixup imports and renamed packages 2017-02-15 10:24:58 +01:00
Dr. Stefan Schimanski bd41389754 k8s.io/apiserver: move server storage code into subpackage 2017-02-15 10:24:58 +01:00
Jordan Liggitt 9f8b803de8
Create bootstrap system:kube-scheduler role 2017-02-15 01:05:42 -05:00
Kubernetes Submit Queue 69649aa1ce Merge pull request #41413 from deads2k/agg-13-move
Automatic merge from submit-queue (batch tested with PRs 41378, 41413, 40743, 41155, 41385)

move kube-aggregator to staging

Straight move of kube-aggregator to staging.  The scripts are the interesting bits.

@sttts @lavalamp
2017-02-14 19:54:11 -08:00
fate-grand-order e2a6c9f890 fix misspell "underlying" in cacher.go 2017-02-15 10:33:30 +08:00
Kubernetes Submit Queue 3604cdc6a9 Merge pull request #41418 from deads2k/api-02-conversions
Automatic merge from submit-queue (batch tested with PRs 41299, 41325, 41386, 41329, 41418)

move metav1 conversions to metav1

Conversions for `metav1` types belong in metav1 and should be registered when you register the types.

@mikedanese @luxas I think this is what you just hit in your fresh scheme.

@smarterclayton @lavalamp double check the sanity, but I think this does what people expect.
2017-02-14 11:42:40 -08:00
Kubernetes Submit Queue f26890b801 Merge pull request #41329 from deads2k/cli-02-negotiation
Automatic merge from submit-queue (batch tested with PRs 41299, 41325, 41386, 41329, 41418)

stop senseless negotiation

Most client commands don't respect a negotiated version at all.  If you request a particular version, then of course it should be respected, but if you have none to request, then the current negotiation step doesn't return anything useful so we may as well have nothing so we can at least detect the situation.

@jwforres @kubernetes/sig-cli-pr-reviews 

Added a TODO to make the negotiate function useful.  I think I'm inclined to remove it entirely unless someone can come up with a useful reason to have it.
2017-02-14 11:42:38 -08:00
deads2k 1d40c3ff76 update scripts for new kube-aggregator location 2017-02-14 14:16:59 -05:00
deads2k f44c288a21 bulk move of kube-aggregator 2017-02-14 14:16:59 -05:00
Jacob Simpson f4d5af7297 Split MakeCSR for new signature. 2017-02-14 11:14:45 -08:00
Jordan Liggitt e9a1eb4c24
Support PATCH operation in root proxy 2017-02-14 13:00:16 -05:00
deads2k db0b0bd0f5 move metav1 conversions to metav1 2017-02-14 11:47:23 -05:00