Commit Graph

690 Commits (29f8ff32c221d1f3d7d59bc4675fda3a3a011c59)

Author SHA1 Message Date
Kubernetes Submit Queue cf9f00bb95 Merge pull request #48200 from irfanurrehman/fed-sched-generic-args
Automatic merge from submit-queue (batch tested with PRs 48043, 48200, 49139, 36238, 49130)

[Federation] Make arguments to scheduling type adapter methods generic

This is in the process of trying to rebase https://github.com/kubernetes/kubernetes/pull/45993 on latest.
cc @marun @perotinus 
@kubernetes/sig-federation-misc 
Hoping I get some attention to this and later PRs soon.

Associated issue https://github.com/kubernetes/kubernetes/issues/49181

**Release note**:

```NONE
```
2017-07-19 01:57:27 -07:00
Irfan Ur Rehman 0deb4ef3f3 [Federation] Make arguments to scheduling type adapter methods generic 2017-07-18 20:19:37 +05:30
Dr. Stefan Schimanski 2bbe72d4e0 deepcopy: misc fixes for static deepcopy compilation
- port direct calls to deepcopy funcs
- apimachinery: fix types in unstructured converter test
- federation: fix deepcopy registration
2017-07-18 09:28:48 +02:00
Jacob Simpson b565f53822 update-bazel.sh 2017-07-17 15:06:08 -07:00
Chao Xu 9d489c8504 manual changes 2017-07-17 15:05:38 -07:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Maru Newby 228ab0d882 fed: Move namespace propagation to the sync controller 2017-07-12 13:54:24 -07:00
Maru Newby 7e772ee3eb fed: Provide client config to adapter factory
This will allow the namespace adapter to initialize a namespaced
resource deleter.
2017-07-12 13:54:24 -07:00
Maru Newby 5ed095b401 fed: Replace NamespacedName for namespace sync compatibility 2017-07-12 13:54:22 -07:00
Kubernetes Submit Queue 3e89fe241d Merge pull request #47829 from CaoShuFeng/Warning-Warningf
Automatic merge from submit-queue (batch tested with PRs 44412, 44810, 47130, 46017, 47829)

Use glog.*f when a format string is passed

ref:
https://godoc.org/github.com/golang/glog

I use the following commands to search all the invalid usage:
$ grep "glog.Warning(" * -r | grep %
$ grep "glog.Info(" * -r | grep %
$ grep "glog.Error(" * -r | grep %
$ grep ").Info(" * -r | grep % | grep glog.V(

**Release note**:

```
NONE
```
2017-07-11 20:00:26 -07:00
Kubernetes Submit Queue 8aaffb4018 Merge pull request #44810 from FengyunPan/fix-Errorf
Automatic merge from submit-queue (batch tested with PRs 44412, 44810, 47130, 46017, 47829)

Return clusterErr rather than err

The updateClusterIngressUIDToMasters() should return clusterErr, not err.
If the 'err' of 'masterCluster, masterUID, err := ic.getMasterCluster()' is nil and the 'clusterErr' of 'clusterObj, clusterErr := api.Scheme.DeepCopy(cluster)' is not nil, updateClusterIngressUIDToMasters() will return ("", nil).

And do not log fallbackUID when fallbackUID is nil.
2017-07-11 20:00:18 -07:00
Cao Shufeng 0c577c47d5 Use glog.*f when a format string is passed
ref:
https://godoc.org/github.com/golang/glog

I use the following commands to search all the invalid usage:
$ grep "glog.Warning(" * -r | grep %
$ grep "glog.Info(" * -r | grep %
$ grep "glog.Error(" * -r | grep %
$ grep ").Info(" * -r | grep % | grep "glog.V("
2017-07-10 19:04:03 +08:00
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