Commit Graph

1124 Commits (d7b3c62c563beae64cc9d9bf60fea73b1784b877)

Author SHA1 Message Date
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 267608029b Merge pull request #40528 from shashidharatd/kubefed-2
Automatic merge from submit-queue (batch tested with PRs 41954, 40528, 41875, 41165, 41877)

[Federation][kubefed] Support configuring dns-provider

**What this PR does / why we need it**:
Some environments might need to configure the dns-provider using custom configurations for deploying federation control plane. This PR will facilitate such scenarios. please refer to #40620 

Now we can pass dns provider configuration using `dns-provider-config` flag to `kubefed init`

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

**Release note**:

```
[Federation] Introduced a new flag --dns-provider-config to kubefed to configure dns provider via a config file in local file system.
```

cc @kubernetes/sig-federation-misc @madhusudancs @irfanurrehman @marun
2017-02-26 14:54:51 -08:00
Kubernetes Submit Queue e2b723884a Merge pull request #41562 from alejandroEsc/ae/test/check
Automatic merge from submit-queue (batch tested with PRs 41701, 41818, 41897, 41119, 41562)

Updated configmap_controller_test.go

**What this PR does / why we need it**: A few style decisions to make this test a bit harder to break. Including a fix to help it fail and not panic when channel produces a nil.

**Release note**:

```
NONE
```
2017-02-26 14:02:55 -08:00
Madhusudan.C.S edef3af34f Split federation-{up,down} from e2e-{up,down}. 2017-02-24 14:27:31 -08:00
Kubernetes Submit Queue 51f498f6f3 Merge pull request #41645 from ncdc/shared-informers-12-admission
Automatic merge from submit-queue (batch tested with PRs 41667, 41820, 40910, 41645, 41361)

Switch admission to use shared informers

Originally part of #40097

cc @smarterclayton @derekwaynecarr @deads2k @liggitt @sttts @gmarek @wojtek-t @timothysc @lavalamp @kubernetes/sig-scalability-pr-reviews @kubernetes/sig-api-machinery-pr-reviews
2017-02-23 20:57:31 -08:00
Saad Ali 6b50d31bd6 Merge pull request #41955 from shashidharatd/revert-41651-kubefed-3
Revert "[Federation][kubefed] Add label selector for etcd pvc"
2017-02-23 17:43:42 -08:00
shashidharatd d3adaeafe0 Enable configuring dns-provider from kubefed 2017-02-23 23:52:25 +05:30
Alejandro Escobar a56a694be9 moved multiple duplicate strings to constants, updated test that when flacking paniced instead of just failing.
updated tests to avoid panic if channel returns nil.

updated tests based on PR recs.
2017-02-23 09:48:07 -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
Kubernetes Submit Queue f1182ddc27 Merge pull request #39855 from justinsb/dns_logging
Automatic merge from submit-queue

route53: configure verbose authentication errors

Otherwise we get an error message which is confusingly written on
authentication failures.

Probably blocked on #39854
2017-02-23 08:42:02 -08:00
Andy Goldstein 022bff7fbe Switch admission to use shared informers 2017-02-23 11:16:09 -05:00
Kubernetes Submit Queue b437787a2e Merge pull request #41872 from madhusudancs/fed-host-dns-rebase-fix
Automatic merge from submit-queue (batch tested with PRs 38702, 41810, 41778, 41858, 41872)

Remove changes that accidentally sneaked in during a rebase.

```release-note
NONE
```
2017-02-23 07:54:42 -08:00
Wojciech Tyczynski b70e392161 Update clusters to use 3.0.17 etcd 2017-02-23 10:08:50 +01:00
Kubernetes Submit Queue bcd22c4921 Merge pull request #41812 from k82cn/gen_fix
Automatic merge from submit-queue (batch tested with PRs 41812, 41665, 40007, 41281, 41771)

Updated auto generated codes.

Fixes missed generated codes.

Generated by `./hack/update-federation-api-reference-docs.sh`, `./hack/update-generated-swagger-docs.sh`
, `./hack/update-federation-generated-swagger-docs.sh`, `./hack/update-federation-swagger-spec.sh`
2017-02-23 00:11:32 -08:00
Shashidhara T D c71229a8ed Revert "[Federation][kubefed] Add label selector for etcd pvc" 2017-02-23 10:41:17 +05:30
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
Justin Santa Barbara 66640c7852 route53: set WithCredentialsChainVerboseErrors
Otherwise we get an error message which is confusingly written on
authentication failures.
2017-02-22 23:19:18 -05: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
Dr. Stefan Schimanski 595f4ed2cb Update generated files 2017-02-22 19:03:25 +01:00
Dr. Stefan Schimanski 92c36bed4a client-set: use clientset internal scheme 2017-02-22 19:03:25 +01:00
Dr. Stefan Schimanski 49c536baee client-gen: general cleanup 2017-02-22 19:03:25 +01:00
Dr. Stefan Schimanski 0834ff7943 Switch to GroupMetaFactory in federation and clientset testgroup 2017-02-22 19:03:25 +01: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 b679e13c91 Auto generated stuff. 2017-02-22 09:27:42 -05:00
Jordan Liggitt 4202489a89
regenerate clients 2017-02-22 08:54:13 -05:00
Wojciech Tyczynski 22b67e15d4 Fix build 2017-02-22 08:58:44 +01:00
Madhusudan.C.S 80d946dc8b Remove changes that accidentally sneaked in during a rebase. 2017-02-21 23:34:49 -08:00
Klaus Ma 787870ea52 Updated auto generated codes. 2017-02-22 11:22:33 +08:00
nikhiljindal 1d32897eed Updating the registry to return whether the resource was immediately deleted 2017-02-21 11:00:35 -08:00
Madhusudan.C.S 2cb2200847 Move kube-dns ConfigMap creation/deletion out of federated services e2e tests to federation-up.sh/federation-down.sh where the clusters are joined/unjoined. 2017-02-21 10:27:31 -08:00
Eric Chiang 163f37f775 *: update codegen and bazel 2017-02-21 09:26:03 -08:00
Jeff Peeler ec701a65e8 Generated files for projected volume driver 2017-02-20 13:09:41 -05:00
Kubernetes Submit Queue c577108c06 Merge pull request #39964 from justinsb/route53_logger
Automatic merge from submit-queue (batch tested with PRs 39991, 39964)

route53 dnsprovider: add more logging

In the aws cloudprovider, we have a custom logger.  This adds the same
logger to the route53 dnsprovider.

We copy the (simple) code in anticipation that the providers are likely
to live in separate repos in future.

```release-note
federation aws: add logging of route53 calls
```
2017-02-19 19:47:36 -08:00
Kubernetes Submit Queue 8631aa2eb2 Merge pull request #39991 from justinsb/verbose_changeset_logging
Automatic merge from submit-queue

dnsprovider route53: log changeset details at v(8)

Otherwise it can be hard to know exactly what is changing and whether
the changes could be optimized, or to troubleshoot if someone were
accidentally to have a bug in their calling code.

```release-note
NONE
```
2017-02-19 19:07:17 -08:00
Kubernetes Submit Queue 960efff770 Merge pull request #41599 from madhusudancs/fed-e2e-common-vars-cleanup
Automatic merge from submit-queue

Refactor federation-up.sh script.

Move common variables to common.sh script in preparation for the upcoming changes to federation-down.sh that also depends on these common variables.

```release-note
NONE
```

cc @kubernetes/sig-federation-pr-reviews @shashidharatd
2017-02-19 17:51:12 -08:00
Justin Santa Barbara 5db0778823 dnsprovider route53: log changeset details at v(8)
Otherwise it can be hard to know exactly what is changing and whether
the changes could be optimized, or to troubleshoot if someone were
accidentally to have a bug in their calling code.
2017-02-19 17:26:16 -05:00
Justin Santa Barbara df91e00231 route53 dnsprovider: add more logging
In the aws cloudprovider, we have a custom logger.  This adds the same
logger to the route53 dnsprovider.

We copy the (simple) code in anticipation that the providers are likely
to live in separate repos in future.
2017-02-19 17:25:40 -05:00
Kubernetes Submit Queue 00b02117bc Merge pull request #39958 from justinsb/dnsprovider_parent
Automatic merge from submit-queue (batch tested with PRs 39373, 41585, 41617, 41707, 39958)

dnsprovider: Expose parent objects in interfaces

This will allow us to pass e.g. a ResourceRecordChangeset, rather than a
ResourceRecordChangeset, the parent ResourceRecordSets, and the
grandparent Zone.

Laying the groundwork for simplifying / optimizing the federation logic.

```release-note
NONE
```
2017-02-19 13:50:43 -08:00
Kubernetes Submit Queue f69570c92e Merge pull request #41603 from luxas/kubeadm_reorder_kubeconfig
Automatic merge from submit-queue (batch tested with PRs 41043, 39058, 41021, 41603, 41414)

kubeadm: Make a separate util package for kubeconfig logic

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

There are a lot of packages that need to consume kubeconfig logic, so it should be in a central place.
Having it in `kubeadmutil` is suboptimal, because then it get mixed with everything else.

This splits that logic out to a generic place so it then also can be consumed in https://github.com/kubernetes/kubernetes/pull/41417, from where it's broken out.

 - Move {admin,kubelet}.conf out as constants
 - Make a separate util package for kubeconfig logic

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-02-19 00:58:46 -08:00
Justin Santa Barbara fb9af639d3 dnsprovider: Expose parent objects in interfaces
This will allow us to pass e.g. a ResourceRecordChangeset, rather than a
ResourceRecordChangeset, the parent ResourceRecordSets, and the
grandparent Zone.

Laying the groundwork for simplifying / optimizing the federation logic.
2017-02-19 02:01:30 -05:00
shashidharatd a3270b1321 Add label selector for etcd pvc 2017-02-18 06:22:52 +05:30
Lucas Käldström 60b789b1c7
kubeadm: Move {admin,kubelet}.conf out as constants and make a separate util package for kubeconfig logic 2017-02-17 21:36:58 +02:00
Madhusudan.C.S ceb88b3869 Make join cluster function in federation-up.sh a little more succinct. 2017-02-16 16:45:43 -08:00
Madhusudan.C.S 48d7842211 Move common global variables to common.sh script that is sourced in both federation-up.sh and federation-down.sh. 2017-02-16 13:30:17 -08:00
Jordan Liggitt 0c9fd4fbe7
generated files 2017-02-15 16:04: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
Kubernetes Submit Queue 33c9ab4830 Merge pull request #41410 from irfanurrehman/fed-bug-fix-1
Automatic merge from submit-queue (batch tested with PRs 41134, 41410, 40177, 41049, 41313)

[Federation][Kubefed] Bug fix relating kubeconfig path in kubefed init

**What this PR does / why we need it**:
Fixes https://github.com/kubernetes/kubernetes/issues/41305

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
https://github.com/kubernetes/kubernetes/issues/41305
The kubeconfig explicit path is not updated correctly when supplied through the --kubeconfig flag in kubefed init. This leads to the details about the initialised federation control plane not getting updated in the correct kubeconfig file.

**Special notes for your reviewer**:
@madhusudancs 

**Release note**:

```
Fixed a bug that caused the kubeconfig entry for the initialized federation control plane to be not written to the supplied kubeconfig file when the file was supplied through the --kubeconfig flag.
```
2017-02-15 05:58:17 -08:00
Kubernetes Submit Queue 6f59c752c8 Merge pull request #41243 from shashidharatd/kubefed-1
Automatic merge from submit-queue (batch tested with PRs 40297, 41285, 41211, 41243, 39735)

Add LegacyHostIP as a fallback to federation api-server nodeport service

**What this PR does / why we need it**:
while deploying federation using kubefed and using NodePort type service for api-server, if the cluster does not have NodeExternalIP for nodes, then it leads to incorrect endpoint being written to kubeconfig.
So falling back to use LegacyHostIP in such cases.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Partly fixes an issue in this [thread](https://github.com/kubernetes/kubernetes/issues/41127#issuecomment-278888658)

**Special notes for your reviewer**:

**Release note**:
`NONE`

```release-note
```
cc @kubernetes/sig-federation-bugs @madhusudancs
2017-02-15 03:25:13 -08:00
Dr. Stefan Schimanski 0e9c1f75bf Update bazel 2017-02-15 10:25:15 +01:00
Dr. Stefan Schimanski 5e77d01897 k8s.io/apiserver: straighten EtcdOptions, backend Config and kube RESTOptionsFactory 2017-02-15 10:24:59 +01:00