Commit Graph

1210 Commits (9dae6a734a8cf39d3c4864dae181847c50c5a5dd)

Author SHA1 Message Date
deads2k 11e8068d3f move pkg/fields to apimachinery 2017-01-19 09:50:16 -05:00
Kubernetes Submit Queue ac857a5ade Merge pull request #40106 from deads2k/client-09-switch
Automatic merge from submit-queue

make client-go more authoritative

Builds on https://github.com/kubernetes/kubernetes/pull/40103

This moves a few more support package to client-go for origination.  
 1. restclient/watch - nodep
 1. util/flowcontrol - used interface
 1. util/integer, util/clock - used in controllers and in support of util/flowcontrol
2017-01-19 06:34:49 -08:00
deads2k c47717134b move utils used in restclient to client-go 2017-01-19 07:55:14 -05:00
deads2k cdb2934bbc remove kubernetes copy of clientcmd types 2017-01-19 07:39:19 -05:00
Klaus Ma 604957c11c Added generated codes. 2017-01-19 20:20:08 +08:00
Dr. Stefan Schimanski 3d9449a353 genericapiserver: fix imports 2017-01-19 13:06:47 +01:00
Kubernetes Submit Queue b29d9cdbcf Merge pull request #39898 from ixdy/bazel-release-tars
Automatic merge from submit-queue

Build release tars using bazel

**What this PR does / why we need it**: builds equivalents of the various kubernetes release tarballs, solely using bazel.

For example, you can now do
```console
$ make bazel-release
$ hack/e2e.go -v -up -test -down
```

**Special notes for your reviewer**: this is currently dependent on 3b29803eb5, which I have yet to turn into a pull request, since I'm still trying to figure out if this is the best approach.

Basically, the issue comes up with the way we generate the various server docker image tarfiles and load them on nodes:
* we `md5sum` the binary being encapsulated (e.g. kube-proxy) and save that to `$binary.docker_tag` in the server tarball
* we then build the docker image and tag using that md5sum (e.g. `gcr.io/google_containers/kube-proxy:$MD5SUM`)
* we `docker save` this image, which embeds the full tag in the `$binary.tar` file.
* on cluster startup, we `docker load` these tarballs, which are loaded with the tag that we'd created at build time. the nodes then use the `$binary.docker_tag` file to find the right image.

With the current bazel `docker_build` rule, the tag isn't saved in the docker image tar, so the node is unable to find the image after `docker load`ing it.

My changes to the rule save the tag in the docker image tar, though I don't know if there are subtle issues with it. (Maybe we want to only tag when `--stamp` is given?)

Also, the docker images produced by bazel have the timestamp set to the unix epoch, which is not great for debugging. Might be another thing to change with a `--stamp`.

Long story short, we probably need to follow up with bazel folks on the best way to solve this problem.

**Release note**:

```release-note
NONE
```
2017-01-18 14:24:48 -08:00
deads2k 01b3b2b461 move admission to genericapiserver 2017-01-18 08:15:19 -05:00
deads2k 52ec66ee85 remove api dependency from admission 2017-01-18 08:09:48 -05:00
Clayton Coleman 660095776a
generated: staging 2017-01-17 16:17:20 -05:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Clayton Coleman 36acd90aba
Move APIs and core code to use metav1.ObjectMeta 2017-01-17 16:17:18 -05:00
Kubernetes Submit Queue 27d486c663 Merge pull request #38706 from deads2k/auth-12-stomp-anonymous
Automatic merge from submit-queue (batch tested with PRs 34763, 38706, 39939, 40020)

prevent anonymous auth and allow all

https://github.com/kubernetes/kubernetes/pull/38696 for master

@kubernetes/sig-auth 

```release-note
Anonymous authentication is now automatically disabled if the API server is started with the AlwaysAllow authorizer.
```
2017-01-17 09:14:49 -08:00
deads2k de725e56e2 prevent anonymous auth and allow all 2017-01-17 10:16:33 -05:00
deads2k f31ecdd0f7 generated changes 2017-01-17 08:32:05 -05:00
deads2k 26c46971f2 move PatchType to apimachinery 2017-01-17 08:32:05 -05:00
Dr. Stefan Schimanski 8fe0958ba0 Update bazel 2017-01-17 09:30:48 +01:00
Dr. Stefan Schimanski 5c88b7d05a Fix imports 2017-01-17 09:30:30 +01:00
Kubernetes Submit Queue f74b4bbbad Merge pull request #38094 from yarntime/fix_update_typo
Automatic merge from submit-queue

fix typos

fix typos.
2017-01-16 18:22:33 -08:00
Kubernetes Submit Queue adbf7137bb Merge pull request #39916 from smarterclayton/generate_for_staging
Automatic merge from submit-queue

Generate changes for staged repos (apimachinery, apiserver)

Restores OpenAPI types, deepcopy, and bazel for meta/v1 types.

Fixes #39912
2017-01-16 16:04:36 -08:00
Clayton Coleman cdf5cbe9e5
generated: swagger 2017-01-16 16:13:30 -05:00
deads2k a3e71b2cef move name generation to generic api server storage helpers 2017-01-16 16:04:04 -05:00
Kubernetes Submit Queue 6defc30337 Merge pull request #39882 from deads2k/api-59-errors
Automatic merge from submit-queue (batch tested with PRs 38592, 39949, 39946, 39882)

move api/errors to apimachinery

`pkg/api/errors` is a set of helpers around `meta/v1.Status` that help to create and interpret various apiserver errors.  Things like `.NewNotFound` and `IsNotFound` pairings.  This pull moves it into apimachinery for use by the clients and servers.

@smarterclayton @lavalamp First commit is the move plus minor fitting.  Second commit is straight replace and generation.
2017-01-16 10:37:42 -08:00
Justin Santa Barbara 5d740dce6a dnsprovider: Add IsEmpty method
When batching changes, it is often handy to know whether a changeset
IsEmpty, and thus does not need to be Apply-ed.
2017-01-16 10:25:54 -05:00
deads2k 77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
Dr. Stefan Schimanski 1a7242a84c Move BuildDefaultStorageFactory to kubeapiserver 2017-01-16 14:25:58 +01:00
Kubernetes Submit Queue eb9f953496 Merge pull request #39876 from deads2k/generic-20-deps-03
Automatic merge from submit-queue

move more things to apiserver

```
pkg/genericapiserver/api/handlers/negotiation/ -> apiserver/pkg/handlers/negotiation
pkg/genericapiserver/api/metrics -> apiserver/pkg/metrics
pkg/genericapiserver/api/request -> apiserver/pkg/request
pkg/util/wsstream -> apiserver/pkg/util/wsstream
plugin/pkg/auth/authenticator/request/headerrequest -> apiserver/pkg/authentication/request/headerrequest
plugin/pkg/webhook -> apiserver/pkg/webhook
```

and mechanicals.

`k8s.io/kubernetes/pkg/genericapiserver/routes/data/swagger` needs to be sorted out.
2017-01-16 04:14:37 -08:00
Kubernetes Submit Queue 29145ed95d Merge pull request #39817 from smarterclayton/proto_staging
Automatic merge from submit-queue

Generate protobuf into vendor for pseudo vendored models

Fixes #39764

@ncdc
2017-01-13 19:34:59 -08:00
Jeff Grafton bc4b6ac397 Build release tarballs in bazel and add `make bazel-release` rule 2017-01-13 16:17:44 -08:00
Kubernetes Submit Queue 6b5d82b512 Merge pull request #37505 from k82cn/use_controller_inf
Automatic merge from submit-queue (batch tested with PRs 39807, 37505, 39844, 39525, 39109)

Made cache.Controller to be interface.

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

#37504
2017-01-13 13:40:41 -08:00
deads2k 31b6ba4e94 mechanicals 2017-01-13 16:33:09 -05:00
Clayton Coleman dcd6e1d833
generated: protobuf for types 2017-01-13 16:20:04 -05:00
deads2k 633e9d98fc use apimachinery packages instead of client-go packages 2017-01-13 14:04:54 -05:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
Klaus Ma 25fe1e0d82 Made cache.Controller to be interface. 2017-01-13 13:33:23 +08:00
Timothy St. Clair fbc5323dad Refactor registry to use store vs. etcd 2017-01-12 09:23:38 -06:00
Dr. Stefan Schimanski 2741eb7fdb Update generated files 2017-01-11 21:54:07 +01:00
Kubernetes Submit Queue 9d0b999e6d Merge pull request #39327 from shashidharatd/federation
Automatic merge from submit-queue (batch tested with PRs 39475, 38666, 39327, 38396, 39613)

Fix a bug in cascading deletion of federation objects

When FinalizerOrphan is present and set to true in federated object we are currently removing the FinalizerOrphan first and then removing FinalizerDeleteFromUnderlyingClusters. if a reconciliation is triggered in between the finalizer removals, it has undesired effect of object deletion in federated cluster.

So we should remove  FinalizerDeleteFromUnderlyingClusters first and then remove FinalizerOrphan, when FinalizerOrphan is set to true.

@nikhiljindal, @madhusudancs
2017-01-11 09:14:54 -08:00
Kubernetes Submit Queue 931bccf907 Merge pull request #38666 from tanshanshan/empty-check
Automatic merge from submit-queue (batch tested with PRs 39475, 38666, 39327, 38396, 39613)

Add checking the nil value 

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

Add checking the nil value.

Thanks.

**Special notes for your reviewer**:
2017-01-11 09:14:52 -08:00
Kubernetes Submit Queue bc861bf756 Merge pull request #39475 from deads2k/generic-14-apimachinery
Automatic merge from submit-queue (batch tested with PRs 39475, 38666, 39327, 38396, 39613)

Create k8s.io/apimachinery repo

Don't panic.

The diff is quite large, but its all generated change.  The first few commits are where are all the action is.  I built a script to find the fanout from 
```
k8s.io/kubernetes/pkg/apimachinery/registered
k8s.io/kubernetes/pkg/runtime/serializer
k8s.io/kubernetes/pkg/runtime/serializer/yaml
k8s.io/kubernetes/pkg/runtime/serializer/streaming
k8s.io/kubernetes/pkg/runtime/serializer/recognizer/testing 
```

It copied 
```
k8s.io/kubernetes/pkg/api/meta
k8s.io/kubernetes/pkg/apimachinery
k8s.io/kubernetes/pkg/apimachinery/registered
k8s.io/kubernetes/pkg/apis/meta/v1
k8s.io/kubernetes/pkg/apis/meta/v1/unstructured
k8s.io/kubernetes/pkg/conversion
k8s.io/kubernetes/pkg/conversion/queryparams
k8s.io/kubernetes/pkg/genericapiserver/openapi/common - this needs to renamed post-merge.  It's just types
k8s.io/kubernetes/pkg/labels
k8s.io/kubernetes/pkg/runtime
k8s.io/kubernetes/pkg/runtime/schema
k8s.io/kubernetes/pkg/runtime/serializer
k8s.io/kubernetes/pkg/runtime/serializer/json
k8s.io/kubernetes/pkg/runtime/serializer/protobuf
k8s.io/kubernetes/pkg/runtime/serializer/recognizer
k8s.io/kubernetes/pkg/runtime/serializer/recognizer/testing
k8s.io/kubernetes/pkg/runtime/serializer/streaming
k8s.io/kubernetes/pkg/runtime/serializer/versioning
k8s.io/kubernetes/pkg/runtime/serializer/yaml
k8s.io/kubernetes/pkg/selection
k8s.io/kubernetes/pkg/types
k8s.io/kubernetes/pkg/util/diff
k8s.io/kubernetes/pkg/util/errors
k8s.io/kubernetes/pkg/util/framer
k8s.io/kubernetes/pkg/util/json
k8s.io/kubernetes/pkg/util/net
k8s.io/kubernetes/pkg/util/runtime
k8s.io/kubernetes/pkg/util/sets
k8s.io/kubernetes/pkg/util/validation
k8s.io/kubernetes/pkg/util/validation/field
k8s.io/kubernetes/pkg/util/wait
k8s.io/kubernetes/pkg/util/yaml
k8s.io/kubernetes/pkg/watch
k8s.io/kubernetes/third_party/forked/golang/reflect
```

The script does the import rewriting and gofmt.  Then you do a build, codegen, bazel update, and it produces all the updates.

If we agree this is the correct approach.  I'll create a verify script to make sure that no one messes with any files in the "dead" packages above.

@kubernetes/sig-api-machinery-misc @smarterclayton @sttts @lavalamp @caesarxuchao 

`staging/prime-apimachinery.sh && hack/update-codegen.sh && nice make WHAT="federation/cmd/federation-apiserver/ cmd/kube-apiserver" && hack/update-openapi-spec.sh && hack/update-federation-openapi-spec.sh && hack/update-codecgen.sh && hack/update-codegen.sh && hack/update-generated-protobuf.sh && hack/update-bazel.sh`
2017-01-11 09:14:49 -08:00
Kubernetes Submit Queue 3888aca8ab Merge pull request #39646 from shashidharatd/federation-misc
Automatic merge from submit-queue (batch tested with PRs 39714, 39646)

use etcd2 as storage-backend for federation until federation features are completely tested with etcd3

**What this PR does / why we need it**: move federation etcd to etcd3

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

**Special notes for your reviewer**: here is the [link](https://github.com/kubernetes/features/issues/44#issuecomment-270772674) to announcement making etcd3 as default

**Release note**:

```release-note
```
2017-01-11 08:00:50 -08:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Kubernetes Submit Queue 3ed7fb69a4 Merge pull request #39230 from irfanurrehman/fed-init-5
Automatic merge from submit-queue (batch tested with PRs 39230, 39718)

[Federation] Kubefed init verifies if control plane pods are up before returning success

This PR updates the functionality as needed in issue https://github.com/kubernetes/kubernetes/issues/37841.

cc @kubernetes/sig-cluster-federation @nikhiljindal @madhusudancs @shashidharatd
2017-01-11 00:23:09 -08:00
yarntime@163.com f7c737e8a9 fix typos 2017-01-11 16:08:20 +08:00
Irfan Ur Rehman d6cfd826a3 [Federation] Review comment fixes for wait for control plane pods in kubefed init 2017-01-11 11:08:22 +05:30
Kubernetes Submit Queue 94cca27385 Merge pull request #36390 from nikhiljindal/cascDelSvc
Automatic merge from submit-queue (batch tested with PRs 38212, 38792, 39641, 36390, 39005)

Updating federated service controller to support cascading deletion

Ref https://github.com/kubernetes/kubernetes/issues/33612

Service controller is special than other federation controllers because it does not use federatedinformer and updater to sync services (it was written before we had those frameworks).
Updating service controller code to instantiate these frameworks and then use deletion helper to perform cascading deletion.
Note that, I havent changed the queuing logic in this PR so we still dont use federated informer to manage the queue. Will do that in the next PR.

cc @kubernetes/sig-federation-misc  @mwielgus @quinton-hoole


```release-note
federation: Adding support for DeleteOptions.OrphanDependents for federated services. Setting it to false while deleting a federated service also deletes the corresponding services from all registered clusters.
```
2017-01-10 19:48:14 -08:00
tanshanshan 7d4b594c64 check nil 2017-01-11 11:35:36 +08:00
Jeff Grafton 19aafd291c Always --pull in docker build to ensure recent base images 2017-01-10 16:21:05 -08:00
Kubernetes Submit Queue 36eae5a01c Merge pull request #38352 from yarntime/fix_operation_typo
Automatic merge from submit-queue (batch tested with PRs 39628, 39551, 38746, 38352, 39607)

fix typos

fix typos.
2017-01-10 11:54:19 -08:00
shashidharatd 9423e78826 use etcd2 as storage-backend for federation until it is completely tested with etcd3 2017-01-10 15:14:40 +05:30
nikhiljindal e7f9f54acd autogenerated bazel changes 2017-01-09 17:08:53 -08:00
nikhiljindal 1b4a998bcb Updating federation service controller to support cascading deletion 2017-01-09 17:08:52 -08:00
Irfan Ur Rehman 27f7fca8e0 [Federation] Unit tests updated for wait for control plane pods in kubefed init 2017-01-09 20:59:03 +05:30
Irfan Ur Rehman aed7eedaf3 [Federation] Wait for control plane pods in kubefed init 2017-01-09 20:59:03 +05:30
Clayton Coleman 5c4fccba88
generated: change to WatchEvent from Event 2017-01-06 23:45:05 -05:00
Clayton Coleman e5019de260
refactor: Move versioned/watch to meta/v1 2017-01-06 23:45:03 -05:00
Kubernetes Submit Queue 07ce35a325 Merge pull request #39490 from deads2k/generic-16-bump-gengo
Automatic merge from submit-queue (batch tested with PRs 39466, 39490, 39527)

bump gengo to latest

bumping gengo to limit surprises while working on https://github.com/kubernetes/kubernetes/pull/39475

@kubernetes/sig-api-machinery-misc
2017-01-06 11:30:13 -08:00
Kubernetes Submit Queue 181df90d2f Merge pull request #39466 from kubernetes/bugfix
Automatic merge from submit-queue (batch tested with PRs 39466, 39490, 39527)

Generate OpenAPI definition for inlined types

Currently OpenAPI definition generator ignores any type's member with an empty json name tag. However, most (if not all) of these types also have "inline" json tag. That means we should inline their members into parent type's OpenAPI definition instead of ignoring them. This resulted in many types missing common parameters such as "Name". It look something serious to me for OpenAPI spec and I suggest we merge and cherry-pick this into 1.5 release branch as soon as possible.
2017-01-06 11:30:11 -08:00
Kubernetes Submit Queue 5fc2b3522c Merge pull request #39132 from madhusudancs/fed-newtest-refactor-develop-sh
Automatic merge from submit-queue

[Federation] Recompute registry name and version tag in the federation up script.sh and a bunch of other fixes.
2017-01-06 09:26:08 -08:00
deads2k f86447c9a0 files regenerated after update 2017-01-06 11:45:40 -05:00
Madhusudan.C.S ebde7fe8e4 Remove from federation API server manifest, it is not available anymore and is not required. 2017-01-06 19:17:48 +05:30
Madhusudan.C.S 48f79cf600 Quote a bash variable, fix a typo and add some additional logging. 2017-01-06 19:17:48 +05:30
Madhusudan.C.S 0c81f60ba0 Recompute registry name and version tag in the federation up script. 2017-01-06 19:17:47 +05:30
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Jeff Grafton f8288ed1f3 Create BUILD files in top-level subdirectories 2017-01-05 14:14:12 -08:00
mbohlool 4e4b658e0b Update generated OpenAPI spec 2017-01-05 09:45:36 -08:00
deads2k 4d7fcae85a mechanicals 2017-01-05 11:14:27 -05:00
Kubernetes Submit Queue f76fba0da0 Merge pull request #39435 from sttts/sttts-cloudprovider-to-master
Automatic merge from submit-queue

Move apiserver cloudprovider dep into kubeapiserver
2017-01-05 02:29:11 -08:00
Dr. Stefan Schimanski f96fa748d8 Move apiserver cloudprovider dep into kubeapiserver 2017-01-05 09:40:03 +01:00
Kubernetes Submit Queue 7d8f29b622 Merge pull request #39405 from gnufied/fix-kubefed-cluster-ip-bug
Automatic merge from submit-queue (batch tested with PRs 36087, 39405)

federation-apiserver doesn't needs cluster-ip range

This option has been removed from genericserver options
and it is not being used by federation-apiserver anyways.

Fixes - #39388
2017-01-04 02:19:06 -08:00
Kubernetes Submit Queue 819535b96a Merge pull request #36245 from fraenkel/env_configmap
Automatic merge from submit-queue (batch tested with PRs 38433, 36245)

Allow pods to define multiple environment variables from a whole ConfigMap

Allow environment variables to be populated from ConfigMaps

- ConfigMaps represent an entire set of EnvVars
- EnvVars can override ConfigMaps


fixes #26299
2017-01-03 23:28:09 -08:00
Hemant Kumar b09c740fb7 federation-apiserver doesn't needs cluster-ip range
This option has been removed from genericserver options
and it is not being used by federation-apiserver anyways.

Fixes - #39388
2017-01-03 23:28:53 -05:00
Kubernetes Submit Queue 27850a79d9 Merge pull request #39280 from luxas/kubeadm_api_proto
Automatic merge from submit-queue (batch tested with PRs 39280, 37350, 39389, 39390, 39313)

Refactor the certificate and kubeconfig code in the kubeadm binary into two phases

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

First stab at refactoring kubeadm code into logically independent phases.
This defines two phases in the kubeadm init process:
 - certs: Takes some API values as input (the API will be refactored in a later PR), and generates certificates in the pki directory
 - kubeconfig: Takes the pki directory and the endpoint where the master is located and produces two kubeconfig files: admin.conf and kubelet.conf

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*:
Required long-term for graduating our API

**Special notes for your reviewer**:

### Old sample output
The earlier kubeconfig code had a bug in it; see this example:
_admin.conf:_
```yaml
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: <data>
    server: https://192.168.200.x:6443
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: admin
  name: admin@kubernetes
- context:
    cluster: kubernetes
    user: kubelet
  name: kubelet@kubernetes
current-context: admin@kubernetes
kind: Config
preferences: {}
users:
- name: admin
  user:
    client-certificate-data: <data>
    client-key-data: <data>
- name: kubelet
  user:
    client-certificate-data: <data>
    client-key-data: <data>
```
kubelet.conf:
```yaml
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: <data>
    server: https://192.168.200.x:6443
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: admin
  name: admin@kubernetes
- context:
    cluster: kubernetes
    user: kubelet
  name: kubelet@kubernetes
current-context: admin@kubernetes
kind: Config
preferences: {}
users:
- name: admin
  user:
    client-certificate-data: <data>
    client-key-data: <data>
- name: kubelet
  user:
    client-certificate-data: <data>
    client-key-data: <data>
```
```console
$ shasum /etc/kubernetes/*.conf
2b22b25cc4c97e5619ece6c43badf42b87c4970a  /etc/kubernetes/admin.conf
2b22b25cc4c97e5619ece6c43badf42b87c4970a  /etc/kubernetes/kubelet.conf
```

#### New output
admin.conf
```yaml
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: <data>
    server: https://192.168.200.x:6443
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: admin
  name: admin@kubernetes
current-context: admin@kubernetes
kind: Config
preferences: {}
users:
- name: admin
  user:
    client-certificate-data: <data>
    client-key-data: <data>
```
kubelet.conf
```yaml
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: <data>
    server: https://192.168.200.x:6443
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: kubelet
  name: kubelet@kubernetes
current-context: kubelet@kubernetes
kind: Config
preferences: {}
users:
- name: kubelet
  user:
    client-certificate-data: <data>
    client-key-data: <data>
```

**Release note**:

```release-note
Refactor the certificate and kubeconfig code in the kubeadm binary into two phases
```

PTAL @dgoodwin @jbeda @mikedanese @errordeveloper @pipejakob @lukemarsden
2017-01-03 18:25:08 -08:00
Lucas Käldström 720f3b45aa
Refactor the pki, cert, kubeconfig code in the kubeadm binary into two separate and logically independent phases 2017-01-03 23:40:07 +02:00
deads2k 2861509b6d refactored admission to avoid internal client references 2017-01-03 15:50:12 -05:00
Michael Fraenkel 94866b3bee Generated code 2017-01-03 11:45:38 -05:00
Kubernetes Submit Queue 63eec9608d Merge pull request #39353 from sttts/sttts-requestcontextmapper-move
Automatic merge from submit-queue (batch tested with PRs 39075, 39350, 39353)

Move pkg/api.{Context,RequestContextMapper} into pkg/genericapiserver/api/request

**Based on #39350**
2017-01-03 07:40:30 -08:00
Dr. Stefan Schimanski 87dd990bb7 Move pkg/api.{Context,RequestContextMapper} into pkg/genericapiserver/api/request 2017-01-03 14:57:33 +01:00
Łukasz Oleś a36a978781 Generated part for ObservedGeneration 2017-01-02 15:00:05 +01:00
Michail Kargakis 6cb946eab9 extensions: generated changes for readyReplicas 2017-01-02 11:59:15 +01:00
Jeff Grafton fae627dd65 Update generated for 2017 2017-01-01 23:11:09 -08:00
shashidharatd 526590007c Fix a bug in cascading deletion of federation objects 2016-12-31 00:53:10 +05:30
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Kubernetes Submit Queue 9c2bd62159 Merge pull request #39206 from thockin/allocator-repair-race
Automatic merge from submit-queue (batch tested with PRs 39250, 39206)

WIP: work around for IP and port Allocator repair race

Fixes #37488

WIP: This does the IP allocator but not the port allocator yet.  Sending for review before I clone the deltas for ports.

Idea: force the repair loop to detect a leak 3 times in a row before actually releasing the IP.  That should allow any distributed races to resolve.  It's a little hacky, but without mutual exclusion or proper transactions, it works.
2016-12-27 12:24:08 -08:00
Kubernetes Submit Queue 8c28bb3a5a Merge pull request #37659 from mwielgus/update-namespace
Automatic merge from submit-queue

Enable update tests in federated namespace controller

Previously it was disabled because of flakiness.

cc: @nikhiljindal @madhusudancs
2016-12-27 08:30:35 -08:00
Tim Hockin 64f5b050a1 Fix race in service nodeport allocator repair loop 2016-12-26 21:59:28 -08:00
Kubernetes Submit Queue fc41bc6ec6 Merge pull request #39091 from deads2k/api-54-move-authn
Automatic merge from submit-queue

remove unneeded authenticator dependencies from genericapiserver

Refactors the authenticator options to remove unneeded dependencies.

@sttts
2016-12-22 06:48:24 -08:00
deads2k ab1b77673f decouple genericapiserver from non-generic authenticator 2016-12-22 07:48:08 -05:00
deads2k a3564c0aa8 start kubeapiserver package for sharing between kubeapiserver and federation 2016-12-22 07:43:42 -05:00
Kubernetes Submit Queue 45d2449f13 Merge pull request #39061 from xulike666/fix-typo-assistant
Automatic merge from submit-queue

Fix typo for federation/*

**What this PR does / why we need it**:
 Increase code readability for this new member in v1.5

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

**Special notes for your reviewer**: 
Could we develop a typo-fix bot along with a k8s terminology dictionary ? 

**Release note**:

```release-note
```
2016-12-21 07:07:29 -08:00
Kubernetes Submit Queue 733faf5280 Merge pull request #35943 from jianhuiz/federation-apiserver-batch-job
Automatic merge from submit-queue

register batch/jobs to federation-apiserver

register batch/jobs api objects to federation-apiserver

**Release note**:
```release-note
Federation: Add `batch/jobs` API objects to federation-apiserver
```

@quinton-hoole @nikhiljindal @deepak-vij 
#34261
2016-12-21 01:44:50 -08:00
Aaron.L.Xu 3964aae385 revert some unwanted changes 2016-12-21 00:36:38 -08:00
Aaron.L.Xu f15c8d0cf5 update-federation-openapi-spec.sh and fix issue 38962 2016-12-20 20:24:03 -08:00
Aaron.L.Xu 853167624e fix typo for federation/* 2016-12-20 20:00:10 -08:00
jianhuiz 196d663b40 register batch/jobs to federated-apiserver 2016-12-20 18:03:20 -08:00
Justin Santa Barbara 6e3eab491f dnsprovider: Expose route53 constructor
This enables testing when the dnsprovider is used externally (with a
mock Route53 API, as we do in kops), and also might be useful for
constructing with a particular client instance with extra options.
2016-12-20 18:13:34 -05:00
Kubernetes Submit Queue 25dd8cbd94 Merge pull request #39013 from xulike666/first-contributor-from-harmonycloud
Automatic merge from submit-queue

fix typo on federation/pkg/dnsprovider/plugins.go

**What this PR does / why we need it**: Increase code readability

**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**: just fix one minor mistake as first contribution

**Release note**:

```release-note
```
2016-12-20 07:44:34 -08:00
Aaron.L.Xu 8a4fc9c7fd fix typo on federation/pkg/dnsprovider/plugins.go 2016-12-20 02:27:00 -08:00
yupeng af2a143404 fix typo
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-12-20 11:38:56 +08:00
Kubernetes Submit Queue 5b2823adb9 Merge pull request #38191 from sttts/sttts-move-master-options
Automatic merge from submit-queue

Move non-generic apiserver code out of the generic packages
2016-12-17 01:25:45 -08:00
Kubernetes Submit Queue 6c9a4139f3 Merge pull request #38614 from soltysh/remove_ext_jobs
Automatic merge from submit-queue (batch tested with PRs 37468, 36546, 38713, 38902, 38614)

Remove extensions/v1beta1 Job

Fixes https://github.com/kubernetes/kubernetes/issues/32763. This endpoint was deprecated in 1.5 and was planned to be removed in 1.6. 

**Release note**:
```release-note
Remove extensions/v1beta1 Jobs resource, and job/v1beta1 generator.
```
2016-12-16 18:55:37 -08:00
Maciej Szulik cdec94523e Remove extensions/v1beta1 Job - generated changes 2016-12-17 00:07:25 +01:00
Madhusudan.C.S 5d8885dc72 [Federation] Remove unnecessary functions from develop.sh as part of deploy.sh deprecation.
This is part of a big refactor to deprecate a short-lived deploy.sh
mechanism that nobody really could use due to bugs.
2016-12-16 13:19:24 -08:00
Dr. Stefan Schimanski 7adaac79ca Update bazel 2016-12-16 17:49:23 +01:00
Robert Rati 11c577f092 [scheduling] Auto-generated file updates from moving node affinity from
annotations to api fields. #35518
2016-12-16 11:42:43 -05:00
Dr. Stefan Schimanski 5e8ca29a76 Clean up apiserver and federation defaulting and validation 2016-12-16 17:23:43 +01:00
shashidharatd b58216e333 Stop cleaning federation namespace in e2e tests 2016-12-16 14:21:40 +05:30
shashidharatd fd01ed8fdb [Federation][init-11.2] use USE_KUBEFED env var to choose bw old and new federation deployment 2016-12-16 11:22:44 +05:30
Madhusudan.C.S 5a7644c502 [Federation][init-11] Switch federation e2e tests to use the new federation control plane bootstrap via the `kubefed init` command. 2016-12-16 11:22:44 +05:30
jianhuiz 13b76697a3 add generated federation clientsets for batch/Job 2016-12-15 11:38:16 -08:00
Kubernetes Submit Queue 23cd9d7b05 Merge pull request #38736 from ixdy/build-tools-rename-back
Automatic merge from submit-queue

Rename root BUILD to BUILD.bazel, and rename build-tools/ back to build/

**What this PR does / why we need it**: undoes #35453. `build-tools/` was intended to be a temporary workaround until https://github.com/bazelbuild/bazel/issues/552 was fixed, which is has been, as of bazel 0.4.1.

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

FYI @thockin 

since this is likely to be rebase hell, my list of actions:
```console
$ git mv BUILD BUILD.bazel
$ git commit -a
$ git mv build-tools/ build/
$ sift -l 'build-tools' | xargs sed -i -e 's:build-tools/:build/:g'
$ git checkout HEAD docs/
$ git commit -a
```
2016-12-14 16:01:00 -08:00
Kubernetes Submit Queue d8efc779ed Merge pull request #38154 from caesarxuchao/rename-release_1_5
Automatic merge from submit-queue (batch tested with PRs 38154, 38502)

Rename "release_1_5" clientset to just "clientset"

We used to keep multiple releases in the main repo. Now that [client-go](https://github.com/kubernetes/client-go) does the versioning, there is no need to keep releases in the main repo. This PR renames the "release_1_5" clientset to just "clientset", clientset development will be done in this directory.

@kubernetes/sig-api-machinery @deads2k 

```release-note
The main repository does not keep multiple releases of clientsets anymore. Please find previous releases at https://github.com/kubernetes/client-go
```
2016-12-14 14:21:51 -08:00
Jeff Grafton 27d096d27d Rename build-tools/ back to build/ 2016-12-14 13:42:15 -08:00
Chao Xu 6709b7ada2 run hack/update-codegen.sh
run hack/verify-gofmt.sh
update bazel
2016-12-14 12:39:49 -08:00
Chao Xu 28c2ed2c8d manually update import_known_versions.go 2016-12-14 12:39:49 -08:00
Chao Xu c81057be2c move federation_release_1_5 to federation_clientset 2016-12-14 12:39:49 -08:00
Chao Xu 03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Kubernetes Submit Queue 6fa4042211 Merge pull request #38690 from sttts/sttts-swagger-postbuildhandler
Automatic merge from submit-queue

genericapiserver: unify swagger and openapi in config

- make swagger config customizable
- remove superfluous `Config.Enable*` flags for OpenAPI and Swagger.

This is necessary for downstream projects to tweak the swagger spec.
2016-12-14 11:11:02 -08:00
Dr. Stefan Schimanski cab89a67df genericapiserver: unify swagger and openapi in config 2016-12-14 18:41:04 +01:00
Dr. Stefan Schimanski 543417dbf0 Replace apiserver glog.Fatals with fmt.Errorfs 2016-12-14 09:35:47 +01:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Kubernetes Submit Queue e092d3f47b Merge pull request #38571 from madhusudancs/fed-federation-api-getoptions
Automatic merge from submit-queue

Register metav1.GetOptions with federation APIs.

PR #37693 missed a spot.

cc @kubernetes/sig-federation @nikhiljindal
2016-12-11 19:24:29 -08:00
Madhusudan.C.S 8c63a14e5e Register metav1.GetOptions with federation APIs.
PR #37693 missed a spot.
2016-12-10 16:35:08 -08:00
Clayton Coleman d06be8dc1f
refactor: update swagger specs 2016-12-10 18:05:57 -05:00
Clayton Coleman 3c72ee2189
Change references to OwnerReference 2016-12-10 18:05:36 -05:00
Jordan Liggitt 4536388909
Update bazel 2016-12-09 16:26:06 -05:00
Jordan Liggitt 711986876b
Remove generated codecs for internal types 2016-12-09 16:26:04 -05:00
Jordan Liggitt d5afb71cf4
Remove json serialization annotations from internal types 2016-12-09 16:26:03 -05:00
Kubernetes Submit Queue 5b5b1e7533 Merge pull request #38371 from wojtek-t/get_options_in_client
Automatic merge from submit-queue (batch tested with PRs 38354, 38371)

Add GetOptions parameter to Get() calls in client library

Ref #37473 

This PR is super mechanical - the non trivial commits are:
- Update client generator
- Register GetOptions in batch/v2alpha1 group
2016-12-09 04:12:09 -08:00
Wojciech Tyczynski aa7da5231f Update bazel files 2016-12-09 09:42:02 +01:00
Wojciech Tyczynski e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01:00
Wojciech Tyczynski cff55e5894 Autogenerate clients 2016-12-09 09:42:01 +01:00
Kubernetes Submit Queue 98c4c73c71 Merge pull request #37770 from enj/enj/r/storage_decorator
Automatic merge from submit-queue (batch tested with PRs 38278, 37770)

Refactor REST storage to use generic defaults

This removes the repetition in the REST storage builders by moving the logic to `restoptions.ApplyOptions`.  `registry.StorageWithCacher`/`generic.StorageDecorator` no longer assume that they can build the `keyFunc` for arbitrary objects.  `restoptions.ApplyOptions` uses the `registry.Store`'s `KeyFunc` for its call to `generic.StorageDecorator`.

```release-note
Cluster federation servers have changed the location in etcd where federated services are stored, so existing federated services must be deleted and recreated. Before upgrading, export all federated services from the federation server and delete the services. After upgrading the cluster, recreate the federated services from the exported data.
```
2016-12-09 00:25:35 -08:00
Kubernetes Submit Queue 129f5d8b95 Merge pull request #38278 from hodovska/external-name-no-ports
Automatic merge from submit-queue

API v1: do not require ports for all types of services

Ports values had to be specified for all types of services but object with service type "ExternalName" does't define ports. That's why we had to remove required condition.
Presence of ports in service types where ports are actually required is verified here: 
https://github.com/kubernetes/kubernetes/blob/master/pkg/api/validation/validation.go#L2439

For more information about ExternalName services see:
http://kubernetes.io/docs/user-guide/services/#services-without-selectors

Fixes https://github.com/kubernetes/kubernetes/issues/34394
2016-12-08 23:43:14 -08:00
Jordan Liggitt da15bd9260
Update client status generator to not use json tags 2016-12-08 21:58:01 -05:00
Kubernetes Submit Queue 133117e146 Merge pull request #35116 from shashidharatd/fed-coredns-provider
Automatic merge from submit-queue

Add CoreDNS as Federation DNS provider

This PR contains following
1. DNS provider implementation for CoreDNS with etcd as backend
2. Script for optionally deploying CoreDNS in federation control plane

Still to do:
1. HA for CoreDNS service need to be handled, would be taken up in subsequent PR
2. Need to configure CoreDNS as fallback DNS to in-cluster KubeDNS(Manual Step). Need to consider automation.

Request for review: @quinton-hoole @madhusudancs @nikhiljindal @kshafiee @deepak-vij
cc @kubernetes/sig-cluster-federation
2016-12-08 18:50:05 -08:00
Kubernetes Submit Queue b0b6f3c256 Merge pull request #38401 from liggitt/addressable-deep-copy
Automatic merge from submit-queue (batch tested with PRs 36071, 32752, 37998, 38350, 38401)

Pass addressable values to DeepCopy

Extracted from https://github.com/kubernetes/kubernetes/pull/35728

These are the places we are currently calling DeepCopy incorrectly, and we need to fix, even if we don't pick up the changes to DeepCopy in #35728:
* creating a new cloner means we have no generated functions registered
* passing non-addressable values doesn't pick up generated deep copy functions, and forces us into reflective mode
2016-12-08 16:26:00 -08:00
Kubernetes Submit Queue 8182f178f6 Merge pull request #36447 from irfanurrehman/federation-kubefed-todo-2
Automatic merge from submit-queue

[Federation] Implement dry run support in kubefed init

This one implements one of the TODO items pending in the previous set of kubefed PRs.
This one is done on top of another todo PR https://github.com/kubernetes/kubernetes/pull/36310 which is being reviewed separately.
Please review only the last 2 commits in this one.
The design doc PR for kubefed is at https://github.com/kubernetes/kubernetes/pull/34484.

cc  @kubernetes/sig-cluster-federation  @madhusudancs @nikhiljindal



**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`. 
-->
``` 
[Federation] `kubefed init` now supports dry run mode. 
```
2016-12-08 14:32:08 -08:00
Monis Khan a6bafbacbf
Refactor REST storage to use generic defaults
Signed-off-by: Monis Khan <mkhan@redhat.com>
2016-12-08 17:24:21 -05:00
Kubernetes Submit Queue 702c33a564 Merge pull request #36310 from irfanurrehman/federation-kubefed-todo-1
Automatic merge from submit-queue

[Federation] Make federation etcd PVC size configurable

This one implements one of the many TODO items pending in the previous set of kubefed PRs.
The design doc PR is at https://github.com/kubernetes/kubernetes/pull/34484

cc  @kubernetes/sig-cluster-federation  @madhusudancs



**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`. 
-->
``` 
[Federation] kubefed init now has a new flag, --etcd-pv-capacity, which can be used to configure the persistent volume capacity for etcd.  
```
2016-12-08 13:03:07 -08:00
Jordan Liggitt 6819706adf
Pass addressable values to DeepCopy 2016-12-08 14:16:01 -05:00
yarntime@163.com c747586b07 fix typo 2016-12-08 09:56:01 +08:00
Dominika Hodovska cb82ef8a60 API v1: ports are not required for all services 2016-12-07 12:20:28 +01:00
Kubernetes Submit Queue d6b9a7aa60 Merge pull request #37693 from wojtek-t/pipe_get_options_to_storage
Automatic merge from submit-queue (batch tested with PRs 37693, 38085)

Pipe get options to storage

Ref #37473
2016-12-07 00:52:26 -08:00
Kubernetes Submit Queue e56b1ec1cd Merge pull request #38173 from yarntime/fix_typo_in_ingress
Automatic merge from submit-queue

fix typo in ingress

fix typo.
2016-12-06 21:11:05 -08:00
Kubernetes Submit Queue cbf497b749 Merge pull request #38119 from liggitt/long-running
Automatic merge from submit-queue (batch tested with PRs 37032, 38119, 38186, 38200, 38139)

Detect long-running requests from parsed request info

Follow up to https://github.com/kubernetes/kubernetes/pull/36064

Uses parsed request info to more tightly match verbs and subresources

Removes regex-based long-running request path matching (which is easily fooled)

```release-note
The --long-running-request-regexp flag to kube-apiserver is deprecated and will be removed in a future release. Long-running requests are now detected based on specific verbs (watch, proxy) or subresources (proxy, portforward, log, exec, attach).
```
2016-12-06 18:29:35 -08:00
Kubernetes Submit Queue d4d6a32e9b Merge pull request #38123 from deads2k/api-48-remove-fields
Automatic merge from submit-queue (batch tested with PRs 38194, 37594, 38123, 37831, 37084)

remove unnecessary fields from genericapiserver config

Cleans up some unnecessary fields in the genericapiserver config.
2016-12-06 17:41:33 -08:00
deads2k b723333be3 move APIResourceConfigSource to master 2016-12-06 10:19:25 -05:00
deads2k 6ea1d5d53d join client CA bundles into the accept path for genericapiserver 2016-12-06 09:56:13 -05:00
deads2k fbb35b72ed update delegating auth to include front-proxy 2016-12-06 09:40:07 -05:00
deads2k 4f625db133 move client-ca to authentication args 2016-12-06 09:34:49 -05:00
Wojciech Tyczynski c8711f29a5 Update autogenerated files 2016-12-06 12:25:57 +01:00
shashidharatd 2807e8050e Implement CoreDNS as external dns provider for federation 2016-12-06 16:20:55 +05:30
Wojciech Tyczynski 3432fea8b2 Pipe GetOptions to storage 2016-12-06 11:48:37 +01:00
yarntime@163.com 16c582ed37 fix typo 2016-12-06 17:18:25 +08:00
Kevin Wang 007d7a802f Add option to disable federation ingress controller 2016-12-06 15:14:21 +11:00
Jordan Liggitt 4359054616
Detect long-running requests from parsed request info 2016-12-05 16:46:28 -05:00
deads2k 2923d09091 remove rbac super user 2016-12-05 13:49:54 -05:00
Marcin Wielgus b70e194fea Enable update tests in federated namespace controller 2016-12-05 19:40:54 +01:00
Kubernetes Submit Queue 5e41d0904f Merge pull request #37830 from sttts/sttts-stratify-cert-generation
Automatic merge from submit-queue

Stratify apiserver cert generation

- move self-signed cert generation to `SecureServingOptions.MaybeDefaultWithSelfSignedCerts`
- make cert generation only depend on `ServerRunOptions`, not on an unfinished `Config` (this breaks the chicken-egg problem of a finished config in https://github.com/kubernetes/kubernetes/pull/35387#pullrequestreview-5368176)
- move loopback client config code into `config_selfclient.go`

Replaces https://github.com/kubernetes/kubernetes/pull/35387#event-833649341 by getting rid of duplicated `Complete`.
2016-12-05 10:15:47 -08:00
Dr. Stefan Schimanski 3f01c37b9d Update generated files 2016-12-05 16:05:52 +01:00
Kubernetes Submit Queue 45a436ac24 Merge pull request #36909 from sttts/sttts-discovery-with-verbs
Automatic merge from submit-queue (batch tested with PRs 37370, 37003, 36909)

Add verbs to APIResourceInfo for discovery

Verbs will be used by generic controllers (gc, namespace) to avoid unnecessary API calls, reducing load on the apiserver. E.g. not all objects can be deleted.

Example:
```json
{
  "kind": "APIResourceList",
  "apiVersion": "v1",
  "groupVersion": "batch/v1",
  "resources": [
    {
      "name": "jobs",
      "namespaced": true,
      "kind": "Job",
      "verbs": [
        "create",
        "delete",
        "deletecollection",
        "get",
        "list",
        "update",
        "watch"
      ]
    },
    {
      "name": "jobs/status",
      "namespaced": true,
      "kind": "Job",
      "verbs": [
        "create",
        "get"
      ]
    }
  ]
}
```
2016-12-05 06:48:41 -08:00
Dr. Stefan Schimanski 5b1d45bc15 Stratify certificate loading and self-sign cert generation
This removes all dependencies on Config during cert generation, only operating
on ServerRunOptions. This way we get rid of the repeated call of Config.Complete
and cleanly stratify the GenericApiServer bootstrapping.
2016-12-05 14:58:15 +01:00
Marcin 3b255d8955 Bazel update for federated secret controller tests 2016-12-05 13:00:21 +01:00
Marcin Wielgus 3e61baf3f0 Enable update tests for federated secret controller 2016-12-05 12:58:33 +01:00
Dr. Stefan Schimanski 2dff13f332 Update generated files 2016-12-05 12:42:31 +01:00
Kubernetes Submit Queue 444e082441 Merge pull request #37476 from wojtek-t/get_options
Automatic merge from submit-queue

Create GetOptions to allow passing "ResourceVersion" to GET requests.

Ref #37473

@kubernetes/sig-api-machinery @smarterclayton
2016-12-05 03:20:02 -08:00
Kubernetes Submit Queue 778bab2b81 Merge pull request #37407 from mwielgus/ingress_ctrl_fix
Automatic merge from submit-queue

Enable updates in federated ingress controller tests

And make channel in test helper non-blocking.

cc: @nikhiljindal @madhusudancs
2016-12-05 02:41:44 -08:00
Wojciech Tyczynski c1699253ff Regenerate autogenerated files 2016-12-05 09:18:57 +01:00
Clayton Coleman 3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Dr. Stefan Schimanski 1f5511b131 Move RESTStorageProvider interface into pkg/master 2016-12-03 18:35:15 +01:00
yupeng 31c46e1d2c error strings should not end with punctuation
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-12-03 15:42:47 +08:00
Kubernetes Submit Queue cd560926bd Merge pull request #36889 from wojtek-t/reuse_fields_and_labels
Automatic merge from submit-queue

Reuse fields and labels

This should significantly reduce memory allocations in apiserver in large cluster.
Explanation:
- every kubelet is refreshing watch every 5-10 minutes (this generally is not causing relist - it just renews watch)
- that means, in 5000-node cluster, we are issuing ~10 watches per second
- since we don't have "watch heartbets", the watch is issued from previously received resourceVersion
- to make some assumption, let's assume pods are evenly spread across pods, and writes for them are evenly spread - that means, that a given kubelet is interested in 1 per 5000 pod changes
- with that assumption, each watch, has to process 2500 (on average) previous watch events
- for each of such even, we are currently computing fields.

This PR is fixing this problem.
2016-12-02 21:49:43 -08:00
Kubernetes Submit Queue efa42b95a6 Merge pull request #37532 from smarterclayton/remove_export
Automatic merge from submit-queue

Remove ExportOptions from api/internal and use unversioned

Should only have one internal object in use

Part of #37530
2016-12-02 21:11:56 -08:00
Marcin be979ac276 Update bazel for ingress tests 2016-12-02 15:13:14 +01:00
Marcin Wielgus ac8184dfcc Ingress test fixes 2016-12-02 15:13:08 +01:00
Marcin a50b8c9ab3 Bazel update 2016-12-01 15:15:29 +01:00
Marcin Wielgus 741aa4898e Enable update unit test in federated daemonset controller 2016-12-01 15:15:26 +01:00
Kubernetes Submit Queue b0fd700f61 Merge pull request #36604 from deads2k/api-42-add-generic-loopback
Automatic merge from submit-queue

move parts of the mega generic run struct out

This splits the main `ServerRunOptions` into composeable pieces that are bindable separately and adds easy paths for composing servers to run delegating authentication and authorization.

@sttts @ncdc alright, I think this is as far as I need to go to make the composing servers reasonable to write.  I'll try leaving it here
2016-11-30 21:11:05 -08:00
Kubernetes Submit Queue 737edd02a4 Merge pull request #35258 from feiskyer/package-aliase
Automatic merge from submit-queue

Fix package aliases to follow golang convention

Some package aliases are not not align with golang convention https://blog.golang.org/package-names. This PR fixes them. Also adds a verify script and presubmit checks.

Fixes #35070.

cc/ @timstclair @Random-Liu
2016-11-30 16:39:46 -08:00
Kubernetes Submit Queue 9068bdc693 Merge pull request #37572 from mwielgus/ing-fix-loop
Automatic merge from submit-queue

Fix infinte loop in federated ingress controller

Previously ingress controller was constantly scheduling reconcilation, even if no updates were needed. That behavior creates a big mess in the logs and consumes resources. 

This pr also fixes the stop function for federated ingress controller.

cc: @nikhiljindal @madhusudancs
2016-11-30 10:00:51 -08:00
Kubernetes Submit Queue d9fcabcbd0 Merge pull request #37290 from mwielgus/rev-fed-dep
Automatic merge from submit-queue

Revision handling in federated deployment controller

Deployment controller in regular kubernetes automatically adds an annotation in deployment. This causes a bit of confusion in controller and tests. This PR skips revision annotation in checks. In the next K8S release we will need to have better support for deployment revisions. 

Helps with #36588

cc: @nikhiljindal @madhusudancs
2016-11-30 09:21:25 -08:00
Kubernetes Submit Queue d51f07b60d Merge pull request #37353 from nikhiljindal/serviceDelete
Automatic merge from submit-queue

Stop deleting underlying services when federation service is deleted

Fixes https://github.com/kubernetes/kubernetes/issues/36799

Fixing federation service controller to not delete services from underlying clusters when federated service is deleted.
None of the federation controller should do this unless explicitly asked by the user using DeleteOptions. This is the only federation controller that does that.

cc @kubernetes/sig-cluster-federation @madhusudancs

```release-note
federation service controller: stop deleting services from underlying clusters when federated service is deleted.
```
2016-11-30 06:02:39 -08:00
Pengfei Ni f584ed4398 Fix package aliases to follow golang convention 2016-11-30 15:40:50 +08:00
Kubernetes Submit Queue 631612028a Merge pull request #37323 from nikhiljindal/firstClusterPR
Automatic merge from submit-queue

Fixing the logic to select first cluster in federated ingress controller

Ref https://github.com/kubernetes/kubernetes/issues/36074.

Before this change, ingress controller was using cluster with clusterIndex = 0 as the first cluster to create the ingress in.
But the ordering of clusters can change and hence ingress controller ended up creating the ingress in multiple clusters.
This PR fixes it by using an annotation on federated ingress. Controller now picks up a cluster randomly as the first cluster and creates ingress there. This clusters name is stored as an annotation on the federated ingress. Contoller does not create an ingress in any other cluster if this annotation is set on the federated ingress and IP has not been propagated. Once IP has been propagated, controller creates the ingress in all clusters.

cc @kubernetes/sig-cluster-federation @madhusudancs
2016-11-29 09:00:14 -08:00
deads2k ab9a842f3c add loopback auth defaulting to generic apiserver 2016-11-29 11:02:35 -05:00
deads2k ca2b5f136e split authorization from main options struct 2016-11-29 10:59:43 -05:00
deads2k 5cea15ac9f add delegating auth options 2016-11-29 10:59:43 -05:00
deads2k 7c0e48f544 split out authentication options 2016-11-29 10:59:43 -05:00
deads2k 56b7a8b02b remove some options from mega-struct 2016-11-29 10:59:43 -05:00
deads2k 18074d7606 split insecure serving options 2016-11-29 10:59:42 -05:00
deads2k a08f3ba521 split secure serving options 2016-11-29 10:59:42 -05:00
deads2k a9af8206cb split generic etcdoption out of main struct 2016-11-29 10:59:42 -05:00
Kubernetes Submit Queue 460619ec6c Merge pull request #37091 from kargakis/doc-fix
Automatic merge from submit-queue

extensions: fix api doc for maxUnavailable

Fixes https://github.com/kubernetes/kubernetes/issues/37083

@kubernetes/deployment
2016-11-29 07:33:28 -08:00
Wojciech Tyczynski 36e6cd19e1 Cache fields for filtering in watchCache. 2016-11-29 09:48:09 +01:00
Marcin Wielgus d3155002b8 Fix infinte loop in federated ingress controller 2016-11-28 21:42:06 +01:00
Kubernetes Submit Queue 968aae020f Merge pull request #36354 from bboreham/fed-readme-links
Automatic merge from submit-queue

Fix doc links in Federation readme

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

The user guide and admin guide links were swapped round

**Release note**: NONE
2016-11-28 11:42:20 -08:00
Clayton Coleman 0b1a806181
generated: remove ExportOptions 2016-11-27 23:21:10 -05:00
Clayton Coleman 3dde81f8d0
Remove references to v1/internal ExportOptions 2016-11-27 23:21:06 -05:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu eca157588d federation 2016-11-23 15:53:09 -08:00
nikhiljindal 34eae2207e Stop deleting underlying services when federation service is deleted 2016-11-23 13:02:39 -08:00
nikhiljindal 63799452b2 Fixing the logic to select first cluster in federated ingress controller 2016-11-23 10:54:29 -08:00
Kubernetes Submit Queue 5c918def7a Merge pull request #36602 from jianhuiz/federation-replicaset-controller-ready-available-replicas
Automatic merge from submit-queue

populate ready replicas and aviable replicas to federated replicaset …

populate ready replicas and aviable replicas to federated replicaset status

@nikhiljindal #33312
#29481 #32771

@deepak-vij
2016-11-22 20:45:24 -08:00
Kubernetes Submit Queue 280560a1eb Merge pull request #37271 from nikhiljindal/E2edsi
Automatic merge from submit-queue

Fixing the ingress annotation key in federated ingress controller

Fixing a few issues found during debugging https://github.com/kubernetes/kubernetes/issues/36074.

cc @kubernetes/sig-cluster-federation @madhusudancs @bprashanth
2016-11-22 16:10:04 -08:00
Marcin Wielgus 11b9706a19 Revision handling in federated deployment controller 2016-11-22 16:20:15 +01:00
Michail Kargakis 831baed2a4 extensions: fix api doc for maxUnavailable 2016-11-22 14:00:16 +01:00
nikhiljindal e98e335718 Fixing the ingress annotation key in federated ingress controller 2016-11-21 22:49:02 -08:00
Kubernetes Submit Queue 67dc87395b Merge pull request #36869 from madhusudancs/kubefed-join-context-secret-name-flags
Automatic merge from submit-queue

[Federation][join-flags] Add flags for cluster context and secret names while joining clusters to federation.

Vast majority of cluster contexts are not RFC 1123 subdomains. Since
cluster and secret names for the API objects are derived from the
cluster context name, there is no way for users to join clusters
with such context names to federation, unless they modify the context
name in their kubeconfigs itself. That's a lot of inconvenience and
entirely goes against the goal and beats the purpose of the `kubefed`
tool. So we are providing these flags to allow users to override these
values.

Also, since users register their clusters with federation, it is makes
sense in terms of user experience to make the cluster name a positional
argument because that feels more natural. Also, specifying cluster name
in the join command as a mandatory positional argument make
`kubefed join` consistent with `kubefed unjoin`. This also means
`--cluster-context` is now made a flag and defaults to cluster name if
unspecified.

`--secret-name` also defaults to the cluster name if unspecified.

Fixes: Issue #35954

cc @kubernetes/sig-cluster-federation @quinton-hoole @irfanurrehman
2016-11-21 13:02:03 -08:00
Kubernetes Submit Queue 27a0a86282 Merge pull request #37174 from mbohlool/optional
Automatic merge from submit-queue

Fields with omitempty tag should still be considered as optional

We've added an "+optional" tag while ago for optional fields. Before that OpenAPI spec generated assumed all fields with "omitempty" in their json tags are optional. This should be still the case (as well as +optional tag) until these two things happen:

- We update all documentation asking developers to use +optional (My bad, I should have added this after the +optional PR)
- We fix swagger 1.2 spec generator to use +optional instead of omitempty.

Fixes #37149
2016-11-21 10:57:52 -08:00
Kubernetes Submit Queue ab184e1b1f Merge pull request #36399 from mwielgus/fedrc1
Automatic merge from submit-queue

Make desired objects in fed controller reconcilation function fully writable

When creating desired objects for sub-cluster in reconciliate functions we don't make full copies. This may result in unexpected race condition in the future when someone actually adds some object modifications (not needed in most cases but anyway - the cost of extra copy will be relatively small comparing to inter-cluster traffic). In case of ReplicaSet and Deployment the spec copy was a shallow one - ok for setting just replicas but also error-prone in the future.

cc: @quinton-hoole @nikhiljindal @madhusudancs
2016-11-21 00:00:26 -08:00
mbohlool 55d7fbd52c Update generated OpenAPI spec 2016-11-20 00:23:40 -08:00
mbohlool 5c3e078cd5 Update OpenAPI specs 2016-11-17 21:22:15 -08:00
Irfan Ur Rehman b21cfdcd0f [Federation] Review comments fixed for dry run support in kubefed init 2016-11-18 01:23:15 +05:30
Irfan Ur Rehman 2309821c5c [Federation] Unit tests for dry run support in kubefed init 2016-11-18 01:23:15 +05:30
Irfan Ur Rehman 0462c656e8 [Federation] Implement dry run support in kubefed init 2016-11-18 01:23:15 +05:30
Irfan Ur Rehman 98d55db5ec [Federation] Review comment fixes for making federation etcd PVC size configurable 2016-11-18 01:09:25 +05:30
Kubernetes Submit Queue 47a431e82f Merge pull request #36336 from justinsb/federation_dns_hosted_zone_2
Automatic merge from submit-queue

Federation: allow specification of dns zone by ID
2016-11-17 00:49:09 -08:00
Kubernetes Submit Queue add6ed4dd1 Merge pull request #36719 from saturnism/patch-3
Automatic merge from submit-queue

Fixed typo - cluser -> cluster, and replicasets -> ReplicaSet for consistency

<!--  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**:

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

**Special notes for your reviewer**:

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```
2016-11-16 15:09:03 -08:00
Irfan Ur Rehman 58b631fe77 [Federation] Unit tests for federation etcd PVC size configurability 2016-11-16 20:52:16 +05:30
Irfan Ur Rehman 9cef38c705 [Federation] Make federation etcd PVC size configurable 2016-11-16 20:52:16 +05:30
Madhusudan.C.S 005f5cd21e [Federation][join-flags] Add flags for cluster context and secret names while joining clusters to federation.
Vast majority of cluster contexts are not RFC 1123 subdomains. Since
cluster and secret names for the API objects are derived from the
cluster context name, there is no way for users to join clusters
with such context names to federation, unless they modify the context
name in their kubeconfigs itself. That's a lot of inconvenience and
entirely goes against the goal and beats the purpose of the `kubefed`
tool. So we are providing these flags to allow users to override these
values.

Also, since users register their clusters with federation, it is makes
sense in terms of user experience to make the cluster name a positional
argument because that feels more natural. Also, specifying cluster name
in the join command as a mandatory positional argument make `kubefed
join` consistent with `kubefed unjoin`. This also means `--cluster-
context` is now made a flag and defaults to cluster name if unspecified.

`--secret-name` also defaults to the cluster name if unspecified.
2016-11-15 23:47:53 -08:00
Madhusudan.C.S 2f00e0eeba [Federation][init-10d] Use the right service and dns provider names in controller manager. 2016-11-15 10:42:31 -08:00
Kubernetes Submit Queue 30c830b217 Merge pull request #36492 from irfanurrehman/federation-kubefed-todo-3
Automatic merge from submit-queue

[Federation][Bugfix] Make the dns provider configurable in kubefed init

Fixes: Issue #36690 

The design doc PR relating the whole feature for kubefed is at #34484.


cc @kubernetes/sig-cluster-federation @madhusudancs @nikhiljindal
2016-11-13 17:51:28 -08:00
Ray Tsang cd9533cc39 Update types.go 2016-11-13 17:32:54 +01:00
Kubernetes Submit Queue 3e6210994c Merge pull request #36605 from mwielgus/test-fix-1
Automatic merge from submit-queue

Federation test util fix - 1

* Make nil and empty map equivalent when testing ObjectMeta equivalence
* Add a function that waits for a particular content inside federated store

cc: @nikhiljindal @madhusudancs
2016-11-11 08:21:59 -08:00
Marcin Wielgus 2fb71ed955 Test equality in get from storage 2016-11-11 16:00:16 +01:00
Marcin Wielgus 92c3e20e93 Make null and empty as equivalent in ObjectMetaEquivalent 2016-11-11 16:00:16 +01:00
Kubernetes Submit Queue e4e3e41522 Merge pull request #36613 from mwielgus/watcher-fix-2
Automatic merge from submit-queue

Ensure proper serialization of updates and creates in federation test watcher

Fix for finalizer test problems. The issue there was that the updates were coming out of order. It was caused by firing updates in new goroutines in test watcher. The proper solution is to order them in a queue and fire in order on a single goroutine.

Ref: https://github.com/kubernetes/kubernetes/issues/36473#issuecomment-259605870

cc: @nikhiljindal @madhusudancs
2016-11-10 16:28:24 -08:00
Marcin Wielgus 3540846fbe Ensure proper serialization of updates and creates in federation test watcher 2016-11-10 23:23:24 +01:00
Marcin 41e13fcfa7 Automaticaly generated bazel 2016-11-10 21:37:04 +01:00
Marcin Wielgus b560066e01 Wait for deployment in the storage in deployment controller test 2016-11-10 21:08:32 +01:00
jianhuiz 939ae93e87 populate ready replicas and aviable replicas to federated replicaset status 2016-11-10 10:11:10 -08:00
Kubernetes Submit Queue 7d312c2b47 Merge pull request #36476 from nikhiljindal/deployRS
Automatic merge from submit-queue

Adding cascading deletion support to federation replicaset and deployments

Forked from https://github.com/kubernetes/kubernetes/pull/36330

Ref #33612
Adding cascading deletion support for federated replicasets and deployments.

```release-note
federation: Adding support for DeleteOptions.OrphanDependents for federated replicasets and deployments. Setting it to false while deleting a federated replicaset or deployment also deletes the corresponding resource from all registered clusters.
```
2016-11-10 05:36:43 -08:00
Irfan Ur Rehman a7a56caa6b [Federation] Unit test update for dns provider configurability 2016-11-10 12:56:21 +05:30
Irfan Ur Rehman c5a5a71976 [Federation] Make the dnsProvider configurable in kubefed init 2016-11-10 12:55:44 +05:30
nikhiljindal 675da90d51 autogenerated bazel and test owner changes 2016-11-09 21:41:19 -08:00
nikhiljindal 7c721cbc2f Updating federation ingress controller to support cascading deletion 2016-11-09 21:39:51 -08:00
nikhiljindal 434b1cc406 Updating daemon set controller to support cascading deletion 2016-11-09 21:39:51 -08:00
Jess Frazelle 3bd8704489 Merge pull request #36536 from nikhiljindal/disableTest
Disabling flaky federation unit tests
2016-11-09 16:07:49 -05:00
nikhiljindal 6b5375b32c Disabling flaky unit tests 2016-11-09 12:22:36 -08:00
nikhiljindal a519506c35 Fixing scripts to bring up federation control plane 2016-11-09 09:47:24 -08:00
nikhiljindal d26c438a72 autogenerated bazel and test owner changes 2016-11-08 20:05:04 -08:00
nikhiljindal 1802400700 Updating deployment controller to support cascading deletion 2016-11-08 20:05:04 -08:00
nikhiljindal 54c2fbbfdf Updating federation replicaset controller to support cascading deletion 2016-11-08 20:05:04 -08:00
nikhiljindal 8ca1b3092f Fixing federation secret controller unit test flakiness 2016-11-08 14:08:59 -08:00
Kubernetes Submit Queue 0271eac28f Merge pull request #35765 from mfanjie/master
Automatic merge from submit-queue

register default functions for federation/apis/core

fix issue #35667 and all related e2e test fail on federation.
2016-11-08 09:53:14 -08:00
Marcin Wielgus f91b3feee4 Make objects in fed controller reconcilation function fully writable 2016-11-08 11:16:31 +01:00
Kubernetes Submit Queue a0758f6767 Merge pull request #36338 from nikhiljindal/delCode
Automatic merge from submit-queue

Deleting dead code from federation service controller
2016-11-07 23:41:32 -08:00
Kubernetes Submit Queue d8fa6a99a2 Merge pull request #36296 from nikhiljindal/cascDelFedSecret
Automatic merge from submit-queue

Adding cadcading deletion support for federated secrets

Ref https://github.com/kubernetes/kubernetes/issues/33612

Adding cascading deletion support for federated secrets.
The code is same as that for namespaces.  Just ensuring that DeletionHelper functions are called at right places in secret_controller.
Also added e2e tests.

cc @kubernetes/sig-cluster-federation @caesarxuchao

```release-note
federation: Adding support for DeleteOptions.OrphanDependents for federated secrets. Setting it to false while deleting a federated secret also deletes the corresponding secrets from all registered clusters.
```
2016-11-07 22:15:08 -08:00
Justin Santa Barbara df4280651c Federation: allow specification of dns zone by ID
If we have a public & private zone with the same name (which is common
on AWS), this means we can still create records.  Also tighten up some
of the logic to allow for zones with duplicate names.
2016-11-07 17:21:36 -05:00
nikhiljindal 11ede23257 bazel changes 2016-11-07 11:43:00 -08:00
nikhiljindal 17b2178222 Adding cadcading deletion support to federated secrets 2016-11-07 11:42:59 -08:00
nikhiljindal 647b826d69 Fix a data race condition in federation namespace controller 2016-11-07 11:34:27 -08:00
Bryan Boreham 0b88460347 Fix doc links in Federation readme
The user guide and admin guide links were swapped round
2016-11-07 11:31:08 +00:00
mbohlool c7129ff3d8 Update federation OpenAPI spec 2016-11-07 02:47:23 -08:00
Kubernetes Submit Queue e6fadcbf4b Merge pull request #36283 from nikhiljindal/nscascdelTests
Automatic merge from submit-queue

Adding more e2e tests for federated namespace cascading deletion and fixing bugs

Ref https://github.com/kubernetes/kubernetes/issues/33612

Adding more e2e tests for testing cascading deletion of federated namespace.
New tests are now verifying that cascading deletion happen when DeletionOptions.OrphanDependents=false and it does not happen when DeleteOptions.OrphanDependents=true.

Also updated deletion helper to always add OrphanFinalizer. generic registry will remove it if DeleteOptions.OrphanDependents=false. Also updated namespace registry to do the same.

We need to add the orphan finalizer to keep the orphan by default behavior. We assume that its dependents are going to be orphaned and hence add that finalizer. If user does not want the orphan behavior, he can do so using DeleteOptions and then the registry will remove that finalizer.

cc @kubernetes/sig-cluster-federation @caesarxuchao @derekwaynecarr
2016-11-07 01:37:14 -08:00
nikhiljindal 1fe6ee8915 Deleting dead code from federation service controller 2016-11-06 21:48:05 -08:00
Kubernetes Submit Queue 3c17fa5d36 Merge pull request #36048 from madhusudancs/federation-kubefed-init-10c
Automatic merge from submit-queue

[Federation][init-10c] Fix hyperkube binary path in the image and disable auth mechanisms we don't support for now.

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

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @nikhiljindal
2016-11-06 20:46:52 -08:00
nikhiljindal aa518d13de Adding more e2e tests for federated namespace cascading deletion and fixing a few bugs 2016-11-05 20:57:57 -07:00
Madhusudan.C.S 4618eedcf6 [Federation][init-10c] Disable auth mechanisms we don't support for now. 2016-11-05 19:38:45 -07:00
Madhusudan.C.S 41b39f3019 [Federation][init-10b] Update local kubeconfig with the new federation API server credentials. 2016-11-05 19:37:48 -07:00
Kubernetes Submit Queue c80acb4cb8 Merge pull request #35481 from smarterclayton/apidoc
Automatic merge from submit-queue

Describe graceful deletionTimestamp more accurately

Spawned from #34160
2016-11-05 18:51:47 -07:00
Kubernetes Submit Queue 42fe4ab027 Merge pull request #35372 from justinsb/federation_dns_hosted_zone_1
Automatic merge from submit-queue

Federation: separate notion of zone-name & dns-suffix
2016-11-05 17:29:09 -07:00
Madhusudan.C.S 8d8eca5f2a [Federation][init-10a] Make the federation API server and controller manager image names configurable.
This enables testing non-release images.
2016-11-05 16:42:14 -07:00
Madhusudan.C.S 1de77559f3 [Federation][init-09] Implement unit tests for `kubefed init`. 2016-11-05 16:35:42 -07:00
Kubernetes Submit Queue a788f662ea Merge pull request #30601 from madhusudancs/fed-cm-kubeconfig-from-flags
Automatic merge from submit-queue

Read the federation controller manager kubeconfig from a filesystem path

This decoupling from the Kubernetes API allows admins to run federation control plane components wherever they like, even outside Kubernetes. This also makes the federation controller manager read its config from one single place in a uniform and/or consistent way, instead of spreading the config around command line flags and secrets.

``` release-note
Federation controller manager can consume the federation API server kubeconfig from a file configured via --kubeconfig flag.

If you are upgrading your Cluster Federation components from v1.4.x, please update your `federation-apiserver` and `federation-controller-manager` manifests to the new version:
```

cc @kubernetes/sig-cluster-federation
2016-11-05 15:35:23 -07:00
Clayton Coleman 0be25e481b
generated: docs 2016-11-04 23:38:37 -04:00
Kubernetes Submit Queue ec6a5d279f Merge pull request #36019 from mwielgus/fed-secret-nn
Automatic merge from submit-queue

Switch federated secret controller to use NamespacedName

To make it cleaner and consistent with other controllers.

cc: @quinton-hoole
2016-11-04 20:24:19 -07:00
Marcin 8b91e49510 Autogenerated bazel 2016-11-05 01:14:09 +01:00
Madhusudan.C.S efafff4078 [Federation] Update the deprecated name for 1.5 and try with flags only when `--kubeconfig` is non-empty. 2016-11-04 11:31:31 -07:00
Madhusudan.C.S dbfc110934 For backwards compatibility, directly try to build the rest client config from the secret if --kubeconfig flag is empty. 2016-11-04 11:31:30 -07:00
Madhusudan.C.S 362c561bd4 Read the federation controller manager kubeconfig from a filesystem path.
This decoupling from the Kubernetes API allows admins to run federation
control plane components wherever they like, even outside Kubernetes.
2016-11-04 11:31:30 -07:00
Marcin d010d1d897 Autogen updates for configmap controller 2016-11-04 16:44:40 +01:00
Marcin Wielgus 493cdf9328 Federated ConfigMap controller 2016-11-04 16:43:00 +01:00
Madhusudan.C.S efea270553 [Federation][init-08] Refactor the tests by pulling the common utilities into a testing package.
This makes these utilities reusable by other packages.
2016-11-04 01:03:41 -07:00
Madhusudan.C.S dd365b42bf [Federation][init-07] Pull the default federation namespace into a constant. 2016-11-04 00:13:20 -07:00
Madhusudan.C.S caef02cf43 [Federation][init-06] Check for the availability of federation API server's service loadbalancer address before waiting.
This speeds up the tests. Otherwise tests end up unnecessarily waiting for the
poll interval/duration which is 5 seconds right now.
2016-11-04 00:12:11 -07:00
Madhusudan.C.S d70d961689 [Federation][init-05] Separate the notions of controller manager name and federation name in the controller manager deployment spec. 2016-11-03 16:12:03 -07:00
Madhusudan.C.S 47977fbbc4 [Federation][init-04] Explicitly specify the number of API server and controller manager replicas. 2016-11-03 15:45:53 -07:00
Madhusudan.C.S 1b929bd4c1 [Federation][init-03] Print the federation API server address on success. 2016-11-03 15:45:24 -07:00
Kubernetes Submit Queue fc6db328ce Merge pull request #35859 from madhusudancs/federation-kubefed-init-02
Automatic merge from submit-queue

[Federation][init-02] Stop passing command factory to the init command.

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

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @nikhiljindal
2016-11-03 13:53:03 -07:00
Kubernetes Submit Queue 758c56cc85 Merge pull request #35856 from madhusudancs/federation-kubefed-init-01
Automatic merge from submit-queue

[Federation] Add unit tests for `kubefed init`'s certificate generator.

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

These are a subset of unit tests for code introduced in PR #35594

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @quinton-hoole
2016-11-03 11:19:01 -07:00
Kubernetes Submit Queue 2f84a7c8d2 Merge pull request #35594 from madhusudancs/federation-kubefed-init-00
Automatic merge from submit-queue

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

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

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

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

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @quinton-hoole @nikhiljindal
2016-11-03 02:08:14 -07:00
Madhusudan.C.S b8109eae5b [Federation][init-02] Stop passing command factory to the init command.
Init command completely relies on the host factory, so it is unnecessary
to pass the default command factory to the init command.
2016-11-02 19:28:17 -07:00
Madhusudan.C.S 331ef53b69 [Federation][init-01] Add unit tests for `kubefed init`'s certificate generator. 2016-11-02 19:27:39 -07:00
Kubernetes Submit Queue 9a7ad2e20d Merge pull request #35592 from madhusudancs/federation-kubefed-04
Automatic merge from submit-queue

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

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

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @quinton-hoole @nikhiljindal
2016-11-02 14:48:46 -07:00
Kubernetes Submit Queue d28f7031a1 Merge pull request #35494 from madhusudancs/federation-kubefed-02
Automatic merge from submit-queue

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

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

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

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @quinton-hoole @nikhiljindal
2016-11-02 13:36:43 -07:00
Madhusudan.C.S 4a9377027d [Federation][init] Implement `kubefed init` command that performs federation control plane bootstrap. 2016-11-02 13:36:41 -07:00
Madhusudan.C.S 9a0fc0c4f5 [Federation][(Un)join-01] Refactor common functions and structs into a util package. 2016-11-02 13:36:09 -07:00
Madhusudan.C.S 3c692ebd77 [Federation] Implement the `kubefed` command.
Also:
1. Add it to the client build targets list.
2. Register `kubefed join` and `kubefed unjoin` commands.
2016-11-02 12:48:20 -07:00
Kubernetes Submit Queue 7d14b568c3 Merge pull request #36001 from smarterclayton/change_double_decode
Automatic merge from submit-queue

Avoid double decoding all client responses

Fixes #35982 

The linked issue uncovered that we were always double decoding the response in restclient for get, list, update, create, and patch.  That's fairly expensive, most especially for list.  This PR refines the behavior of the rest client to avoid double decoding, and does so while minimizing the changes to rest client consumers.

restclient must be able to deal with multiple types of servers. Alter the behavior of restclient.Result#Raw() to not process the body on error, but instead to return the generic error (which still matches the error checking cases in api/error like IsBadRequest). If the caller uses
.Error(), .Into(), or .Get(), try decoding the body as a Status.

For older servers, continue to default apiVersion "v1" when calling restclient.Result#Error(). This was only for 1.1 servers and the extensions group, which we have since fixed.

This removes a double decode of very large objects (like LIST) - we were trying to DecodeInto status, but that ends up decoding the entire result and then throwing it away.  This makes the decode behavior specific to the type of action the user wants.

```release-note
The error handling behavior of `pkg/client/restclient.Result` has changed.  Calls to `Result.Raw()` will no longer parse the body, although they will still return errors that react to `pkg/api/errors.Is*()` as in previous releases.  Callers of `Get()` and `Into()` will continue to receive errors that are parsed from the body if the kind and apiVersion of the body match the `Status` object.

This more closely aligns rest client as a generic RESTful client, while preserving the special Kube API extended error handling for the `Get` and `Into` methods (which most Kube clients use).
```
2016-11-02 11:36:41 -07:00
Madhusudan.C.S 90d46c8670 [Federation][unjoin-00] Implement `kubefed unjoin` command.
Also, add unit tests for `kubefed unjoin`.
2016-11-02 11:22:46 -07:00
Clayton Coleman f0fa26bcf6
ExportOptions should be registered to all public schemas 2016-11-01 22:55:58 -04:00
Marcin Wielgus 6c0016181d Switch federated secret controller to use NamespacedName 2016-11-01 23:53:46 +01:00
Madhusudan.C.S 2342f6eefb [Federation][join-01] Implement `kubefed join` command.
Also, add unit tests for `kubefed join`.
2016-11-01 12:45:28 -07:00
Dr. Stefan Schimanski d0b3981f07 Make GenericApiServer.Run interruptable and fail on first listen 2016-11-01 09:50:56 +01:00
Kubernetes Submit Queue cc84673ebe Merge pull request #35928 from caesarxuchao/remove-clientset-archive
Automatic merge from submit-queue

Remove archived clientset

We have [client-go](https://github.com/kubernetes/client-go) now, no need to keep archived clientset in master of k8s.io/kubernetes.

Also updated the client-gen README.

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

cc @mikedanese 

```release-note
The main kubernetes repository stops hosting archived version of released clients. Please use [client-go](https://github.com/kubernetes/client-go).
```
2016-11-01 00:41:46 -07:00
Kubernetes Submit Queue a9b183db7f Merge pull request #32557 from asalkeld/an-ingress-docs
Automatic merge from submit-queue

Correct the article in generated documents

**What this PR does / why we need it**:
Fix the article in generated docs for "create/delete [article] [kind]"

**Which issue this PR fixes**
fixes #32305

**Special notes for your reviewer**:
None

**Release note**:

``` release-note
Correct the article in generated documents
```

For example:
  "a Ingress" > "an Ingress"
2016-10-31 23:16:46 -07:00
Chao Xu 4cf7adf937 remove release_1_4
remove archived federation clientsets
update README
2016-10-31 15:05:26 -07:00
Clayton Coleman ab673bbc9a
generated: alternative unsafe conversions 2016-10-31 11:00:29 -04:00
Dr. Stefan Schimanski ab3ce27f01 Make master+federation ServerRunOptions embeddings explicit 2016-10-31 11:04:58 +01:00
Dr. Stefan Schimanski d6dc0e561f Apiserver cleanups
- remove unused genericapiserver Config.MasterServiceNamespace
- move init code into ApplyOptions
- initialize genericapiserver Config.MaxRequestsInFlight
- move ServiceReadWritePort to master
2016-10-31 10:55:19 +01:00
Justin Santa Barbara a3ba760a27 Federation: separate notion of zone-name & dns-suffix
We can put subdomains into hosted zones (for example,
foo.federation.example.com can be hosted in example.com)

By allowing sharing a common hosted zone, this means the user doesn't
have to do as much setup.
2016-10-30 20:50:09 -04:00
Angus Salkeld 3a08cf0619 Correct the article in generated documents
For example:

  "a Ingress" > "an Ingress"
2016-10-31 09:46:29 +10:00
Chao Xu 850729bfaf include multiple versions in clientset
update client-gen to use the term "internalversion" rather than "unversioned";
leave internal one unqualified;
cleanup client-gen
2016-10-29 13:30:47 -07:00
Kubernetes Submit Queue 4ec036c8af Merge pull request #35452 from deads2k/auth-02-front-proxy
Automatic merge from submit-queue

allow authentication through a front-proxy

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

@kubernetes/sig-auth fyi
@erictune per-request
@liggitt you wrote the openshift one, ptal.
2016-10-29 07:52:09 -07:00
Kubernetes Submit Queue bb9e3d3324 Merge pull request #35687 from shashidharatd/federation-ci2
Automatic merge from submit-queue

Fix federation-apiserver authentication e2e tests

**What this PR does / why we need it**: Fixes couple of federation e2e tests

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # partly fixes #35251
2016-10-29 07:12:15 -07:00
Clayton Coleman edd5262e03
generated: API docs 2016-10-28 11:30:12 -04:00
deads2k 3f9a4d51d5 wire up authenticating front proxy: 2016-10-28 08:36:46 -04:00
fmeng c2cec013de register default functions for federation/apis/core 2016-10-28 15:12:10 +08:00
shashidharatd bc62f83ff6 Fix federation-apiserver authentication e2e tests 2016-10-27 16:48:09 +05:30
Kubernetes Submit Queue dcdbf27d4f Merge pull request #34648 from nikhiljindal/NSCasDel
Automatic merge from submit-queue

Adding cascading deletion support to federated namespaces

Ref https://github.com/kubernetes/kubernetes/issues/33612

With this change, whenever a federated namespace is deleted with `DeleteOptions.OrphanDependents = false`, then federation namespace controller first deletes the corresponding namespaces from all underlying clusters before deleting the federated namespace.

cc @kubernetes/sig-cluster-federation @caesarxuchao


```release-note
Adding support for DeleteOptions.OrphanDependents for federated namespaces. Setting it to false while deleting a federated namespace also deletes the corresponding namespace from all registered clusters.
```
2016-10-26 21:04:03 -07:00
Kubernetes Submit Queue ab0ee35462 Merge pull request #35651 from caesarxuchao/remove-label-selectors
Automatic merge from submit-queue

Sending #35255 again: Remove versioned LabelSelectors

ref #35255: "Remove versioned LabelSelectors"

FYI @smarterclayton
2016-10-26 18:21:22 -07:00
nikhiljindal f955d556f8 Adding cascading deletion support to federated namespaces 2016-10-26 16:54:12 -07:00
Brian Grant 2ae2339d6a Merge pull request #35546 from thockin/kill-head-scary-warning-on-master
Remove obsolete munger on docs
2016-10-26 16:44:53 -07:00
Chao Xu 0a896a9e57 remove versioned LabelSelector definitions 2016-10-26 13:50:13 -07:00
Clayton Coleman b5a46d914e
generated: conversions 2016-10-26 12:48:45 -04:00
gmarek 24975aad30 Revert "remove versioned LabelSelector definitions"
This reverts commit 1ace8fa9ce.
2016-10-26 16:52:02 +02:00
Wojciech Tyczynski bbb410c7af generated: Safe conversions 2016-10-26 11:20:37 +02:00
Chao Xu 1ace8fa9ce remove versioned LabelSelector definitions 2016-10-25 22:09:02 -07:00
Kubernetes Submit Queue fc7f64a99a Merge pull request #35388 from mbohlool/co2
Automatic merge from submit-queue

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

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

**Release note**:

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

Reference: #13414
2016-10-25 21:25:37 -07:00
Clayton Coleman d1c39c0a76
generated: Unsafe conversions 2016-10-25 19:30:34 -04:00
Tim Hockin b0fa2056a6 Remove 'this is HEAD' warning on docs 2016-10-26 00:06:59 +02:00
mbohlool cf181f91a7 Update OpenAPI specs 2016-10-25 14:27:48 -07:00
Mike Danese 763c4987f2 autogenerated 2016-10-24 14:47:27 -07:00
Mike Danese 27116c6818 rename build/ to build-tools/ 2016-10-24 14:41:56 -07:00
Kubernetes Submit Queue 33ebe1f18b Merge pull request #34905 from ingvagabund/client-to-clientset
Automatic merge from submit-queue

Replace client with clientset

Replace client with clientset in some places

Fixes: #34637
2016-10-24 05:38:43 -07:00
Marcin Wielgus 545cfb1a6f Add configmaps to federation apiserver 2016-10-24 12:09:28 +02:00
Jan Chaloupka 4fde09d308 Replace client with clientset in code 2016-10-23 22:00:35 +02:00
Dr. Stefan Schimanski 05fcc6b56a Update bazel 2016-10-22 14:31:56 +02:00
Dr. Stefan Schimanski cca05af615 Move swagger+openapi setup to routes and decouple from run 2016-10-22 13:42:22 +02:00
mbohlool a6517173ee Generated openapi spec 2016-10-22 02:43:42 -07:00
mbohlool 3e67cf8b9b Add authentication to openapi Spec 2016-10-22 02:43:42 -07:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Kubernetes Submit Queue a7807eb5a4 Merge pull request #34138 from ingvagabund/create-restclient-interface
Automatic merge from submit-queue

Create restclient interface

Refactoring of code to allow replace *restclient.RESTClient with any RESTClient implementation that implements restclient.RESTClientInterface interface.
2016-10-21 16:02:04 -07:00
Jan Chaloupka 6079053407 Update clientset generator to use RESTClient interface instead of the RESTClient data type 2016-10-21 10:13:51 +02:00
Dr. Stefan Schimanski 08d4fa5c4f Turn APIGroupPrefix into a constant 2016-10-19 11:52:15 +02:00
Clayton Coleman 4324e39393
Flag all packages as needing defaulters 2016-10-18 21:07:33 -04:00
Kubernetes Submit Queue 6931fb1830 Merge pull request #34984 from mwielgus/configmap-fed-client
Automatic merge from submit-queue

ConfigMap in federated client

cc: @quinton-hoole @nikhiljindal
2016-10-18 16:21:50 -07:00
Kubernetes Submit Queue 6e2f5f8f6d Merge pull request #28742 from jessfraz/test-go1.7rc1
Automatic merge from submit-queue

Update to go 1.7

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

Closes #33070
Closes #32999

```release-note
Updated Go to 1.7
```


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

This is to test go version 1.7
2016-10-18 05:59:04 -07:00
Kubernetes Submit Queue 67732d7383 Merge pull request #34967 from deads2k/api-27-fix-version
Automatic merge from submit-queue

make version an explicit choice so zero config and customized work

Makes `/version` key off of setting the version.  This allows composers to add a version that is correct.
2016-10-18 05:07:02 -07:00
Kubernetes Submit Queue 7414cafbeb Merge pull request #34860 from mbohlool/optional
Automatic merge from submit-queue

+optional tag for OpenAPI spec

OpenAPI rely on "omitempty" json tag to determine if a field is optional or not. This change will add "+optional" tag to all fields with "omitempty" json tag and support the tag in OpenAPI spec generator.
2016-10-17 22:07:00 -07:00
Marcin 31df1cb113 Autogenerated code for config map federated client 2016-10-17 23:44:47 +02:00
deads2k 5a9b16d40a make version an explicit choice so zero config and customized work 2016-10-17 16:10:07 -04:00
mbohlool 0191433d58 Generated protobufs 2016-10-17 09:11:20 -07:00
mbohlool 25afcc5522 Add +optional tag to all fields with omitempty json tag 2016-10-17 08:52:13 -07:00
deads2k 14c164a328 add ownerref permission checks 2016-10-17 09:38:05 -04:00