Commit Graph

391 Commits (1dfd6ab0c11d95ef5d5352509c90fdab5ce4ed29)

Author SHA1 Message Date
Marcin Wielgus 044fab9f58 Events for federated namesapce controller 2016-08-30 16:28:49 +02:00
Marcin Wielgus 6531c83b7b OnError callback function for federated updater 2016-08-30 12:01:50 +02:00
Kubernetes Submit Queue 1919fe3a59 Merge pull request #31526 from mwielgus/event-sink
Automatic merge from submit-queue

EventSink for federated controllers

So that the controllers can reuse k8s.io/kubernetes/pkg/client/record machinery.

cc: @quinton-hoole @nikhiljindal @kubernetes/sig-cluster-federation
2016-08-29 13:46:24 -07:00
Kubernetes Submit Queue 09a97203aa Merge pull request #30744 from madhusudancs/fed-split-build-to-develop-deploy
Automatic merge from submit-queue

Separate federation build.sh into development and deployment scripts.

The idea behind this separation is that it provides a clear distinction
between the dev environment and the prod environment. The
deploy/deploy.sh script will be shipped to the users, but
develop/develop.sh will be purely for development purposes and won't
be part of a release distribution.

Purely for developer convenience, all the deployment functionality is
made available through the develop/develop.sh script.

This change also copies deploy/* files into the release distribution.

cc @kubernetes/sig-cluster-federation @colhom 

```release-note
Federation can now be deployed using the `federation/deploy/deploy.sh` script. This script does not depend on any of the development environment shell library/scripts. This is an alternative to the current `federation-up.sh`/`federation-down.sh` scripts. Both the scripts are going to co-exist in this release, but the `federation-up.sh`/`federation-down.sh` scripts might be removed in a future release in favor of `federation/deploy/deploy.sh` script.
```
2016-08-29 13:46:19 -07:00
Madhusudan.C.S a39f8ed943 Update README. 2016-08-29 10:49:20 -07:00
Marcin Wielgus 417913234d EventSink for federated controllers 2016-08-27 19:48:11 +02:00
Kubernetes Submit Queue 961ef2b51d Merge pull request #31470 from caesarxuchao/regenerate-release-1-4
Automatic merge from submit-queue

Fix missing expansion files in clientset release 1.4

<!--  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**:
Fix missing expansion files in clientset release 1.4;
Update the client-gen tool to automatically update generated_expansion.go;
Update the readme to document the best practice of using client-gen.

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

https://github.com/kubernetes/kubernetes/issues/29698#issuecomment-241315798


**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
```

cc @lavalamp @krousey @mbohlool
2016-08-27 00:45:52 -07:00
Kubernetes Submit Queue adc2db5ff9 Merge pull request #29929 from madhusudancs/fed-bin-downsize-v2
Automatic merge from submit-queue

[Federation] Downsize the release binary distribution v2.

Second attempt of PR #29632.

There are two things that this PR does:

1. It removes `federation-apiserver` and `federation-controller-manager` from binaries and docker_wrapped_binaries target lists.
2. Build the docker image for `hyperkube` on-the-fly while pushing the federation images. 

```release-note
Federation binaries and their corresponding docker images - `federation-apiserver` and `federation-controller-manager` are now folded in to the `hyperkube` binary. If you were using one of these binaries or docker images, please switch to using the `hyperkube` version. Please refer to the federation manifests - `federation/manifests/federation-apiserver.yaml` and `federation/manifests/federation-controller-manager-deployment.yaml` for examples.
```

cc @kubernetes/sig-cluster-federation @colhom 

Fixes Issue #28633
2016-08-26 15:11:58 -07:00
Chao Xu bf578f1bc2 run client-gen 2016-08-26 10:55:22 -07:00
Marcin Wielgus 9cdcb31d2b Increase log level for debug infos in Federated ReplicaSet controller 2016-08-26 17:39:06 +02:00
Kubernetes Submit Queue 6eb279ee6e Merge pull request #31512 from mwielgus/more-debug-rs
Automatic merge from submit-queue

More scheduling debug in federated replica set

cc: @quinton-hoole @jianhuiz @kubernetes/sig-cluster-federation
2016-08-26 06:49:11 -07:00
Marcin Wielgus 535a110603 More scheduling debug in federated replica set 2016-08-26 13:48:16 +02:00
Kubernetes Submit Queue 23d0937eaf Merge pull request #31438 from mwielgus/ns-controller-delete
Automatic merge from submit-queue

Proper phase/finalizer logic in federated namespace controller

Part 1 of delete logic cleanup.
Part 2 will contain namespace content deletion and tests.

cc: @quinton-hoole @kubernetes/sig-cluster-federation
2016-08-26 04:39:36 -07:00
Marcin Wielgus 31dd5e8d91 Proper phase/finalizer logic in federated namespace controller 2016-08-26 12:44:20 +02:00
Kubernetes Submit Queue 40efde7e0a Merge pull request #31390 from hongchaodeng/fix
Automatic merge from submit-queue

return destroy func to clean up internal resources of storage

What?
Provide a destroy func to clean up internal resources of storage.
It changes **unit tests** to clean up resources. (Maybe fix integration test in another PR.)

Why?
Although apiserver is designed to be long running, there are some cases that it's not.
See https://github.com/kubernetes/kubernetes/issues/31262#issuecomment-242208771
We need to gracefully shutdown and clean up resources.
2016-08-25 16:44:10 -07:00
Madhusudan.C.S a6ff2364c5 Addressed review comments. 2016-08-25 14:34:19 -07:00
Madhusudan.C.S 833d758070 Limit sourcing the build scripts only for build/push phase of federation control plane components. 2016-08-25 14:29:55 -07:00
Madhusudan.C.S d9cea93eb6 [Federation] Do not build separate binaries for federation control plane components, hyperkube should be sufficient.
Also build the hyperkube docker image on-the-fly.

This is only a temporary fix until the proposal in issue
https://github.com/kubernetes/kubernetes/issues/28630 is implemented.

Also, the new build/deployment method completely obviates this step.

We use debian image instead of busybox and do not build hyperkube as a
static binary yet. Wait until PR
https://github.com/kubernetes/kubernetes/pull/26028 is merged to build
static hyperkube binaries.
2016-08-25 14:29:32 -07:00
Madhusudan.C.S 9650a84f7b Separate federation build.sh into development and deployment scripts.
The idea behind this separation is that it provides a clear distinction
between the dev environment and the prod environment. The
deploy/deploy.sh script will be shipped to the users, but
develop/develop.sh will be purely for development purposes and won't
be part of a release distribution.

Purely for developer convenience, all the deployment functionality is
made available through the develop/develop.sh script.

This change also copies deploy/* files into the release distribution.
2016-08-25 12:37:50 -07:00
Kubernetes Submit Queue b44b716965 Merge pull request #31248 from wojtek-t/better_selectable_fields
Automatic merge from submit-queue

Avoid unnecessary copies & allocations in field selectors
2016-08-25 09:01:44 -07:00
Hongchao Deng 9fc0e1e98d return destroy func to clean up internal resources of storage 2016-08-25 08:32:21 -07:00
Madhusudan.C.S 8868459d92 Underscore is not a valid secret data key, so use underscore instead. 2016-08-25 00:12:12 -07:00
Kubernetes Submit Queue 4f4c50223e Merge pull request #31265 from mwielgus/fed-test-ref
Automatic merge from submit-queue

Federation controller tests refactoring - move common func to utils

cc: @quinton-hoole @kubernetes/sig-cluster-federation
2016-08-24 10:11:42 -07:00
Wojciech Tyczynski d5a596bca1 More efficient field selectors 2016-08-24 09:08:38 +02:00
Marcin Wielgus 1d2e9a2d31 Federation controller tests refactoring 2016-08-23 18:33:04 +02:00
Kubernetes Submit Queue d6fb8b06dd Merge pull request #31231 from mwielgus/rs-fix3
Automatic merge from submit-queue

Test if 2 federated informers in rs controller are in sync

cc: @quinton-hoole @kubernetes/sig-cluster-federation
2016-08-23 08:04:11 -07:00
Kubernetes Submit Queue ea7d417377 Merge pull request #31237 from mwielgus/secret-tests
Automatic merge from submit-queue

Tests for data update in federated secret controller

cc: @quinton-hoole @kubernetes/sig-cluster-federation
2016-08-23 06:36:51 -07:00
Marcin Wielgus e29cf44a1e Tests for data update in federated secret controller 2016-08-23 14:42:51 +02:00
Kubernetes Submit Queue 794761f1d6 Merge pull request #31224 from mwielgus/hadnlers-fix
Automatic merge from submit-queue

ObjectMeta equivalence in federated controller handlers + update in fed secrets

Federated secrets should trigger also on data/type update, not only on object meta.

cc: @quinton-hoole @kubernetes/sig-cluster-federation
2016-08-23 05:13:17 -07:00
Kubernetes Submit Queue 4b949093c2 Merge pull request #28921 from jianhuiz/federation-cluster-in-meta
Automatic merge from submit-queue

Add Cluster field in ObjectMeta

There will be no sub-rs, but add `Cluster` field to the ObjectMeta (for all the objects)

"To distinguish the object at the federation level from it's constituents at the cluster level we will add a "Cluster" field to the metadata of all objects (where the federation itself will also have a cluster identifier).  That way it is possible to list, interact with, and distinguish between the objects either at the federation level or at the individual cluster level based on the cluster identifier. "


@quinton-hoole @nikhiljindal @deepak-vij @mfanjie @huangyuqi

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-08-23 04:33:51 -07:00
Marcin Wielgus 7d1c85e476 Test if 2 federated informers in rs controller are in sync 2016-08-23 13:10:48 +02:00
Marcin Wielgus 3216336923 Set annotation name in federated replica set controller 2016-08-23 11:48:25 +02:00
Marcin Wielgus 1f5605763f ObjectMeta equivalence in federated controller handlers + update in fed secrets 2016-08-23 11:45:01 +02:00
Kubernetes Submit Queue 13305ef0ff Merge pull request #31139 from nikhiljindal/namespaceAdmissionControl
Automatic merge from submit-queue

federation: Adding support for namespace admission controls in federation-apiserver

Now that we have namespaces in federation apiserver, we can support namespace admission controls.

There are 3 of these:
namespace/autoprovision, namespace/exists and namespace/lifecycle.
namespace/autoprovision, namespace/exists should be deprecated in kubernetes(https://github.com/kubernetes/kubernetes/issues/31195). Adding support for namespace/lifecycle to federation-apiserver.
As in kube-apiserver, enabling namespace/lifecycle by default.


```release-note
Action required: If you have a running federation control plane, you will have to ensure that for all federation resources, the corresponding namespace exists in federation control plane.

federation-apiserver now supports NamespaceLifecycle admission control, which is enabled by default. Set the --admission-control flag on the server to change that.
```

cc @kubernetes/sig-cluster-federation @quinton-hoole
2016-08-23 00:19:08 -07:00
jianhuiz 494129b089 add generated files 2016-08-22 23:00:23 -07:00
nikhiljindal db7af6c0d7 Fixing/updating e2e tests 2016-08-22 21:49:34 -07:00
jianhuiz 7be20b0dac add ClusterName field to ObjectMeta 2016-08-22 21:09:57 -07:00
nikhiljindal 18a8597a4e Enabling namespace admission controls 2016-08-22 17:28:03 -07:00
Quinton Hoole 97d6494c41 Add Federated Ingress Controller. 2016-08-22 12:59:54 -07:00
jianhuiz 257bda7e1c review fix 2016-08-22 09:27:31 -07:00
jianhuiz 7598d43db0 use palnner v2 and pod analyzer 2016-08-22 09:27:31 -07:00
jianhuiz a491580597 add federation replicaset controller 2016-08-22 09:27:30 -07:00
Kubernetes Submit Queue 069929bbfd Merge pull request #31076 from mwielgus/object-meta
Automatic merge from submit-queue

Object meta fixes in federation controllers

This PR adds helper functions for handling object meta structs and applies them to the existing controllers.

cc: @quinton-hoole @jianhuiz @kubernetes/sig-cluster-federation
2016-08-21 13:19:55 -07:00
Marcin Wielgus 9b00a6654c Comments and extra tests for federated ObjectMeta utils 2016-08-21 21:14:07 +02:00
Kubernetes Submit Queue 7979801e54 Merge pull request #28860 from ericchiang/separate-apiserver-authz-options
Automatic merge from submit-queue

pkg/genericapiserver/options: don't import pkg/apiserver

Refactor the authorization options for the API server so
pkg/apiserver isn't directly imported by the options package.

Closes #28544

cc @smarterclayton

@madhusudancs, @nikhiljindal I've updated `federation/cmd/federation-apiserver/app/server.go` to include the RBAC options with this change. I don't know if this was intentionally left out in the first place but would like your feedback.
2016-08-21 09:49:14 -07:00
Marcin Wielgus b0ec300ce8 Apply object meta functions to controllers 2016-08-21 13:02:55 +02:00
Marcin Wielgus 66df63f618 Object meta helper functions for federated controller 2016-08-21 13:02:19 +02:00
Kubernetes Submit Queue ada58f5ff2 Merge pull request #30823 from nikhiljindal/swaggerDocs
Automatic merge from submit-queue

Adding a script to fetch swagger spec from federation apiserver

First step for https://github.com/kubernetes/kubernetes/issues/30541.
Next step is to generate docs like http://kubernetes.io/docs/api-reference/v1/definitions/ from this swagger spec.

cc @kubernetes/sig-cluster-federation @kubernetes/sig-api-machinery
2016-08-20 18:09:58 -07:00
Kubernetes Submit Queue eaa2b6f528 Merge pull request #31042 from jianhuiz/federation-informer-kube-client
Automatic merge from submit-queue

Federation informer use kube clientset for target

This is to use kubernetes clientset as the federation informer target clientset as it's used to talking the k8s cluster.

#29939 #30669 #30207
@mwielgus @quinton-hoole @kshafiee @deepak-vij
2016-08-20 08:06:08 -07:00
nikhiljindal 56a2458d29 Adding cert and basic auth files for federation-apiserver 2016-08-20 02:17:39 -07:00