Commit Graph

1299 Commits (151770c8fde9eb6740e7540399de3bff8d0f987f)

Author SHA1 Message Date
Maru Newby cca465e347 fed: Rename 'secret' controller package to 'sync' 2017-04-17 09:09:41 -07:00
Maru Newby 2c75aeed02 fed: mv pkg/typeadapters pkg/federatedtypes 2017-04-16 21:30:52 -07:00
Maru Newby 1ebffa7112 fed: adapter registry -> type registry to enable ctlr mgr use 2017-04-16 21:30:52 -07:00
Maru Newby 6f061f7962 fed: Update crud integration test to use the the adapter registry 2017-04-16 21:30:09 -07:00
Maru Newby 3e4236d545 fed: Add type adapter registration to simplify maintenance 2017-04-16 21:30:09 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Kubernetes Submit Queue 3b9eb1a875 Merge pull request #43876 from caesarxuchao/blockOwnerDeletion-admission
Automatic merge from submit-queue (batch tested with PRs 44440, 44038, 44302, 44316, 43876)

Extend the gc admission plugin to check ownerReference.blockOwnerDeletion

#Extend the gc admission plugin to prevent user who doesn't have delete permission of the *owner* from changing blockOwnerDeletion field of existing ownerReferences, or adding ownerReference with blockOwnerDeletion=true.

The plugin need a RESTMapper to translate ownerRef.Kind to Resource. It should be using a dynamic one. However, as discussed in https://github.com/kubernetes/kubernetes/pull/42615, such a RESTMapper will be built after watchable discovery API is implemented, so in this PR the plugin is using the `api.Registry.RESTMapper()`, which is also [used](https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-controller-manager/app/core.go#L165-L166) by the garbage collector currently.

```release-note
Extending the gc admission plugin so that a user who doesn't have delete permission of the *owner* cannot modify blockOwnerDeletion field of existing ownerReferences, or add new ownerReference with blockOwnerDeletion=true
```

cc @lavalamp
2017-04-13 23:18:06 -07:00
Kubernetes Submit Queue 5ad494077e Merge pull request #42914 from liggitt/fix-defaulting
Automatic merge from submit-queue (batch tested with PRs 44424, 44026, 43939, 44386, 42914)

remove defaulting from conversion path

follow up for #42764

* remove call to defaulting from conversion path (defaulting is a separate step from conversion)
* remove non-top-level-object defaulting registration (unused after conversion call is removed)
* generate missing top-level defaults for some api groups:
  * autoscaling/v2alpha1
  * policy/v1alpha1
  * policy/v1beta1
* register top-level defaults for some api groups that were missing them:
  * autoscaling/v2alpha1
  * settings/v1alpha1
2017-04-13 22:07:10 -07:00
Chao Xu 9d7a8df5ee add gc admission plugin that prevents user who doesn't have delete permission of the owner from setting blockOwnerDeletion 2017-04-13 11:55:22 -07:00
Kubernetes Submit Queue 19d722671b Merge pull request #43297 from mvdan/kubectl-params
Automatic merge from submit-queue

kubectl/cmd: remove a bunch of unused parameters

Found with github.com/mvdan/unparam.

**Release note**: NONE
2017-04-13 04:07:21 -07:00
Kubernetes Submit Queue 5c94d42236 Merge pull request #44378 from FengyunPan/update-federation-event
Automatic merge from submit-queue

Use EventTypeWarning instead of EventTypeNormal when failure
2017-04-13 01:39:02 -07:00
Kubernetes Submit Queue 66b8a88b83 Merge pull request #44380 from justinsb/route53_avoid_panic
Automatic merge from submit-queue

dnsprovider: Avoid panic if fields are nil

The aws-sdk has some helper functions which should generally be used
whenever dereferencing an AWS provided pointer, in case the pointer is
nil, which would otherwise be a panic.

Issue https://github.com/kubernetes/kops/issues/2347

```release-note
dnsprovider: avoid panic if route53 fields are nil
```
2017-04-12 22:26:19 -07:00
Jordan Liggitt ad116026d9
Remove vestiges of defaulting from conversion path, switch to top-level default registration only 2017-04-12 13:36:15 -04:00
Kubernetes Submit Queue 949440b43a Merge pull request #43698 from sttts/sttts-non-global-admission-plugin-registry
Automatic merge from submit-queue

Non global admission plugin registry

For testing the global state is a problem. This PR turns the actual registry into a struct that must be instantiated. For the beginning, we do this in `pkg/kubeapiserver/admission`. In some follow-up (where we hunt down all globals some day), we will move this into the genericapiserver.
2017-04-12 04:12:11 -07:00
Kubernetes Submit Queue 1ba9202cd8 Merge pull request #42781 from spzala/conversionlint
Automatic merge from submit-queue

Conversionlint

**What this PR does / why we need it**:
This PR adds a comment placeholder for the exported or public functions in conversion generator files. Such functions without a comment results into golint failure in various generated files. The changes in this patch takes care of about 36 related lint failures. 
Given below is an example lint error, 
zz_generated.conversion.go:91:1: exported function Convert_v1alpha1_Binding_To_servicecatalog_Binding should have comment or be unexported

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

**Special notes for your reviewer**:
Hello, I am trying to fix golint failures as we see them in the kubernetes-incubator/service-catalog project. I have separate PRs opened for lint issues related to other generator code which are in separate libraries like gengo. Thanks! 

**Release note**:

```release-note
```
2017-04-12 03:02:26 -07:00
Dr. Stefan Schimanski 63f547e1b1 pkg/admission: make plugin registry non-global 2017-04-12 11:37:25 +02:00
Justin Santa Barbara 4c0e0fc890 dnsprovider: Avoid panic if fields are nil
The aws-sdk has some helper functions which should generally be used
whenever dereferencing an AWS provided pointer, in case the pointer is
nil, which would otherwise be a panic.

Issue https://github.com/kubernetes/kops/issues/2347
2017-04-12 02:13:50 -04:00
FengyunPan 0845bd389a Use EventTypeWarning instead of EventTypeNormal when failure 2017-04-12 11:53:54 +08:00
Chao Xu 08aa712a6c move helpers.go to helper 2017-04-11 15:49:11 -07:00
Sahdev P. Zala 08639023d0 Conversion generated code changes for golint fix
The exported or public functions requires a doc comment to pass golint.
This commit has changes of conversion generated code. The actual doc
changes are added into a separate commit for a clean review.
2017-04-11 15:34:51 -04:00
Timothy St. Clair 818dd4443d Update generated due to proto-shift 2017-04-11 08:48:59 -05:00
Kubernetes Submit Queue 3c7616eb19 Merge pull request #42683 from perotinus/annotations
Automatic merge from submit-queue

[Federation][kubefed] Annotate all Federation API objects with the federation name and (if applicable) the cluster name.

Address part of #42324.

```release-note
Adds annotations to all Federation objects created by kubefed.
```
2017-04-10 18:42:00 -07:00
Kubernetes Submit Queue 2976cb82ce Merge pull request #44209 from irfanurrehman/kubefed-3
Automatic merge from submit-queue (batch tested with PRs 44286, 44209)

[Federation][Kubefed] Bug fix to enable disabling federation controllers through override args

Targets https://github.com/kubernetes/kubernetes/issues/42761

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
https://github.com/kubernetes/kubernetes/issues/42761

**Special notes for your reviewer**:
@marun @perotinus @nikhiljindal 

**Release note**:

```
NONE 
```
2017-04-10 17:54:14 -07:00
Jonathan MacMillan 85b4313ac3 [Federation][kubefed] Annotate all Federation API objects with the federation name and (if applicable) the cluster name. 2017-04-10 16:36:47 -07:00
Kubernetes Submit Queue 478f469ff6 Merge pull request #44287 from shashidharatd/federation-cm
Automatic merge from submit-queue (batch tested with PRs 43273, 44287, 44281)

[Federation] Remove deprecated federation-apiserver-kubeconfig secret

federation-apiserver-kubeconfig was deprecated and was supposed to be removed in 1.6.
Removing all references to it as we no longer use it.

**Release note**:
```
[Federation] Deprecated `federation-apiserver-kubeconfig` is not supported anymore. Should use `--kubeconfig` flag to specify Federation API server kubeconfig.
```

cc @kubernetes/sig-federation-pr-reviews
2017-04-10 16:19:12 -07:00
Kubernetes Submit Queue b9a5a5c9b3 Merge pull request #42748 from dcbw/cfssl-localup
Automatic merge from submit-queue (batch tested with PRs 43866, 42748)

hack/cluster: download cfssl if not present

hack/local-up-cluster.sh uses cfssl to generate certificates and
will exit it cfssl is not already installed.  But other cluster-up
mechanisms (GCE) that generate certs just download cfssl if not
present.  Make local-up-cluster.sh do that too so users don't have
to bother installing it from somewhere.
2017-04-10 14:27:11 -07:00
Dr. Stefan Schimanski dcb50aa58a federation: avoid double core group registration 2017-04-10 20:43:34 +02:00
shashidharatd c55776c157 auto generated bazel build file 2017-04-10 23:17:08 +05:30
shashidharatd 8a643afb47 Remove deprecated federation-apiserver-kubeconfig secret 2017-04-10 23:17:08 +05:30
Kubernetes Submit Queue e18843d353 Merge pull request #42225 from nikhiljindal/DisableAlphaAPIs
Automatic merge from submit-queue (batch tested with PRs 44019, 42225)

federation: Fixing runtime-config support for federation-apiserver

Fixes https://github.com/kubernetes/kubernetes/issues/42587
Ref https://github.com/kubernetes/kubernetes/issues/38593

Fixing the broken `--runtime-config` flag support in federation-apiserver. Fixing the bugs and using it to disable batch and autoscaling groups. Users can enable them by passing `--runtime-config=apis/all=true` to federation-apiserver.
~This also includes a bug fix to kube-apiserver registry that allows users to disable api/v1 resources~

cc @kubernetes/sig-federation-pr-reviews
2017-04-10 00:49:15 -07:00
Irfan Ur Rehman fe87957818 [Federation][Kubefed] Bug fix to enable disabling federation controllers through override args 2017-04-10 12:44:02 +05:30
Kubernetes Submit Queue eed7d11255 Merge pull request #43136 from shashidharatd/kubectl-tests
Automatic merge from submit-queue

[Federation] Fix Running service controller in federation kubectl tests

Fixes:  #42607

cc @nikhiljindal @kubernetes/sig-federation-bugs
2017-04-09 11:19:38 -07:00
nikhiljindal e2ed57d6b0 Autogenerated Bazel changes 2017-04-07 23:23:34 -07:00
nikhiljindal e8fb6d1c47 Updating federation-apiserver to support runtime config and using it to disable batch and autoscaling groups 2017-04-07 22:04:33 -07:00
Kubernetes Submit Queue d043e20feb Merge pull request #44121 from mbohlool/patch
Automatic merge from submit-queue (batch tested with PRs 43777, 44121)

Add patchMergeKey and patchStrategy  support to OpenAPI

Support generating Open API extensions for strategic merge patch tags in go struct tags
Support `patchStrategy` and `patchMergeKey`.
Also support checking if the Open API extension and struct tags match.

```release-note
Support generating Open API extensions for strategic merge patch tags in go struct tags
```

cc: @pwittrock @ymqytw 

(Description mostly copied from #43833)
2017-04-07 20:01:10 -07:00
ymqytw 5f60dcd90b autogen 2017-04-07 15:44:33 -07:00
ymqytw 1804e5e548 add patch comment tags in open api 2017-04-07 15:44:32 -07:00
Jonathan MacMillan 12eb965e9b [Federation] Create a script that dumps Federation pod logs after Federation e2e tests 2017-04-07 14:50:55 -07:00
Kubernetes Submit Queue 98a4c6ba7f Merge pull request #43396 from rootfs/iscsi-chap
Automatic merge from submit-queue (batch tested with PRs 44119, 42538, 43802, 42336, 43396)

iSCSI CHAP support

**What this PR does / why we need it**:
To support CHAP authentication in a multi-tenant setup
**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
Support iSCSI CHAP authentication
```
2017-04-07 14:09:42 -07:00
Kubernetes Submit Queue fce31358c5 Merge pull request #41050 from marun/fed-ctlr-refactor
Automatic merge from submit-queue

[Federation] refactor controller for secrets

First pass of a simple federation controller that can be configured via an adapter to support multiple types.  The controller is a strict refactor of the secrets controller.

Targets #40989 

cc: @kubernetes/sig-federation-pr-reviews
2017-04-07 01:38:34 -07:00
Kubernetes Submit Queue 8c61829da8 Merge pull request #44117 from madhusudancs/fed-e2e-name-for-parallel-presubmit
Automatic merge from submit-queue (batch tested with PRs 44191, 44117, 44072)

Default FEDERATION_KUBE_CONTEXT to FEDERATION_NAME in federation e2e up/down scripts.

This is consistent with how kubefed creates kubeconfig contexts.

**Release note**:
-->
```release-note
NONE
```
2017-04-06 22:16:20 -07:00
Maru Newby d08e9d96ef fed: Create generic synchronizer from refactored secret controller 2017-04-06 17:47:11 -07:00
Maru Newby 82e73efe83 fed: Abstract secret controller interaction with the secret type
This change uses an adapter class to abstracts the interaction of the
secret controller with the secret api type.  This is the first step to
creating a generic controller that can target any type for which an
adapter exists.
2017-04-06 17:47:06 -07:00
Kubernetes Submit Queue d7f5929603 Merge pull request #42025 from marun/fed-crud-interation-test
Automatic merge from submit-queue

[Federation] Add integration test for secrets

This PR adds an integration test for secrets that:

 - performs create/read/update/delete on federation resources and validates that the changes are propagated to member clusters.  
 - uses an abstraction layer (fixture and adapter) to minimize the code required to support each federated type
   - It should be possible to replace a test-specific adapter with a runtime adapter in the future (as per #41050)
 - reuses fixture (federation api and clusters) across different resource types to minimize setup overhead
   - on a fast machine, setup takes ~4s, and validating each type takes ~2s  
 - uses the [Subtest feature added in Go 1.7](https://blog.golang.org/subtests) to allow the test for a specific controller to be run in isolation
   - ``make test-integration WHAT="federation  -test.run=TestFederationCRUD/secret"``

Once this PR merges the test can be extended to target other federated types.

This PR targets #40705

cc: @kubernetes/sig-federation-pr-reviews @derekwaynecarr
2017-04-06 16:54:44 -07:00
Kubernetes Submit Queue b41e415ebd Merge pull request #43137 from shashidharatd/federation-domain
Automatic merge from submit-queue

[Federation] Remove FEDERATIONS_DOMAIN_MAP references

Remove all references to FEDERATIONS_DOMAIN_MAP as this method is no longer is used and is replaced by adding federation domain map to kube-dns configmap.

cc @madhusudancs @kubernetes/sig-federation-pr-reviews 

**Release note**:
```
[Federation] Mechanism of adding `federation domain maps` to kube-dns deployment via `--federations` flag is superseded by adding/updating `federations` key in `kube-system/kube-dns` configmap. If user is using kubefed tool to join cluster federation, adding federation domain maps to kube-dns is already taken care by `kubefed join` and does not need further action.
```
2017-04-06 02:05:42 -07:00
Kubernetes Submit Queue aeac661b1c Merge pull request #44108 from csbell/fed-disable-orphan
Automatic merge from submit-queue

[Federation] Use cascading deletion when deleting resources in underlying clusters

The Federation control plane issues a delete command unless it wants to orphan the underlying per-cluster resource. When issuing that command, always set the orphanDependents to false.

/release-note-none
/sig-federation
2017-04-06 00:48:42 -07:00
Kubernetes Submit Queue 586e6d034f Merge pull request #44084 from nikhiljindal/removeFinalizers
Automatic merge from submit-queue (batch tested with PRs 44084, 42964)

Removing both finalizers in federation controllers in a single update

Fixes https://github.com/kubernetes/kubernetes/issues/43828

There is a bug right now where the controller fails to delete the object if one finalizer is removed and the second isnt.
This updates the code so that both the finalizers are removed in a single API call. Kept the code changes minimum to enable cherrypick in 1.6.x

cc @csbell @kubernetes/sig-federation-bugs
2017-04-05 20:45:18 -07:00
Madhusudan.C.S 5af5378fce Default FEDERATION_KUBE_CONTEXT to FEDERATION_NAME in federation e2e up/down scripts.
This is consistent with how kubefed creates kubeconfig contexts.
2017-04-05 18:47:03 -07:00
nikhiljindal 607d34132d Autogenerated bazel changes 2017-04-05 18:21:24 -07:00
nikhiljindal 0655f3d61a Removing both finalizers in federation controller in a single update 2017-04-05 18:21:23 -07:00