Commit Graph

677 Commits (a2f2e1d4918effb4f0994333c7b88086674e4a5b)

Author SHA1 Message Date
Dr. Stefan Schimanski 7ffa2faeac Workaround tcpv4-only-systems connect issue in test
Fixes https://github.com/kubernetes/kubernetes/issues/47304.

Workarounds https://github.com/golang/go/issues/18806 (fixed in Go 1.9+).
2017-07-10 09:27:48 +02:00
Maru Newby d6b2ec2ca8 fed: Remove flakey and redundant replicaset unit test 2017-07-07 10:57:06 -07:00
Kubernetes Submit Queue c75170ad8e Merge pull request #46848 from zjj2wry/err_message
Automatic merge from submit-queue

Fix some err message

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-06 10:02:03 -07:00
Jonathan MacMillan 90ee0c4e0b [Federation] Convert the deployment controller to a sync controller. 2017-06-28 17:15:48 -07:00
Jordan Liggitt dc4f46b85a
Retry finding RBAC version if not found in discovery cache 2017-06-26 12:45:22 -04:00
FengyunPan 26c6cb3877 [Federation]Remove duplicate constants 2017-06-24 11:14:50 +08:00
Jonathan MacMillan 16943f6f30 [Federation] Convert the ReplicaSet controller to a sync controller. 2017-06-22 17:47:43 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu 945593d4de manually fix unit tests 2017-06-22 11:30:59 -07:00
Chao Xu f2d3220a11 run root-rewrite-import-client-go-api-types 2017-06-22 11:30:59 -07:00
Chao Xu cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Kubernetes Submit Queue d86c267112 Merge pull request #46099 from shashidharatd/revert-45798-federated-service
Automatic merge from submit-queue (batch tested with PRs 47851, 47824, 47858, 46099)

Revert "[Federation] Fix federated service reconcilation issue due to addition of External…"

Reverts kubernetes/kubernetes#45798

Reverting the temporary fix as the problem is fixed in #45869.
with that fix federation also can default ExternalTrafficLocalOnly if not set.

Issue: #45812

cc @MrHohn @madhusudancs @kubernetes/sig-federation-bugs
2017-06-21 15:21:19 -07:00
Kubernetes Submit Queue 0a1e20d605 Merge pull request #47473 from janetkuo/revert-47103
Automatic merge from submit-queue (batch tested with PRs 47451, 47410, 47598, 47616, 47473)

Revert "Ignore `daemonset-controller-hash` label key in federation before comparing the federated object with its cluster equivalent."

This reverts commit 3530c9ce87.

~This needs to wait for #47258, otherwise federation test won't pass~ (merged)

**Release note**:

```release-note
NONE
```
2017-06-15 19:52:15 -07:00
Kubernetes Submit Queue ce76bab3b3 Merge pull request #46960 from lukaszo/fedint
Automatic merge from submit-queue

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

Previously NodeLegacyHostIP was used as a fallback (see #41243) but in 1.7 it was removed (#44830)
Now clusters where nodes have not set ExternalIP can not be used by kubefed to setup federation.

cc @shashidharatd 

```release-note
kubefed will now configure NodeInternalIP as the federation API server endpoint when NodeExternalIP is unavailable for federation API servers exposed as NodePort services
```
2017-06-14 07:52:12 -07:00
Janet Kuo 1dc3b77580 Revert "Ignore `daemonset-controller-hash` label key in federation before comparing the federated object with its cluster equivalent."
This reverts commit 3530c9ce87.
2017-06-13 17:00:27 -07:00
Derek Carr 77f5721152 Incorrect output in kubefed init 2017-06-10 14:48:26 -04:00
Madhusudan.C.S 3530c9ce87 Ignore `daemonset-controller-hash` label key in federation before comparing the federated object with its cluster equivalent.
Kubernetes daemonset controller writes a daemonset's hash to the object
label as an optimization to avoid recomputing it every time. Adding a
new label to the object that the federation is unaware of causes
problems because federated controllers compare the objects in
federation and their equivalents in clusters and try to reconcile them.
This leads to a constant fight between the federated daemonset
controller and the cluster controllers, and they never reach a stable
state.

Ideally, cluster components should not update an object's spec or
metadata in a way federation cannot replicate. They can update an
object's status though. Therefore, this daemonset hash should be a
field in daemonset's status, not a label in object meta. @janetkuo says
that this label is only a short term solution. In the near future, they
are going to replace it with revision numbers in daemonset status. We
can then rip this bandaid out.
2017-06-07 09:28:48 -07:00
Clayton Coleman 034f06d7e4
Remove Initializers from federation 2017-06-05 19:12:36 -04:00
Kubernetes Submit Queue 6236522738 Merge pull request #46498 from zjj2wry/adherence
Automatic merge from submit-queue (batch tested with PRs 45871, 46498, 46729, 46144, 46804)

Fix some comments in dnsprovider

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-05 03:06:22 -07:00
Łukasz Oleś 6e6c903a04 Add NodeInternalIP as a fallback to federation api-server nodeport service 2017-06-05 11:28:05 +02:00
Kubernetes Submit Queue 445795186d Merge pull request #46483 from shashidharatd/fed-sc-ut-delete
Automatic merge from submit-queue (batch tested with PRs 36721, 46483, 45500, 46724, 46036)

Federation: Minor corrections in service controller and add a unit testcase

**What this PR does / why we need it**:
This PR fixes few outdated comments in federation service controller and few other minor fixes.
This also adds a unit test case to test federated service deletion.


/assign @quinton-hoole 
/cc @marun @kubernetes/sig-federation-pr-reviews 

```release-note
NONE
```
2017-06-03 08:08:38 -07:00
Kubernetes Submit Queue 07f85565a2 Merge pull request #36721 from smarterclayton/initializers
Automatic merge from submit-queue

Add initializer support to admission and uninitialized filtering to rest storage

Initializers are the opposite of finalizers - they allow API clients to react to object creation and populate fields prior to other clients seeing them.

High level description:

1. Add `metadata.initializers` field to all objects
2. By default, filter objects with > 0 initializers from LIST and WATCH to preserve legacy client behavior (known as partially-initialized objects)
3. Add an admission controller that populates .initializer values per type, and denies mutation of initializers except by certain privilege levels (you must have the `initialize` verb on a resource)
4. Allow partially-initialized objects to be viewed via LIST and WATCH for initializer types
5. When creating objects, the object is "held" by the server until the initializers list is empty
6. Allow some creators to bypass initialization (set initializers to `[]`), or to have the result returned immediately when the object is created.

The code here should be backwards compatible for all clients because they do not see partially initialized objects unless they GET the resource directly. The watch cache makes checking for partially initialized objects cheap. Some reflectors may need to change to ask for partially-initialized objects.

```release-note
Kubernetes resources, when the `Initializers` admission controller is enabled, can be initialized (defaulting or other additive functions) by other agents in the system prior to those resources being visible to other clients.  An initialized resource is not visible to clients unless they request (for get, list, or watch) to see uninitialized resources with the `?includeUninitialized=true` query parameter.  Once the initializers have completed the resource is then visible.  Clients must have the the ability to perform the `initialize` action on a resource in order to modify it prior to initialization being completed.
```
2017-06-03 07:16:52 -07:00
Kubernetes Submit Queue 348bf1e032 Merge pull request #46627 from deads2k/api-12-labels
Automatic merge from submit-queue (batch tested with PRs 46239, 46627, 46346, 46388, 46524)

move labels to components which own the APIs

During the apimachinery split in 1.6, we accidentally moved several label APIs into apimachinery.  They don't belong there, since the individual APIs are not general machinery concerns, but instead are the concern of particular components: most commonly the kubelet.  This pull moves the labels into their owning components and out of API machinery.

@kubernetes/sig-api-machinery-misc @kubernetes/api-reviewers @kubernetes/api-approvers 
@derekwaynecarr  since most of these are related to the kubelet
2017-06-02 23:37:38 -07:00
Clayton Coleman 4ce3907639
Add Initializers to all admission control paths by default 2017-06-02 22:09:04 -04:00
Kubernetes Submit Queue 77710c41bb Merge pull request #45563 from perotinus/rssyncconversion
Automatic merge from submit-queue (batch tested with PRs 46801, 45184, 45930, 46192, 45563)

[Federation] Add a SchedulingAdapter that can extend the FederatedTypeAdapter and that provides hooks for scheduling objects into clusters.

**Release note**:
```release-note
NONE
```
2017-06-02 18:06:00 -07:00
zhengjiajin 6bc2d4257b fix some err message 2017-06-02 18:33:05 +08:00
Kubernetes Submit Queue 3e1d68624e Merge pull request #46323 from marun/fed-kubefed-beta-storage-class-annotation
Automatic merge from submit-queue (batch tested with PRs 46686, 45049, 46323, 45708, 46487)

[Federation][kubefed]: Use StorageClassName for etcd pvc

This PR updates kubefed to use the StorageClassName field [added in 1.6](http://blog.kubernetes.io/2017/03/dynamic-provisioning-and-storage-classes-kubernetes.html
) for etcd's pvc to allow the user to specify which storage class they want to use.  If no value is provided to ``kubefed init``, the field will not be set, and initialization of the pvc may fail on a cluster without a default storage class configured.

The alpha annotation that was previously used (``volume.alpha.kubernetes.io/storage-class``) was deprecated as of 1.4 according to the following blog post:

http://blog.kubernetes.io/2016/10/dynamic-provisioning-and-storage-in-kubernetes.html

**Release note**:

```
'kubefed init' has been updated to support specification of the storage class (via --etcd-pv-storage-class) for the Persistent Volume Claim (PVC) used for etcd storage.  If --etcd-pv-storage-class is not specified, the default storage class configured for the cluster will be used.
```

cc: @kubernetes/sig-federation-pr-reviews
2017-06-01 03:42:07 -07:00
shashidharatd b4ddf4720d Auto generated files 2017-06-01 06:14:56 +05:30
shashidharatd 296fe66bf7 Add federated service delete unit testcase 2017-06-01 06:14:55 +05:30
shashidharatd be0d7f0aeb Add RegisterFakeOnDelete to test federation object deletion 2017-06-01 06:14:55 +05:30
shashidharatd 80ceb5b3d6 Some minor corrections in service controller 2017-06-01 06:14:55 +05:30
deads2k 954eb3ceb9 move labels to components which own the APIs 2017-05-31 10:32:06 -04:00
Kubernetes Submit Queue 9c7b59778c Merge pull request #46394 from alexandercampbell/write-help-messages-to-stdout
Automatic merge from submit-queue (batch tested with PRs 46394, 46650, 46436, 46673, 46212)

Write "kubectl options" help message to stdout, not stderr

Fix a very minor issue causing `kubectl` to write its help messages to `stderr` instead of `stdout`.

Try this:

`kubectl options | grep log`

It should print only the options related to logging, but right now it prints the entire help menu (since it's printing to stderr).

This patch brings us closer to unix convention and reduces user friction.

~~Another use case (if a user can't remember whether it's `-r` or `-R` for recursion):~~

~~`kubectl patch -h | grep recursive`~~

Update: this patch only affects `kubectl options`. The other commands are working as intended.

**Release note**:

```release-note
NONE
```
2017-05-31 00:14:00 -07:00
Jonathan MacMillan 1130b368eb [Federation] Add a SchedulingAdapter that can extend the FederatedTypeAdapter and that provides hooks for scheduling objects into clusters. 2017-05-30 12:08:53 -07:00
Kubernetes Submit Queue cd2e304360 Merge pull request #45534 from YuPengZTE/devPodStatus
Automatic merge from submit-queue (batch tested with PRs 45534, 37212, 46613, 46350)

check err

Signed-off-by: yupengzte <yu.peng36@zte.com.cn>



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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-05-30 04:45:59 -07:00
Alexander Campbell 0d65d9594c cmd/options: `kubectl options` writes to `out` stream
Previous behavior was to write to stderr (thanks to the fallback system
in the Cobra library), which made it difficult to grep for flags.

For example:

	kubectl options | grep recursive
2017-05-28 11:23:44 -07:00
Kubernetes Submit Queue f8c90e04cd Merge pull request #46252 from perotinus/cs
Automatic merge from submit-queue (batch tested with PRs 46252, 45524, 46236, 46277, 46522)

[Federation] Refactor the cluster selection logic in the sync controller

This is intended to make it easier to define the interaction between cluster selection and scheduling preferences in the sync controller when used for workload types.

**Release note**:

```release-note
NONE
```
2017-05-26 19:47:56 -07:00
Kubernetes Submit Queue b30ed6d7b8 Merge pull request #46019 from YuPengZTE/devAnalysePods
Automatic merge from submit-queue (batch tested with PRs 46450, 46272, 46453, 46019, 46367)

check err

Signed-off-by: yupengzte <yu.peng36@zte.com.cn>



**What this PR does / why we need it**:
When the err in not nil, the podStatus is nil, it is dangerous "podStatus[cluster.Name].RunningAndReady".
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-05-26 18:49:02 -07:00
Kubernetes Submit Queue 63857a35ba Merge pull request #46453 from emaildanwilson/fedClusterSelectorIngress
Automatic merge from submit-queue (batch tested with PRs 46450, 46272, 46453, 46019, 46367)

Add ClusterSelector to Ingress Controller

This pull request adds ClusterSelector to the Federated Ingress Controller ref: design #29887 
This back ports the same functionality from the sync controller (merged pull #40234) in order to make this feature available across all Controllers for the 1.7 release.

cc: @kubernetes/sig-federation-pr-reviews @shashidharatd

**Release note**:
```
The annotation `federation.alpha.kubernetes.io/cluster-selector` can be used with Ingress objects to target federated clusters by label.
```
2017-05-26 18:49:00 -07:00
Kubernetes Submit Queue d10c9975dc Merge pull request #46118 from shashidharatd/federation-dns-controller
Automatic merge from submit-queue

[Federation] Move service dns controller to its own package

This PR does nothing but just moves service dns controller code to its own package.

**Release note**:
```release-note
NONE
```
cc @kubernetes/sig-federation-pr-reviews 
/assign @marun
2017-05-26 09:11:00 -07:00
Kubernetes Submit Queue 9ecf57e39c Merge pull request #46288 from henriquetruta/fix_typo_test
Automatic merge from submit-queue

Fix typo in test_helper

`CompareObjectMeta` is comparting Name attribute, but
logging Namespace. Looks like a copy/paste error.
2017-05-26 08:12:05 -07:00
zhengjiajin f5af345de2 Fix some comments in dnsprovider 2017-05-26 18:53:11 +08:00
shashidharatd 8ef48a93d7 Auto generated files 2017-05-26 12:40:09 +05:30
shashidharatd 62b203fc3c Move service dns controller to its own package 2017-05-26 12:39:14 +05:30
Kubernetes Submit Queue f006dcc9e1 Merge pull request #45492 from matt-potter/multizone-dns-fed
Automatic merge from submit-queue (batch tested with PRs 46429, 46308, 46395, 45867, 45492)

deduplicate endpoints before DNS registration

**What this PR does / why we need it**: Multizone clusters will return duplicated endpoints to the federation controller manager. The FCM will then attempt to create an A record with duplicate entries, which will fail. As a result, federated services on multi-AZ clusters don't work right now. This PR deduplicates the endpoint IPs before attempting the DNS record registration. 

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

**Special notes for your reviewer**:
I believe there is a lot of refactoring required with multizone federated clusters, most notably with regard to AWS and optimising for ALIAS records rather than A, but this PR will at least allow basic functionality to work.

```release-note NONE
```
2017-05-25 22:42:11 -07:00
emaildanwilson 0a2b4742f5 Add ClusterSelector to Ingress Controller
fix log messages
2017-05-25 13:10:18 -07:00
Maru Newby 2c886e93e9 kubefed: Use StoraceClassName class field for etcd pvc 2017-05-25 10:21:08 -07:00
Kubernetes Submit Queue 9a33db8a4f Merge pull request #46248 from emaildanwilson/fedClusterSelectorServices
Automatic merge from submit-queue (batch tested with PRs 44774, 46266, 46248, 46403, 46430)

[Federation] ClusterSelector for Service Controller

This pull request adds ClusterSelector to the Federated Service Controller ref: design #29887 This back ports the same functionality from the sync controller (merged pull #40234).

cc: @nikhiljindal @marun
2017-05-25 06:17:58 -07:00
Henrique Truta 06b634d616 Fix typo in test_helper
`CompareObjectMeta` is comparting Name attribute, but
logging Namespace. Looks like a copy/paste error.
2017-05-25 10:07:10 -03:00