Commit Graph

724 Commits (2e671715e0c9a6ccb3238193e27cb8b040681ee7)

Author SHA1 Message Date
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
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 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
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
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