Commit Graph

1484 Commits (c2667203e44ea836a2c35509d7071f49e0ecf683)

Author SHA1 Message Date
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
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
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
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
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
Brendan Burns 83e856411d generated stuff 2017-05-18 11:38:56 -07:00
Clayton Coleman bdd4d34c7d
generated: api changes 2017-05-18 10:07:47 -04:00
yupengzte 443228d8c4 check err
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-05-18 15:46:39 +08:00
Kubernetes Submit Queue ca75521199 Merge pull request #40234 from emaildanwilson/fedTargetClusterByLabel
Automatic merge from submit-queue (batch tested with PRs 40234, 45885, 42975)

Fed target cluster by label for sync controller

[use clusterselector w/ federated configmap deploys](667dc77444)

**What this PR does / why we need it**: adds the ability to indicate objects are sent to subsets of federated clusters ref #29887 

**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-17 20:27:49 -07:00
Kubernetes Submit Queue 8710f6e62d Merge pull request #45745 from marun/fed-test-cluster-addition
Automatic merge from submit-queue (batch tested with PRs 45990, 45544, 45745, 45742, 45678)

[Federation]  Add integration testing for cluster addition

This PR adds integration testing of the sync controller for cluster addition.  This ensures coverage equivalency between the integration tests and the old controller unit tests, so those tests are removed by this PR.

Resolves #45257

cc: @kubernetes/sig-federation-pr-reviews
2017-05-17 18:40:54 -07:00
Wilson, Dan 32787c5258 use clusterselector w/ federated configmap deploys
fix test error formatting

updates from comments

update gofmt

simplify tests

add to new sync controller

add tests

remove configmap changes due to rebase

updates from review

refactor tests to be based on operations

improvements from review

updates from rebase

rebase to #45374

updates from review

refactor SendToCluster for tests

fix import order

rebase to upstream
2017-05-17 13:48:57 -07:00
Kubernetes Submit Queue 799283f2e7 Merge pull request #45941 from cblecker/gengo
Automatic merge from submit-queue (batch tested with PRs 45852, 45965, 45941)

Update k8s.io/gengo dependency

**What this PR does / why we need it**:
Brings in changes to improve type checker and deep copy

**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-17 12:32:51 -07:00