Commit Graph

1593 Commits (46bcc330b75d6a18e999a46c9230e7a78e20514e)

Author SHA1 Message Date
Guangya Liu 9ecb5d9f4f Generated code. 2017-06-10 02:43:05 -04:00
Simon Croome 5e2503e71f Add StorageOS volume plugin 2017-06-09 13:19:27 +01:00
zhengjiajin f7ce20d2e4 Fix api description 2017-06-09 10:27:53 +08:00
Kubernetes Submit Queue b8b5c68c19 Merge pull request #47103 from madhusudancs/fed-ds-uncheck-label
Automatic merge from submit-queue (batch tested with PRs 43005, 46660, 46385, 46991, 47103)

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.

Fixes #46925

**Release note**:
```release-note
NONE
```

/assign @csbell 

/cc @shashidharatd @marun @nikhiljindal @perotinus 

/sig federation
2017-06-07 13:31:06 -07:00
shashidharatd 81f927d58c Auto generated file 2017-06-07 22:12:15 +05:30
shashidharatd d863c35546 Cleanup federation/cluster scripts from deprecated bringup method 2017-06-07 22:12:14 +05:30
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
Kubernetes Submit Queue eae59aaf72 Merge pull request #44786 from tsandall/f8n-scheduling-policy
Automatic merge from submit-queue (batch tested with PRs 46235, 44786, 46833, 46756, 46669)

federation: Add admission controller for policy-based placement

@nikhiljindal 

Here's the initial version of the scheduling policy admission controller. It's at the point where it would benefit from having another pair of eyes look at it. The main thing I'm unsure of is the serialization of Kube resources for the webhook/query call.

Release Note:

```
The federation-apiserver now supports a SchedulingPolicy admission controller that enables policy-based control over placement of federated resources.
```

Ref #39982
2017-06-07 00:27:47 -07:00
Christoph Blecker 1bdc7a29ae
Update docs/ URLs to point to proper locations 2017-06-05 22:13:54 -07:00
Kubernetes Submit Queue a552ee61a0 Merge pull request #46672 from smarterclayton/initializer_with_config
Automatic merge from submit-queue (batch tested with PRs 46967, 46992, 43338, 46717, 46672)

Select initializers from the dynamic configuration

Continues #36721

kubernetes/features#209
2017-06-05 20:27:50 -07:00
Fabiano Franz 39e5812848 Update generated 2017-06-05 20:32:30 -03:00
Clayton Coleman 772ab8e1b4
Load initializers from dynamic config
Handle failure cases on startup gracefully to avoid causing cascading
errors and poor initialization in other components. Initial errors from
config load cause the initializer to pause and hold requests. Return
typed errors to better communicate failures to clients.

Add code to handle two specific cases - admin wants to bypass
initialization defaulting, and mirror pods (which want to bypass
initialization because the kubelet owns their lifecycle).
2017-06-05 19:12:41 -04:00
Clayton Coleman 034f06d7e4
Remove Initializers from federation 2017-06-05 19:12:36 -04:00
Torin Sandall 470e99c6a5 federation: Add admission controller for policy-based placement 2017-06-05 07:58:59 -07: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
Madhusudan.C.S c3d5113365 Delete cluster role and their bindings federated clusters.
This is part of the namespace deletion big hammer. `kubefed join` not
just creates federation-system namespace, but also cluster role and
cluster role bindings in the joining clusters. Sometimes unjoin fails
to delete them. So we use a big hammer here to delete them.

This smells like a real problem in kubefed and needs investigation.
This is a short term fix to unblock the submit queue.
2017-06-04 21:26:44 -07:00
Madhusudan.C.S c30afde32e Delete federation system namespace from all the federated clusters.
This is a big hammer. `kubefed join` creates federation-system namespace
in the joining clusters if they don't already exist. This namespace
usually exists in the host cluster and hence cannot be deleted while
unjoining. So in order to be safe, we don't delete the federation-system
namespace from any federated cluster while unjoining them. This causes
a problem in our test environment if certain resources are left in the
namespace. Therefore we are deleting all federation-system namespace in
all the clusters.
2017-06-04 21:26:42 -07:00
Madhusudan.C.S 60d10e9e27 Do not delete PVs with --all, instead delete them selectively.
PV is a non-namespaced resource. Running `kubectl delete pv --all`, even
with `--namespace` is going to delete all the PVs in the cluster. This
is a dangerous operation and should not be deleted this way.

Instead we now retrieve the PVs bound to the PVCs in the namespace we
are deleteing and delete only those PVs.

Fixes issue #46380.
2017-06-04 14:57:43 -07:00
Kubernetes Submit Queue dbd1503b65 Merge pull request #45924 from janetkuo/daemonset-history
Automatic merge from submit-queue

Implement Daemonset history

~Depends on #45867 (the 1st commit, ignore it when reviewing)~ (already merged)

Ref https://github.com/kubernetes/community/pull/527/ and https://github.com/kubernetes/community/pull/594

@kubernetes/sig-apps-api-reviews @kubernetes/sig-apps-pr-reviews @erictune @kow3ns @lukaszo @kargakis 

---

TODOs:
- [x] API changes
  - [x] (maybe) Remove rollback subresource if we decide to do client-side rollback 
- [x] deployment controller 
  - [x] controller revision
    - [x] owner ref (claim & adoption)
    - [x] history reconstruct (put revision number, hash collision avoidance)
    - [x] de-dup history and relabel pods
    - [x] compare ds template with history 
  - [x] hash labels (put it in controller revision, pods, and maybe deployment)
  - [x] clean up old history 
  - [x] Rename status.uniquifier when we reach consensus in #44774 
- [x] e2e tests 
- [x] unit tests 
  - [x] daemoncontroller_test.go 
  - [x] update_test.go 
  - [x] ~(maybe) storage_test.go // if we do server side rollback~

kubectl part is in #46144

--- 

**Release note**:

```release-note
```
2017-06-03 16:52:38 -07:00
Tim Hockin be987b015c Merge pull request #46716 from thockin/proxy-comments
Kube-proxy cleanups
2017-06-03 15:57:17 -07: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
Janet Kuo 4e6f70ff67 Autogen: run hack/update-all.sh 2017-06-03 00:43:53 -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
Clayton Coleman 2568a92119
Grow signature for predicate attributes to include init status 2017-06-02 22:09:04 -04:00
Clayton Coleman 331eea67d8
Allow initialization of resources
Add support for creating resources that are not immediately visible to
naive clients, but must first be initialized by one or more privileged
cluster agents. These controllers can mark the object as initialized,
allowing others to see them.

Permission to override initialization defaults or modify an initializing
object is limited per resource to a virtual subresource "RESOURCE/initialize"
via RBAC.

Initialization is currently alpha.
2017-06-02 22:09:03 -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
Jordan Liggitt 24c50a7df7
Regenerate openapi for 1.8 2017-06-02 11:07:37 -04:00
zhengjiajin 6bc2d4257b fix some err message 2017-06-02 18:33:05 +08:00
Tim Hockin fc34a9d6ba 'Global' -> 'Cluster' for traffic policy 2017-06-01 16:17:38 -07:00
Kubernetes Submit Queue f7a1f10275 Merge pull request #45919 from ericchiang/audit-webhook-backend
Automatic merge from submit-queue

apiserver: add a webhook implementation of the audit backend

This builds off of #45315 and is intended to implement an interfaced defined in #45766.

TODO:

- [x] Rebase on top of API types PR.
- [x] Rebase on top of API types updates (#46065)
- [x] Rebase on top of feature flag (#46009)
- [x] Rebase on top of audit instrumentation.
- [x] Hook up API server flag or register plugin (depending on #45766)

Features issue https://github.com/kubernetes/features/issues/22

Design proposal https://github.com/kubernetes/community/blob/master/contributors/design-proposals/auditing.md

```release-notes
Webhook added to the API server which omits structured audit log events.
```

/cc @soltysh @timstclair @soltysh @deads2k
2017-06-01 13:41:59 -07:00
Kubernetes Submit Queue 14a1cdd208 Merge pull request #44785 from jingxu97/April/apistorage
Automatic merge from submit-queue

Add Local Storage Capacity Isolation API

This PR adds the new APIs to support storage capacity isolation as
described in the proposal [https://github.com/kubernetes/community/pull/306](url)

1. Add SizeLimit for emptyDir volume
2. Add scratch and overlay storage type used by container level or
node level


**Release note**:

```release-note
Alpha feature: Local volume Storage Capacity Isolation allows users to set storage limit to isolate EmptyDir volumes, container storage overlay, and also supports allocatable storage for shared root file system. 
```
2017-06-01 09:12:19 -07: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
Jing Xu 695f7be697 generated files 2017-05-31 13:06:39 -07:00
Eric Chiang a88e0187f9 apiserver: add a webhook implementation of the audit backend 2017-05-31 09:45:23 -07:00
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
Kubernetes Submit Queue e97b72296f Merge pull request #46556 from mbohlool/gvk
Automatic merge from submit-queue (batch tested with PRs 46076, 43879, 44897, 46556, 46654)

Use meta.v1 GroupVersionKind with json tags to generate OpenAPI spec

We are using two different GVK struct in generation of OpenAPI extensions. This PR unify that and also add json tags to meta.v1 GVK to comply with json naming system in other serializations. Also the value of Action extension is now lowercase.

ref: https://github.com/kubernetes/kubernetes/pull/46388
2017-05-30 23:20:04 -07:00
Kubernetes Submit Queue 8c1f45953b Merge pull request #46431 from zjj2wry/rollback-rollback
Automatic merge from submit-queue (batch tested with PRs 42240, 46100, 46154, 46431, 45755)

Fix api description in swagger

**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-05-30 14:57:05 -07:00
mbohlool fcb9290062 Generated spec 2017-05-30 14:43:27 -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 cb201802a1 Merge pull request #46459 from p0lyn0mial/move_admission_lifecycle_to_genericapi
Automatic merge from submit-queue (batch tested with PRs 46552, 46608, 46390, 46605, 46459)

Move admission lifecycle to genericapi

**What this PR does / why we need it**:  ends the whole sequence of moving some admission plugins to generic api.


**Release note**:

```release-note
NONE
```
2017-05-30 08:42:02 -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
p0lyn0mial 77eb2f3950 register all generic admission plugins when AdmissionOptions are created.
lifecycle plugin: make use of the libraries under k8s.io/client-go/pkg/api and k8s.io/client-go/kubernetes
for the client libraries instead of k8s.io/kubernetes/client/*

move registration to AdmissionOptions
2017-05-29 22:08:59 +02:00
Kubernetes Submit Queue 66a1d07ef4 Merge pull request #46407 from liggitt/namespace-delete-collection
Automatic merge from submit-queue (batch tested with PRs 46407, 46457)

Remove deletecollection support from namespace object

Namespace storage accidentally picked up deletecollection support from embedding the generic store. If invoked, it skips the custom namespace `Delete()` storage method that enforces finalization, and skips the namespace lifecycle admission plugin that protects immortal namespaces from deletion.

Given the data integrity implications of skipping namespace finalization, I'd backport this as far as we're releasing patch releases.

```release-note
The namespace API object no longer supports the deletecollection operation.
```
2017-05-28 13:16:54 -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 c2667203e4 Merge pull request #45859 from DirectXMan12/refactor/protobuf-for-metrics
Automatic merge from submit-queue

Protobuf generation for k8s.io/metrics

This PR introduces protobuf generation for k8s.io/metrics.  Doing so required:

- fixing a bug in `go-to-protobuf` causing the `cast{key,value,type}` values to not be quoted when coming from struct tags (and not auto-injection by `go-to-protobuf` itself).
- Making sure the proto IDL in k8s.io/client-go had a package name of `k8s.io.client_go.xyz` and not `k8s.io.kubernetes.xyz`.

Additionally, I updated `go-to-protobuf` to skip functions and non-public types when composing the import list, which cuts down on the more bizarre imports in the IDL (like importing the sample API package in every IDL file because it contained `addToScheme`, like every other API package).

We use `castvalue` to force gogo-proto to realize that it should consider the value of the map which underlies `ResourceList` when calculating which imports need to be named.  Otherwise, it ignores the value's type, leading to compilation errors when it later can't find an import it assumed existed.  We accidentally didn't hit this in `k8s.io/kubernetes/pkg/api/v1` since another field coincidentally happens to directly use `resource.Quantity` (the value type of `ResourceList`).

**Release note**:
```release-note
NONE
```
2017-05-27 14:08:46 -07:00
Solly Ross 8d03536d00 Regenerate protobuf and client-go
This commit regenerates the protobuf as per the recent generation
changes (removing erroneous imports, adding k8s.io/metrics), and
syncs the changes to client-go (which also ensures that client-go
protobuf IDL has the correct package names).
2017-05-27 00:37:49 -04: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 3be6879bde Merge pull request #46440 from deads2k/crd-03-invert
Automatic merge from submit-queue (batch tested with PRs 42256, 46479, 45436, 46440, 46417)

move CRD behind TPR

Second attempt at https://github.com/kubernetes/kubernetes/pull/46297

@liggitt since @sttts is out can you take a look and hopefully find me a different, more sane way to do this? It's a little crazy, but I left a large comment explaining why I think its the only way.
2017-05-26 15:59:03 -07:00
deads2k 18177e2bde move CRD behind TPR 2017-05-26 12:15:13 -04: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 60c3152c56 fix api description in swagger 2017-05-26 20:37:10 +08: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
Kubernetes Submit Queue 26d7ee0447 Merge pull request #44774 from kargakis/uniquifier
Automatic merge from submit-queue

Switch Deployments to new hashing algo w/ collision avoidance mechanism

Implements https://github.com/kubernetes/community/pull/477

@kubernetes/sig-apps-api-reviews @kubernetes/sig-apps-pr-reviews 

Fixes https://github.com/kubernetes/kubernetes/issues/29735
Fixes https://github.com/kubernetes/kubernetes/issues/43948

```release-note
Deployments are updated to use (1) a more stable hashing algorithm (fnv) than the previous one (adler) and (2) a hashing collision avoidance mechanism that will ensure new rollouts will not block on hashing collisions anymore.
```
2017-05-25 06:09: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
Michail Kargakis 9190a47c37
Generated changes for collision count
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-05-25 12:23:17 +02:00
Jordan Liggitt 664fe6e5c2
Generated changes 2017-05-25 00:17:08 -04:00
Jonathan MacMillan 748ea1109d [Federation] Uniquify the ClusterRole and ClusterRoleBinding names created by . 2017-05-24 12:04:16 -07:00
Jonathan MacMillan b5c6af7b42 [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.
2017-05-24 11:06:53 -07:00
emaildanwilson c68bf0b260 add ClusterSelector to services 2017-05-24 09:57:04 -07:00
Matt Potter 76a95e8ce8 refactor to remove loop / use sets.String{} 2017-05-24 13:57:08 +01:00
Kubernetes Submit Queue f30443cacc Merge pull request #42042 from perotinus/svcaccounts
Automatic merge from submit-queue (batch tested with PRs 42042, 46139, 46126, 46258, 46312)

[Federation] Use service accounts instead of the user's credentials when accessing joined clusters' API servers.

Fixes #41267.

Release notes:
```release-note
Modifies kubefed to create and the federation controller manager to use credentials associated with a service account rather than the user's credentials.
```
2017-05-23 19:42:57 -07:00
Kubernetes Submit Queue 95a6f108bd Merge pull request #46289 from p0lyn0mial/admission_plugins_remove_init_blocks
Automatic merge from submit-queue

remove init blocks from all admission plugins

**What this PR does / why we need it**:
removes init blocks from all admission plugins

**Release note**:

```release-note
NONE
```
2017-05-23 17:00:59 -07:00
p0lyn0mial c5019bf696 remove init blocks from all admission plugins 2017-05-23 22:00:32 +02:00
Matt Potter 743cc5d685 autogen BUILD file 2017-05-23 11:37:48 +01:00
Matt Potter ae102d64c4 refactor to use sets.String 2017-05-23 11:37:48 +01:00
Matt Potter b8c0314861 deduplicate endpoints before DNS registration 2017-05-23 11:37:48 +01:00
Kubernetes Submit Queue 455e9fff09 Merge pull request #46176 from vmware/vSphereStoragePolicySupport
Automatic merge from submit-queue

vSphere storage policy support for dynamic volume provisioning

Till now, vSphere cloud provider provides support to configure persistent volume with VSAN storage capabilities - kubernetes#42974. Right now this only works with VSAN.

Also there might be other use cases:

- The user might need a way to configure a policy on other datastores like VMFS, NFS etc.
- Use Storage IO control, VMCrypt policies for a persistent disk.

We can achieve about 2 use cases by using existing storage policies which are already created on vCenter using the Storage Policy Based Management service. The user will specify the SPBM policy ID as part of dynamic provisioning 

- resultant persistent volume will have the policy configured with it. 
- The persistent volume will be created on the compatible datastore that satisfies the storage policy requirements. 
- If there are multiple compatible datastores, the datastore with the max free space would be chosen by default.
- If the user specifies the datastore along with the storage policy ID, the volume will created on this datastore if its compatible. In case if the user specified datastore is incompatible, it would error out the reasons for incompatibility to the user.
- Also, the user will be able to see the associations of persistent volume object with the policy on the vCenter once the volume is attached to the node.

For instance in the below example, the volume will created on a compatible datastore with max free space that satisfies the "Gold" storage policy requirements.

```
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
       name: fast
provisioner: kubernetes.io/vsphere-volume
parameters:
      diskformat: zeroedthick
      storagepolicyName: Gold
```

For instance in the below example, the vSphere CP checks if "VSANDatastore" is compatible with "Gold" storage policy requirements. If yes, volume will be provisioned on "VSANDatastore" else it will error that "VSANDatastore" is not compatible with the exact reason for failure.

```
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
       name: fast
provisioner: kubernetes.io/vsphere-volume
parameters:
      diskformat: zeroedthick
      storagepolicyName: Gold
      datastore: VSANDatastore
```

As a part of this change, 4 commits have been added to this PR.

1. Vendor changes for vmware/govmomi
2. Changes to the VsphereVirtualDiskVolumeSource in the Kubernetes API. Added 2 additional fields StoragePolicyName, StoragePolicyID
3. Swagger and Open spec API changes.
4. vSphere Cloud Provider changes to implement the storage policy support.

**Release note**:


```release-note
vSphere cloud provider: vSphere Storage policy Support for dynamic volume provisioning
```
2017-05-22 23:41:10 -07:00
Balu Dontu 668fa94ccb Open API and swagger spec changes 2017-05-22 19:45:02 -07:00
Maru Newby 080d1081d0 fed: Add support for etcd image override to kubefed init 2017-05-22 15:16:41 -07:00
Kubernetes Submit Queue 06c12e717a Merge pull request #46071 from emaildanwilson/fedClusterSelectorIntegration
Automatic merge from submit-queue

[Federation] ClusterSelector Integration Testing

This pull request adds integration testing for the federated ClusterSelector ref: design #29887 merged pull #40234

cc: @nikhiljindal @marun
2017-05-21 23:18:44 -07:00
Kubernetes Submit Queue 95ce463e95 Merge pull request #46020 from marun/fed-override-server-image-default
Automatic merge from submit-queue

[Federation][kubefed]: Move server image definition to cmd

This enables consumers like openshift to provide a different default without editing the kubefed init logic.

cc: @kubernetes/sig-federation-pr-reviews
2017-05-20 14:30:55 -07:00
Kubernetes Submit Queue 4f55f49035 Merge pull request #46042 from derekwaynecarr/quota-admission-registry
Automatic merge from submit-queue (batch tested with PRs 45346, 45903, 45958, 46042, 45975)

ResourceQuota admission control injects registry

**What this PR does / why we need it**:
The `ResourceQuota` admission controller works with a registry that maps a GroupKind to an Evaluator.  The registry used in the existing plug-in is not injectable, which makes usage of the ResourceQuota plug-in in other API server contexts difficult.  This PR updates the code to support late injection of the registry via a plug-in initializer.
2017-05-19 22:29:34 -07:00
Kubernetes Submit Queue 113cf85612 Merge pull request #45903 from brendandburns/azure-disk-api
Automatic merge from submit-queue (batch tested with PRs 45346, 45903, 45958, 46042, 45975)

Azure disk api

This is to update the AzureDiskApi and split it from the implementation which is caught in rebase hell...

Once this is merged, we'll get the implementation in.

@smarterclayton suggested this as a way to break the rebase hell logjam. request for a quick review.

Thanks!
2017-05-19 22:29:30 -07:00
Jonathan MacMillan af2a8f7e8a [Federation] Use service accounts instead of the user's credentials when accessing joined clusters' API servers. 2017-05-19 18:05:09 -07:00
emaildanwilson 2cef454fd3 fed cluster selector integration test
updates from review
2017-05-19 13:47:52 -07:00
Shashidhara T D 40c32b02d7 Revert "[Federation] Fix federated service reconcilation issue due to addition of External…" 2017-05-19 18:29:07 +05:30
Kubernetes Submit Queue 57adadd42a Merge pull request #46063 from madhusudancs/fed-kubefed-logv4
Automatic merge from submit-queue

Log kubefed operations at log level 4 in our test environments.

This is useful for debugging test failures that involve federation control plane turn up/down.


**Release note**:
```release-note
NONE
```

/assign @perotinus @csbell 
/sig federation

cc @kubernetes/sig-federation-pr-reviews
2017-05-18 21:48:39 -07:00
Brendan Burns 97f6c52ffd more stuff. 2017-05-18 20:31:10 -07:00
Derek Carr a71bea312a ResourceQuota admission control injects registry 2017-05-18 23:17:13 -04:00
Kubernetes Submit Queue c061994742 Merge pull request #46056 from marun/fed-federated-updater-deletion-error
Automatic merge from submit-queue (batch tested with PRs 41535, 45985, 45929, 45948, 46056)

[Federation] Fix bad logic of deletion error handling for federated updater

Reverts a change accidentally added in #45364.

cc: @kubernetes/sig-federation-pr-reviews
2017-05-18 19:58:17 -07:00
Madhusudan.C.S 47de152365 Log kubefed operations at log level 4 in our test environments.
This is useful for debugging test failures that involve federation
control plane turn up/down.
2017-05-18 16:57:46 -07:00
Maru Newby b4381d0c44 fed: Move kubefed server image definition to cmd
This enables consumers like openshift to provide a different default
without editing the kubefed init logic.
2017-05-18 14:25:44 -07:00
Maru Newby 37cb9c4dc2 fed: Fix bad logic of deletion error handling for federated updater 2017-05-18 14:21:55 -07:00