Commit Graph

1748 Commits (5a8d0a198c8a50164e2f4926df074943627ec58a)

Author SHA1 Message Date
Kubernetes Submit Queue 27c093ea90 Merge pull request #32048 from smarterclayton/consistent_errors
Automatic merge from submit-queue

Handle Stream() errors consistently in restclient

We should be following the same rules for Stream() as the normal body
request flow.

Also add slightly more output on a server error - in the future we may
want to clean this up but it's potentially hiding bad responses.

Related to #32009 but isn't the fix (so far)
2016-09-15 20:13:48 -07:00
Kubernetes Submit Queue fcc97f37ee Merge pull request #32718 from mikedanese/mv-informer
Automatic merge from submit-queue

move informer and controller to pkg/client/cache

@kubernetes/sig-api-machinery
2016-09-15 16:44:30 -07:00
Mike Danese a765d59932 move informer and controller to pkg/client/cache
Signed-off-by: Mike Danese <mikedanese@google.com>
2016-09-15 12:50:08 -07:00
deads2k 4359c79f53 add FirstHitRESTMapper for adding thirdparty resources 2016-09-15 10:26:39 -04:00
Mike Danese 2cbbaf4384 autogenerated 2016-09-14 16:33:12 -07:00
Kubernetes Submit Queue 9aca785bc8 Merge pull request #32613 from madhusudancs/fed-clientcmd-bug-31947-fix
Automatic merge from submit-queue

Fix clientcmd for a non-host cluster client running in a pod. 

This is based on @errordeveloper's PR #32438. It fixes a case where default config is invalid and original config, i.e. `mergedConfig` is empty. It also adds a test for the case where default config is invalid and original config is neither invalid nor empty.

cc @errordeveloper @kubernetes/sig-cluster-federation @pwittrock @colhom
2016-09-14 13:10:27 -07:00
Madhusudan.C.S c4acaa6717 Add a test to verify that the client config is returned when default config is invalid. 2016-09-13 15:34:56 -07:00
Madhusudan.C.S 0433fe0d72 Do not return original config, i.e. mergeConfig, when it is empty and default config is invalid. 2016-09-13 15:33:51 -07:00
deads2k e5dbfdacc0 generated client 2016-09-13 08:54:23 -04:00
deads2k 8fac64b43f add localSAR 2016-09-13 08:54:23 -04:00
Kubernetes Submit Queue ac8aae584d Merge pull request #32393 from smarterclayton/incluster_namespace
Automatic merge from submit-queue

Allow namespace to be loaded from in-cluster config

This is a follow on from the previous commit that fixed ClientConfig.
Namespace can also be defaulted from ICC, and this correctly handles
that logic. Also add two debugging lines to ensure that it is easier in
the future to uncover problems here.

Fixes #32352

@deads2k
2016-09-13 04:02:21 -07:00
Kubernetes Submit Queue a44d2f8009 Merge pull request #32243 from caesarxuchao/generate-1-5-clientset
Automatic merge from submit-queue

Generate 1 5 clientset

Generate the 1.5 clientset. Stop updating 1.4 clientset. Remove 1.2 clientset.

@nikhiljindal @lavalamp 

I will rebase #31994 atop of this one.
2016-09-12 23:04:50 -07:00
Chao Xu 70d62a93a5 other manual changes 2016-09-12 10:24:18 -07:00
deads2k f756e43e7f convert rolling updater to generated client 2016-09-12 07:38:34 -04:00
deads2k 11c4de457d generated client code 2016-09-12 07:38:34 -04:00
Kubernetes Submit Queue 60b63b7cda Merge pull request #31767 from asalkeld/bad-context-error
Automatic merge from submit-queue

Add a check in ConfirmUsable() to validate the contextName

**What this PR does / why we need it**:
When a context name is provided, but can't be found (miss spelling), it currently
uses the defaults. This PR will cause the command to fail, to prevent unexpected side effects
of using the wrong configuration.

**Which issue this PR fixes**
fixes #21062

**Special notes for your reviewer**:
None

**Release note**:
```release-note
Error if a contextName is provided but not found in the kubeconfig.
```
2016-09-11 02:00:34 -07:00
Kubernetes Submit Queue bc835c608a Merge pull request #31586 from brendandburns/kubectl
Automatic merge from submit-queue

When prompting for passwords, don't echo to the terminal

@deads2k 
@kubernetes/kubectl
2016-09-10 13:58:13 -07:00
Wojciech Tyczynski e240aff741 Revert "Use scale subresource" 2016-09-10 18:35:07 +02:00
Kubernetes Submit Queue a5d6bf4095 Merge pull request #31111 from fraenkel/scale_subresource
Automatic merge from submit-queue

Use scale subresource

Fixes #29698

Use scale subresource for ReplicationController, ReplicaSet and Deployment.
Couldn't do Jobs and PetSet since they live in a different group.
2016-09-10 06:26:25 -07:00
Kubernetes Submit Queue c7d1e38412 Merge pull request #30963 from plutov/master
Automatic merge from submit-queue

Example of unversioned pkg uses correct Config struct

Currently this Doc has incorrect example - https://godoc.org/k8s.io/kubernetes/pkg/client/unversioned

So when developers use it they are confused why `client` pkg has no `Config` struct, actually this is a struct from `restclient` pkg.

Also pkg name and variable name should be equal:
`client, err := client.New(config)`

Thanks,
Alex
2016-09-10 04:27:05 -07:00
Ilya Dmitrichenko a96bd93c0f Check if default config is invalid before comparing it
Changes made in #31947 cause kube-proxy to ignore `--kubeconfig`
and `--master` flags and use in-cluster configuration, which is
unusable due to the fact that VIP hasn't been created yet.
2016-09-10 09:37:41 +02:00
Clayton Coleman d1d20e5340
Allow namespace to be loaded from in-cluster config
This is a follow on from the previous commit that fixed ClientConfig.
Namespace can also be defaulted from ICC, and this correctly handles
that logic. Also add two debugging lines to ensure that it is easier in
the future to uncover problems here.
2016-09-09 17:38:24 -04:00
Chao Xu cd93032cc7 remove release_1_2 2016-09-08 16:03:07 -07:00
Chao Xu ff9da535d3 generated 1.5 release 2016-09-08 16:03:07 -07:00
Kubernetes Submit Queue 7a4d81ea43 Merge pull request #31271 from deads2k/self-sar
Automatic merge from submit-queue

add selfsubjectaccessreview API

Exposes the REST API for self subject access reviews.  This allows a user to see whether or not they can perform a particular action.

@kubernetes/sig-auth
2016-09-08 01:29:48 -07:00
Matt Liggett 108a15db38 Add eviction e2e tests.
Also refactor the test a bit.
2016-09-07 17:38:38 -07:00
Kubernetes Submit Queue 7c27a2686f Merge pull request #31688 from mehdy/master
Automatic merge from submit-queue

updated client document
2016-09-07 16:25:24 -07:00
Kubernetes Submit Queue 184e91bbf6 Merge pull request #32182 from smarterclayton/aggregate_discovery_errors
Automatic merge from submit-queue

Use a structured error rather than an Aggregate error in discovery

Should provide more information for debugging the root cause of
discovery failures.

Exposes the true cause of #32009

@lavalamp @derekwaynecarr
2016-09-07 12:12:58 -07:00
Kubernetes Submit Queue 9f58a867e1 Merge pull request #31522 from krousey/path_validation
Automatic merge from submit-queue

Split path validation into a separate library

This PR splits path segment validation into it's own package. This cuts off one of the restclient's dependency paths to some docker packages, and completely eliminates its dependency on go-restful swagger validation.


cc @kubernetes/sig-api-machinery
2016-09-07 10:14:32 -07:00
Clayton Coleman 88b64a7a82
Use a structured error rather than an Aggregate error in discovery
Should provide more information for debugging the root cause of
discovery failures.
2016-09-07 10:59:03 -04:00
Kubernetes Submit Queue 54db8fa2e3 Merge pull request #31886 from deads2k/move-storage-class
Automatic merge from submit-queue

Move StorageClass to a storage group

We discussed the pros and cons in sig-api-machinery yesterday.  Choosing a particular group name means that clients (including our internal code) require less work and re-swizzling to handle promotions between versions.  Even if you choose a group you end up not liking, the amount of work remains the same as the incubator work case: you move the affected kind, resource, and storage.

This moves the `StorageClass` type to the `storage.k8s.io` group (named for consistency with authentication, authorization, rbac, and imagepolicy).  There are two commits, one for manaul changes and one for generated code.
2016-09-06 23:22:02 -07:00
Kubernetes Submit Queue 9dce773502 Merge pull request #31947 from smarterclayton/check_empty_config
Automatic merge from submit-queue

Check for EmptyConfig errors when trying to use in-cluster config

By removing the default "localhost:8080" behavior several paths in
client config began returning err == ErrEmptyConfig rather than err ==
nil.  The code checking for in cluster config was wrong - the logic
should be:

1. If loading the underlying config returns a non-empty error, fail
2. If the underlying config is not equal to the default config,
   return that config (it has user input)
3. If it is possible to use in-cluster config, do so
4. Otherwise return the default config (and or default EmptyConfig
   error).

Fixes #31910 @thockin @lavalamp @deads2k. We introduced EmptyConfig a very long time ago, but until I removed the "localhost:8080" Kubernetes was not actually exposing it (OpenShift relies on it since we don't set an insecure default). This properly falls through to in-cluster config in the described conditions.



```release-note
Some components like kube-dns and kube-proxy could fail to load the service account token when started within a pod. Properly handle empty configurations to try loading the service account config.
```
2016-09-06 22:02:55 -07:00
Ryan Hitchman 4c7ef6561e Revert "Add e2e tests for eviction subresource." 2016-09-06 16:21:50 -07:00
Clayton Coleman 48b4d6d30c
Check for EmptyConfig errors when trying to use in-cluster config
By removing the default "localhost:8080" behavior several paths in
client config began returning err == ErrEmptyConfig rather than err ==
nil.  The code checking for in cluster config was wrong - the logic
should be:

1. If loading the underlying config returns a non-empty error, fail
2. If the underlying config is not equal to the default config,
   return that config (it's got user input)
3. If it is possible to use in cluster config, do so
4. Otherwise return the default config (and or default EmptyConfig
   error).
2016-09-06 17:46:50 -04:00
Kubernetes Submit Queue 3da5d781fc Merge pull request #31722 from mml/evict.test
Automatic merge from submit-queue

Add e2e tests for eviction subresource.

This branch includes changes pending in both #31638 and #31721.  I will rebase
once those merge.
2016-09-06 14:25:07 -07:00
Matt Liggett c377011138 Add eviction e2e tests.
Also refactor the test a bit.
2016-09-06 11:58:22 -07:00
Wojciech Tyczynski e0779df721 Fix race in DeltaFIFO 2016-09-06 20:48:18 +02:00
deads2k 6320dc6e73 generated code for moving StorageClass 2016-09-06 08:41:17 -04:00
deads2k cd5b6cc491 move StorageClass to its own group 2016-09-06 08:41:17 -04:00
Kubernetes Submit Queue 1c85bbe6cb Merge pull request #31718 from pmorie/fake-client-doc
Automatic merge from submit-queue

Improve doc for the fake client

Improve doc in this type.

cc @derekwaynecarr @ncdc @deads2k
2016-09-05 11:10:23 -07:00
Clayton Coleman 5e6f5fee8a
Handle Stream() errors consistently in restclient
We should be following the same rules for Stream() as the normal body
request flow.

Also add slightly more output on a server error - in the future we may
want to clean this up but it's potentially hiding bad responses.
2016-09-04 14:50:04 -04:00
Kubernetes Submit Queue 11765ab92e Merge pull request #31887 from liggitt/certificates-group
Automatic merge from submit-queue

Namespace certificates API group

New API groups should follow best-practices for naming, including using DNS names within the k8s.io namespace

```release-note
The certificates API group has been renamed to certificates.k8s.io
```
2016-09-02 15:08:55 -07:00
Kubernetes Submit Queue 64c2beae09 Merge pull request #31834 from wongma7/pvc-genclient
Automatic merge from submit-queue

Generate versioned client for pvc

I noticed while trying to use client-go that there is no way to get PVC with versioned clientset. I don't know why it is excluded, I cannot find any discussion about this, so I am creating this assuming it is just an oversight...
2016-09-01 15:01:13 -07:00
Jordan Liggitt a869de61bd
Namespace certificates API group 2016-09-01 14:39:06 -04:00
Angus Salkeld e9cad12e5f Add a check in ConfirmUsable() to validate the contextName 2016-09-01 11:35:11 +10:00
Matthew Wong 934fc002bc Generate versioned client for pvc 2016-08-31 18:57:56 -04:00
Kubernetes Submit Queue 1c607b391a Merge pull request #31721 from mml/disrupt.e2e.versioned
Automatic merge from submit-queue

Rewrite disruption e2e test to use versioned client.

This currently includes the changes from #31638.  I will rebase once that is merged.
2016-08-30 15:35:15 -07:00
Matt Liggett a5f1dc44f5 // update-all and staging/.../client-go/copy.sh 2016-08-30 13:35:51 -07:00
Matt Liggett 44b2c862ef Rewrite disruption e2e test to use versioned client. 2016-08-30 12:34:45 -07:00
Paul Morie c9b97c38a8 Improve doc for the fake client 2016-08-30 13:42:43 -04:00