Commit Graph

1593 Commits (46bcc330b75d6a18e999a46c9230e7a78e20514e)

Author SHA1 Message Date
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
Maru Newby ee5dbf103e fed: Remove redundant unit tests
The equivalent coverage is provided by integration tests.
2017-05-17 07:17:47 -07:00
Maru Newby 578f17c668 fed: Add integration testing for cluster addition 2017-05-17 05:04:35 -07:00
Kubernetes Submit Queue a45a1ef28f Merge pull request #42895 from shashidharatd/coredns-2
Automatic merge from submit-queue (batch tested with PRs 42895, 45940)

[Federation] Automate configuring nameserver in cluster-dns for CoreDNS provider

Addresses issue #42894 #42822

**Release note**:
```
[Federation] CoreDNS server will be automatically added to nameserver resolv.conf chain When using CoreDNS as dns provider for federation during federation join.
```
cc @madhusudancs @kubernetes/sig-federation-bugs
2017-05-17 03:22:49 -07:00
Christoph Blecker 4361a9146e
Update generated files 2017-05-17 00:59:52 -07:00
Kubernetes Submit Queue b8f084a6c5 Merge pull request #45034 from shashidharatd/federation-service-controller-3
Automatic merge from submit-queue (batch tested with PRs 45247, 45810, 45034, 45898, 45899)

[Federation] Segregate DNS related code to separate controller

**What this PR does / why we need it**:
This is the continuation of service controller re-factor work as outlined in #41253
This PR segregates DNS related code from service controller to another controller `service-dns controller` which manages the DNS records on the configured DNS provider.
`service-dns controller` monitors the federated services for the ingress annotations and create/update/delete DNS records accordingly.
`service-dns controller` can be optionally disabled and DNS record management could be done by third party components by monitoring the ingress annotations on federated services. (This would enable something like federation middleware for CoreDNS where federation api server could be used as a backend to CoreDNS eliminating the need for etcd storage.)

**Special notes for your reviewer**:

**Release note**:
```
Federation: A new controller for managing DNS records is introduced which can be optionally disabled to enable third party components to manage DNS records for federated services.
```
cc @kubernetes/sig-federation-pr-reviews
2017-05-16 19:01:59 -07:00
Kubernetes Submit Queue 3f0ebbe884 Merge pull request #45247 from mbohlool/c3
Automatic merge from submit-queue (batch tested with PRs 45247, 45810, 45034, 45898, 45899)

Apiregistration v1alpha1→v1beta1

Promoting apiregistration api from v1alpha1 to v1beta1.

API Registration is responsible for registering an API `Group`/`Version` with
another kubernetes like API server. The `APIService` holds information
about the other API server in `APIServiceSpec` type as well as general
`TypeMeta` and `ObjectMeta`. The `APIServiceSpec` type have the main
configuration needed to do the aggregation. Any request coming for
specified `Group`/`Version` will be directed to the service defined by
`ServiceReference` (on port 443) after validating the target using provided
`CABundle` or skipping validation if development flag `InsecureSkipTLSVerify`
is set. `Priority` is controlling the order of this API group in the overall
discovery document.
The return status is a set of conditions for this aggregation. Currently
there is only one condition named "Available", if true, it means the
api/server requests will be redirected to specified API server.

```release-note
API Registration is now in beta.
```
2017-05-16 19:01:55 -07:00
Kubernetes Submit Queue 2c2c92659a Merge pull request #44474 from ahmetb/fix-types-links
Automatic merge from submit-queue (batch tested with PRs 45374, 44537, 45739, 44474, 45888)

Update 'More info' links on API types and fields

> **Please just review the first commit, the rest is generated files.**

Recent docs website shuffling during 1.6 caused majority of links in the API
types and fields to break. Since we do not have server-side 301 redirects, user
has to click an extra link, and the #target fragment in the URL will be lost.  (This is
because GitHub’s redirect_from feature is not ideal.) 

For the time being, I have manually gone through all of them to bring them up to date
and add HTTPS to those missing it. This is a docs-only change and impacts generated
code, generated swaggers, API reference docs etc.

cc: @steveperry-53 @devin-donnelly @chenopis fyi, docs links changes (even small title changes) easily breaks links in API reference, Swagger, kubectl explain, and many other places.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2017-05-16 18:11:04 -07:00
Kubernetes Submit Queue 0e73596141 Merge pull request #45374 from marun/fed-refactor-sync-controller
Automatic merge from submit-queue (batch tested with PRs 45374, 44537, 45739, 44474, 45888)

[Federation] Refactor sync controller's reconcile method for maintainability

This PR refactors the sync controllers reconcile method for maintainability with the goal of eliminating the need for type-specific controller unit tests.  The unit test coverage for reconcile is not complete, but I think it's a good start.

cc: @kubernetes/sig-federation-pr-reviews
2017-05-16 18:10:53 -07:00
Kubernetes Submit Queue 8ef6857881 Merge pull request #44403 from pmichali/issue44351
Automatic merge from submit-queue (batch tested with PRs 45860, 45119, 44525, 45625, 44403)

coredns: support IPv6 record set

Added support for AAAA record for coredns and included unit test.
Refactored common test code to reduce duplication from added test and
existing tests.
Fixed function names in comments for Google and AWS tests to match
actual test name in this area.



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

Adding IPv6 support to kubernetes, once piece at a time. :)

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

**Special notes for your reviewer**:
In addition to the change and unit test method, I did some minor refactoring (since the UT was a near clone of an existing test). Fixed typos in related test methods' comment lines. Please let me know if this is OK (I was thinking it was a small change, but don't know the protocol here), or if I need to break it into multiple commits.

**Release note**:

```NONE
```
2017-05-16 16:14:57 -07:00
Kubernetes Submit Queue 31cb269d4c Merge pull request #44525 from irfanurrehman/fed-common-preferences
Automatic merge from submit-queue (batch tested with PRs 45860, 45119, 44525, 45625, 44403)

[Federation] Move annotations and related parsing code as common code

This PR moves some code, which was duplicate, around as common code.
Changes the names of structures used for annotations to common names.
s/FederatedReplicaSetPreferences/ReplicaAllocationPreferences/
s/ClusterReplicaSetPreferences/PerClusterPreferences/
This can be reused in job controller and hpa controller code.

**Special notes for your reviewer**:
@kubernetes/sig-federation-misc 

**Release note**:

```NONE
```
2017-05-16 16:14:54 -07:00
Kubernetes Submit Queue ece4124e17 Merge pull request #45355 from p0lyn0mial/admission_options_spits_out_admission_control
Automatic merge from submit-queue (batch tested with PRs 45408, 45355, 45528)

Admission options spits out admission control

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

This PR adds ApplyTo method to AdmissionOptions struct. The method creates and initialises admission control to the server configuration.

**Release note**:

```
NONE
```
2017-05-16 09:11:54 -07:00
Paul Michali 8d9e90cccf coredns: support IPv6 record set
Added support for AAAA record for coredns and included unit test.

Fixed function names in comments for Google and AWS tests to match
actual test name in this area.
2017-05-16 15:51:18 +00:00
shashidharatd 005e11bfb3 Auto-generated bazel build file 2017-05-16 19:55:49 +05:30
shashidharatd 2ba7c8e1e6 Add stubDomains to kube-dns configmap for private nameserver 2017-05-16 19:55:49 +05:30
shashidharatd c1070166a8 Add coredns-endpoints to CoreDNS provider config 2017-05-16 18:56:23 +05:30
shashidharatd c9454f81cf Auto generated bazel build file 2017-05-16 09:20:44 +05:30
shashidharatd d0ef025455 Segregate DNS related code to separate controller 2017-05-16 09:20:44 +05:30
mbohlool 103c1bfc1e Update generated files 2017-05-15 15:34:33 -07:00
Ahmet Alp Balkan e1e8095ea7
Generated files (update-federation-api-reference-docs.sh)
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2017-05-15 15:30:28 -07:00
p0lyn0mial 7b0950b298 bazel update 2017-05-16 00:18:38 +02:00
Ahmet Alp Balkan 7d7b5fe2af
Generated files (update-federation-swagger-spec.sh)
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2017-05-15 15:12:00 -07:00
Ahmet Alp Balkan bc4c561c67
Generated files (update-federation-generated-swagger-docs.sh)
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2017-05-15 15:00:19 -07:00
Ahmet Alp Balkan 455baadc40
Autogenerated files
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2017-05-15 14:15:30 -07:00
Ahmet Alp Balkan 893280d3e4
Update 'More info' links on API types and fields
Recent docs website shuffling during 1.6 caused majority of links in the API
types and fields to break. Since we do not have server-side 301 redirects, user
has to click an extra link and the #target segment in the URL will be lost.

I have manually gone through all of them to bring them up to date and add HTTPS
to those missing it.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2017-05-15 13:32:25 -07:00
Kubernetes Submit Queue a4307eb7a2 Merge pull request #45600 from nikhiljindal/waitForDel
Automatic merge from submit-queue (batch tested with PRs 41331, 45591, 45600, 45176, 45658)

Updating generic registry to return UID of the deleted resource

Ref https://github.com/kubernetes/kubernetes/issues/42594

cc @kubernetes/sig-api-machinery-pr-reviews @smarterclayton 

```release-note
Updating apiserver to return UID of the deleted resource. Clients can use this UID to verify that the resource was deleted or waiting for finalizers.
```
2017-05-15 13:25:47 -07:00
Maru Newby b7bc39f5b6 fed: Update sync controller to use runtime.HandleError 2017-05-15 13:07:47 -07:00
Kubernetes Submit Queue f038c5494e Merge pull request #45798 from shashidharatd/federated-service
Automatic merge from submit-queue

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

…TrafficPolicy field to v1.Service

**What this PR does / why we need it**:
New fields (ExternalTrafficPolicy) are introduced to v1.Service by this PR #41162. If this field is not specified in service spec, the service controller will assign default and updates the service spec.
In federation, the service spec is not updated and we continuously try to reconcile as the federated service and the service in federated cluster do not match.

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


**Special notes for your reviewer**:

**Release note**:
```
NONE
```

cc @kubernetes/sig-federation-bugs @madhusudancs
2017-05-15 00:47:17 -07:00
nikhiljindal 4c828eeaab Autogenerated swagger changes 2017-05-14 23:11:02 -07:00
shashidharatd d22527522f Fix federated service reconcilation issue due to addition of ExternalTrafficPolicy field to v1.Service 2017-05-15 10:30:51 +05:30
nikhiljindal 49b6899232 Autogenerated changes from update-federation-api-reference-docs.sh 2017-05-14 17:20:24 -07:00
nikhiljindal 283e820596 Autogenerated changes from update-federation-swagger-spec.sh 2017-05-14 17:20:23 -07:00
p0lyn0mial 8cea69aa98 This PR implements AdmissionOptions.ApplyTo
ApplyTo adds the admission chain to the server configuration the method lazily initializes a generic plugin
that is appended to the list of pluginInitializers.

apiserver.Config will hold an instance of SharedInformerFactory to ensure we only have once instance.
The field will be initialized in apisever.SecureServingOptions
2017-05-14 10:30:19 +02:00
Kubernetes Submit Queue 35eba22cc7 Merge pull request #41162 from MrHohn/esipp-ga
Automatic merge from submit-queue (batch tested with PRs 45623, 45241, 45460, 41162)

Promotes Source IP preservation for Virtual IPs from Beta to GA

Fixes #33625. Feature issue: kubernetes/features#27.

Bullet points:
- Declare 2 fields (ExternalTraffic and HealthCheckNodePort) that mirror the ESIPP annotations.
- ESIPP alpha annotations will be ignored.
- Existing ESIPP beta annotations will still be fully supported.
- Allow promoting beta annotations to first class fields or reversely.
- Disallow setting invalid ExternalTraffic and HealthCheckNodePort on services. Default ExternalTraffic field for nodePort or loadBalancer type service to "Global" if not set.

**Release note**:

```release-note
Promotes Source IP preservation for Virtual IPs to GA.

Two api fields are defined correspondingly:
- Service.Spec.ExternalTrafficPolicy <- 'service.beta.kubernetes.io/external-traffic' annotation.
- Service.Spec.HealthCheckNodePort <- 'service.beta.kubernetes.io/healthcheck-nodeport' annotation.
```
2017-05-12 15:00:46 -07:00
Zihong Zheng 12b6c2b879 Autogenerated files 2017-05-12 10:59:00 -07:00
Maru Newby 23b2cee8de fed: Further refactor of sync controller reconcile
This change breaks out non-delete cluster updates into a method for
testability.
2017-05-12 08:26:43 -07:00
Maru Newby 547ece5b83 fed: Refactor sync controller's reconcile method 2017-05-12 08:25:54 -07:00
Maru Newby cf71a8ef11 fed: Factor annotation mutation out of the crudtester for reuse 2017-05-12 08:25:54 -07:00
Irfan Ur Rehman de2544d5c3 [Federation] Move annotations and related parsing code as common code 2017-05-12 18:22:37 +05:30
Kubernetes Submit Queue 7b0dee89f2 Merge pull request #44984 from perotinus/rssync
Automatic merge from submit-queue (batch tested with PRs 45684, 45266, 45669, 44787, 44984)

[Federation] Unify the delivery methods in the ReplicaSet controller.

Unifies the federated and non-federated object delivery methods. The reconcile method that's called already checks for existence, and no other controller has a similar paradigm, so it seems reasonable to simplify it here.

cc @marun

**Release note**:
```release-note
NONE
```
2017-05-12 03:20:45 -07:00
Kubernetes Submit Queue d437703d27 Merge pull request #44787 from mbohlool/c1
Automatic merge from submit-queue (batch tested with PRs 45684, 45266, 45669, 44787, 44984)

Add GroupVersionKind extension to OpenAPI operations

Fixes: #43249
ref: #34254

```release-note
Added Group/Version/Kind and Action extension to OpenAPI Operations 
```
2017-05-12 03:20:42 -07:00
Jonathan MacMillan ab101c9c74 [Federation] Unify the delivery methods in the ReplicaSet controller. 2017-05-11 15:31:39 -07:00
Kubernetes Submit Queue 15df7fedca Merge pull request #44626 from madhusudancs/fed-dns-paged-list
Automatic merge from submit-queue (batch tested with PRs 44626, 45641)

Update Google Cloud DNS provider Rrset.Get(name) method to return a list and change the `Rrset.List()` implementation to perform a paged walk

Some federated service e2e tests and a few ingress tests would become flaky after a few hundred runs. @csbell spent quite a lot of time debugging this and found out that this flakiness was due to a bug in the federated service controller deletion logic. Deletion of a federated service object triggers a logic in the controller to update the DNS records corresponding to that object. This DNS record update logic would return an error in failed runs which would in-turn cause the controller to reschedule the operation. This led to an infinite retry-failure cycle that never gave the API server a chance to garbage collect the deleted service object.

A couple of days ago we started seeing a correlation between the number of resource records in a DNS managed zone and these test failures. If you look at the test runs before and after run 2900 in the test grid - https://k8s-testgrid.appspot.com/cluster-federation#gce, you will notice that the grid became super green at 2900. That's when I deleted all the dangling DNS records from the past runs.

After some investigation yesterday, we found that `ResourceRecordSet.Get()` interface and its implementation, and `ResourceRecordSet.List()` implementation at least for Google Cloud DNS were incorrect.

This PR makes minimal set of changes (read: least invasive) in Google Cloud DNS provider implementation to fix these problems:

1. Modifies DNS provider Rrset.Get(name) interface to return multiple records and updates federated service controller.

    There can be multiple DNS resource records for a given name. They can vary by type, ttl, rrdata and a number of various other parameters. It is incorrect to return a single resource record for a given name.

    This change updates the Get interface to return multiple records for a given name and uses this list in the federated service controller to perform DNS operations.

2. Update Google Cloud DNS List implementation to perform a paged walk of lists to aggregate all the DNS records.

    The current `List()` implementation just lists the DNS resorce records in a given managed zone once and retruns the list. It neither performs a paged walk nor does it consider the `page_token` in the returned response.

    This change walks all the pages and aggregates the records in the pages and returns the aggregated list. This is potentially dangerous as it can blow up memory if there are a huge number of records in the given managed zone. But this is the best we can do without changing the provider interface too much. 

    Next step is to define a new paged list interface and implement it.

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

/assign @csbell 

cc @justinsb @shashidharatd @quinton-hoole @kubernetes/sig-federation-pr-reviews
2017-05-11 03:59:35 -07:00
Madhusudan.C.S 4bde13ac62 Remove all the existing records before creating new ones to avoid DNS misconfiguration.
When we fetch the dns records by name, we get a list of records that match
the given name. As an optimization we look up to see if the new record we
want to create is already in the returned list to avoid performing any updates.

However, when the new record we want to create isn't in the returned list, it
is hard to say if the returned list contains the list of records that we want
to retain. For example, we might get a list of A records and we want to create
a CNAME record. Creating a new CNAME record without removing the A records is
a DNS misconfiguration. So to play safe we just remove all the existing records
in the list and create the new desired record.

**Note**: This is the opposite of what I said here - https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/44626#-Ki9xQOzybryHvsxNrra.
2017-05-11 00:47:11 -07:00
Kubernetes Submit Queue c2f6ccf0ef Merge pull request #45256 from perotinus/rs_noindexer
Automatic merge from submit-queue (batch tested with PRs 45556, 45561, 45256)

[Federation] Replace the indexing lister with a regular store in the replicaset controller

This is part of the refactoring work to allow the replicaset controller to use the generic sync controller.

None of the other controllers use a lister, including the deployment controller

**Release note**:
```release-note
NONE
```
2017-05-10 22:24:43 -07:00
Kubernetes Submit Queue b8186966b4 Merge pull request #45382 from marun/fed-updater-timeout-per-instance
Automatic merge from submit-queue (batch tested with PRs 45382, 45384, 44781, 45333, 45543)

[Federation] Provide updater timeout to instance rather than to Update()

This PR changes the federated updater to receive its timeout at construction rather than on every call to Update().  This provides a slight decrease in coupling by removing the need for the deletion handler to be provided the timeout along with the updater.

cc: @kubernetes/sig-federation-pr-reviews @perotinus
2017-05-10 17:47:39 -07:00
Kubernetes Submit Queue 57c72a46ea Merge pull request #42296 from perotinus/kubefedlogs-update
Automatic merge from submit-queue

[Federation] Improve the logging and user feedback in 'kubefed init'

This is a follow-up to #41849, which added some status information. This PR is based off of that one, and includes its changes as well.

See #41725.

```release-note
None
```
2017-05-10 13:41:00 -07:00
Jonathan MacMillan 6f6955819f [Federation] Replace the indexing store with a regular store in the replicaset controller. 2017-05-10 11:37:05 -07:00
Maru Newby 3f2dab896c fed: Provide updater timeout to instance rather than to Update() 2017-05-10 09:18:37 -07:00
Madhusudan.C.S 20e558060c Address review comments. 2017-05-10 00:03:42 -07:00
Madhusudan.C.S e0ca8abba8 Update Google Cloud DNS List implementation to perform a paged walk of lists to aggregate all the DNS records.
The current `List()` implementation just lists the DNS resorce records in
a given managed zone once and retruns the list. It neither performs a paged
walk nor does it consider the `page_token` in the returned response.

This change walks all the pages and aggregates the records in the pages
and returns the aggregated list. This is potentially dangerous as it can
blow up memory if there are a huge number of records in the given
managed zone. But this is the best we can do without changing the
provider interface too much. Next step is to define a new paged list
interface and implement it.
2017-05-10 00:03:42 -07:00
Madhusudan.C.S 704d13bfc8 Modify the DNS provider Rrset.Get(name) interface to return multiple records and update federated service controller.
There can be multiple DNS resource records for a given name. They can
vary by type, ttl, rrdata and a number of various other parameters. It
is incorrect to return a single resource record for a given name.

This change updates the Get interface to return multiple records for a given
name and uses this list in the federated service controller to perform
DNS operations.
2017-05-10 00:03:41 -07:00
Jonathan MacMillan 0f851bfa2e [Federation] Improve the logging and user feedback in 'kubefed init'. 2017-05-09 16:06:37 -07:00
Jonathan MacMillan 6856dad472 [Federation] Add a worker queue to the generic sync controller. 2017-05-09 15:40:42 -07:00
yupengzte 32a3c1fe84 check err
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-05-09 19:45:44 +08:00
deads2k 4389f71576 refactor names for the apiserver handling chain 2017-05-08 07:55:31 -04:00
zhangxiaoyu-zidif a76c4cee7e federation:update outdated link 2017-05-08 09:07:40 +08:00
mbohlool 9e51f18635 Update OpenAPI spec 2017-05-05 18:46:50 -07:00
Kubernetes Submit Queue 17d33ea82e Merge pull request #44830 from NickrenREN/remove-NodeLegacyHostIP
Automatic merge from submit-queue

Remove deprecated NodeLegacyHostIP

**Release note**:
```release-note
Remove deprecated node address type `NodeLegacyHostIP`.
```

ref #44807
2017-05-05 15:38:58 -07:00
Kubernetes Submit Queue 8f9216a76f Merge pull request #45218 from NickrenREN/fed-useragent
Automatic merge from submit-queue

Keep UserAgentName style consistent

Keep using UserAgentName for controllers  and add some logs for debugging

**Release note**:

```release-note
NONE
```
2017-05-05 00:49:32 -07:00
NickrenREN 7922f568bf Add ConcurrentDeploymentSyncs to avoid reuse ConcurrentDeploymentSyncs and keep UserAgentName var style consistent
Add some logs for debugging and add concurrent-deployment-syncs flag
2017-05-05 10:19:38 +08:00
Kubernetes Submit Queue b3beeff9c2 Merge pull request #45364 from marun/fed-record-events-in-updater
Automatic merge from submit-queue

[Federation] Record events in federated updater

Controllers for federated types were previously recording events when generating the list of operations.  This change delegates responsibility for recording events to the federated updater so that events are recorded when the operations are actually executed, and ensures consistency across recording of both operation initiation and failure.  

The deletion helper was similarly updated to rely on the federated updater for event recording.  To support this change to the deletion helper, controllers have been updated to provide a namespace qualified name via the objNameFunc function to ensure that the updater can record events for deletions with the same detail as for add and update operations.

cc: @kubernetes/sig-federation-pr-reviews @perotinus
2017-05-04 16:27:15 -07:00
Kubernetes Submit Queue d22a9c2599 Merge pull request #45321 from caesarxuchao/remove-GetGVK
Automatic merge from submit-queue (batch tested with PRs 45362, 45159, 45321, 45238)

Remove redundent GetObjectKind() defined on types

Embedding TypeMeta is enough.
2017-05-04 13:25:05 -07:00
Maru Newby 00ea2eb1cb fed: Make federated updater responsible for recording events 2017-05-04 12:14:10 -07:00
Chao Xu 5f5a70f65f generated clientset changes
propagate to client-go
update-bazel.sh
2017-05-04 11:30:51 -07:00
Chao Xu 47b410f58b Remove redundent GetObjectKind() defined on top-level types
TypeMeta is embedded in all these types and TypeMeta has GetObjectKind()
method to implement the runtime.Object interface.
2017-05-04 10:31:58 -07:00
Maru Newby fd4ff0caa5 fed: Fix deletion helper to use namespace-qualified object names 2017-05-04 07:53:17 -07:00
Kubernetes Submit Queue 99af041604 Merge pull request #45248 from ixdy/docker-bundle-rule
Automatic merge from submit-queue (batch tested with PRs 45283, 45289, 45248, 44295)

Use docker_bundle rule from new rules_docker repo

**What this PR does / why we need it**: switched to using the new `docker_bundle` rule from `rules_docker` instead of my patched `docker_build` rule. This also brings in some fixes for the docker rules that were missing from my fork.

Additionally, I switched out the `git_repository` rules for `http_archive` rules, since that seems to be recommended by the bazel docs (and might be faster). 

Lastly, I updated the `pkg_tar` rules to use my patch, which doesn't prepend `./` to files inside the tarballs.
This one should likely be merged upstream in the near future.

I think this is the last of the changes necessary to have `bazel run //:ci-artifacts` working properly to support using bazel for e2e in CI.

**Release note**:

```release-note
NONE
```
2017-05-03 12:07:58 -07:00
Jeff Grafton e231d4280b Replace git_repository with http_archive and use ixdy's fork of bazel tools for pkg_tar 2017-05-03 10:13:06 -07:00
Kubernetes Submit Queue fc51574bb4 Merge pull request #44913 from zhangxiaoyu-zidif/cleancode-util-for-err
Automatic merge from submit-queue

cleancode:util.go

cleancode, the modification point make code clean and light
2017-05-02 17:03:26 -07:00
Kubernetes Submit Queue 7f2011c160 Merge pull request #45225 from FengyunPan/update-event-type
Automatic merge from submit-queue (batch tested with PRs 40544, 44338, 45225)

[Federation]Update event type

Use EventTypeWarning instead of EventTypeNormal when get failure
Left behind after pr #40296
2017-05-02 13:03:59 -07:00
Kubernetes Submit Queue 72a469f3ac Merge pull request #40544 from henriquetruta/broken-podspec-link
Automatic merge from submit-queue

Fixes broken link in PodSpec

The PodSpec reference to NodeSelector misses
the `.md` extension in the file.



**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-02 12:45:48 -07:00
Kubernetes Submit Queue 0487d38771 Merge pull request #42513 from perotinus/generatedsecrets
Automatic merge from submit-queue (batch tested with PRs 45100, 45152, 42513, 44796, 45222)

[Federation] Generate the secret name in kubefed join.

Addresses part of #42324. A follow-up PR will address annotating Federation resources.

```release-note
Remove the `--secret-name` flag from `kubefed join`, instead generating the secret name arbitrarily.
```
2017-05-02 10:35:09 -07:00
Henrique Truta 4a487cbb11 Fixes broken link in PodSpec
The PodSpec reference to NodeSelector misses
 the .md extension in the file.
2017-05-02 13:33:49 -03:00
FengyunPan eb8f5d3508 [Federation]Update event type 2017-05-02 18:43:53 +08:00
FengyunPan f880e0d5ec Return clusterErr rather than err
The updateClusterIngressUIDToMasters() should return clusterErr,
not err. And do not log fallbackUID when fallbackUID is nil.
2017-05-02 12:26:33 +08:00
Kubernetes Submit Queue 8f6df26755 Merge pull request #44545 from FengyunPan/remove-GetClientsetForCluster
Automatic merge from submit-queue

Remove GetClientsetForCluster()

The newClusterClientset() has insteaded of GetClientsetForCluster(),
and GetClientsetForCluster() run wrong. Let's remove it.
2017-05-01 20:39:47 -07:00
Jonathan MacMillan 77e71a890e [Federation] Generate the secret name in kubefed join. 2017-05-01 14:05:23 -07:00
Kubernetes Submit Queue 70f6f13323 Merge pull request #44988 from zhangxiaoyu-zidif/update-readme-links
Automatic merge from submit-queue

README.md: Update outdated links

**What this PR does / why we need it**:
the PR aims to update some links.
Some links with "#" would not redirect to right point of pages.
Other links without "#" can work, but they are outdated. I change them by the way.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
none
2017-04-30 20:34:52 -07:00
Kubernetes Submit Queue 9bce5f01c8 Merge pull request #44483 from FengyunPan/ignore-notFound2
Automatic merge from submit-queue

Ignore IsNotFound error

IsNotFound error is fine since that means the object is
deleted already, so we should check err and ignore err
before returning.
2017-04-30 01:49:10 -07:00
Ricky Pai a76ada8d5a generated files 2017-04-28 22:55:47 -07:00
Kubernetes Submit Queue 55f802b72a Merge pull request #44196 from xiangpengzhao/cmd-cleanup
Automatic merge from submit-queue

Delete "hard-coded" default value in flags usage.

**What this PR does / why we need it**:
Some flags of kubernetes components have "hard-coded" default values in their usage info. In fact, [pflag pkg](https://github.com/kubernetes/kubernetes/blob/master/vendor/github.com/spf13/pflag/flag.go#L602-L608) has already added a string `(default value)` automatically in the usage info if the flag is initialized. Then we don't need to hard-code the default value in usage info. After this PR, if we want to update the default value of a flag, we only need to update the flag where it is initialized. `pflag` will update the usage info for us. This will avoid inconsistency.

For example:
Before
```
kubelet -h
...
--node-status-update-frequency duration                   Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. Default: 10s (default 10s)
...
```

After
```
kubelet -h
...
--node-status-update-frequency duration                   Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. (default 10s)
...
```

**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**:
This PR doesn't delete some "hard-coded" default values because they are not explicitly initialized. We still need to hard-code them to give users friendly info.

```
--allow-privileged                                        If true, allow containers to request privileged mode. [default=false]
```

**Release note**:

```release-note
None
```
2017-04-28 21:28:09 -07:00
deads2k afc5ae1539 generated 2017-04-28 11:28:37 -04:00
Kubernetes Submit Queue b2d714a7ca Merge pull request #44888 from caesarxuchao/clean-deepcopy-init
Automatic merge from submit-queue

Prepare for move zz_generated_deepcopy.go to k8s.io/api

This is in preparation to move deep copies to with the types to the types repo (see https://github.com/kubernetes/gengo/pull/47#issuecomment-296855818). The init() function is referring the `SchemeBuilder` defined in the register.go in the same packge, so we need to revert the dependency.

This PR depends on https://github.com/kubernetes/gengo/pull/49, otherwise verification will fail.
2017-04-27 18:48:28 -07:00
Chao Xu d0b94538b9 make it possible to move SchemeBuilder with zz_generated.deepcopy.go 2017-04-27 16:57:29 -07:00
Kubernetes Submit Queue a984a7ed09 Merge pull request #44980 from csbell/sync-daemonset
Automatic merge from submit-queue (batch tested with PRs 42740, 44980, 45039, 41627, 45044)

[Federation] Convert Daemonset to use the generic sync controller

To be rebased on master when @perotinus's configmaps PR merges.

Tested integration and e2e.
2017-04-27 13:27:02 -07:00
Christian Bell 15e81959e9 [Federation] Convert Daemonset to use the generic sync controller 2017-04-27 08:07:33 -07:00
FengyunPan 7d4c66c5b5 Cleanup storeToClusterConditionLister
ClusterConditionPredicate() has been deleted,
storeToClusterConditionLister will be unused.
2017-04-27 11:51:26 +08:00
FengyunPan 2077a5ce2e Remove incorrect and unused function
The newClusterClientset() has insteaded of GetClientsetForCluster(),
and GetClientsetForCluster() run wrong. Let's remove it.
2017-04-27 09:49:59 +08:00
zhangxiaoyu-zidif 030c53f585 README.md: Update outdated links 2017-04-27 09:11:18 +08:00
shashidharatd b0f8de7303 Auto generated bazel build file 2017-04-26 22:07:21 +05:30
shashidharatd d2462c79bd Remove unused code in federation service controller 2017-04-26 22:06:09 +05:30
Kubernetes Submit Queue 2d79d53fb2 Merge pull request #41258 from shashidharatd/federation-service-controller-1
Automatic merge from submit-queue (batch tested with PRs 44942, 41258)

[Federation] Use federated informer for service controller and annotations to store lb ingress

**What this PR does / why we need it**:
This is breaking up of the PR #40296 into smaller one. please refer to #41253

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Handles 2 tasks in #41253
Fixes issues in #27623, #35827

**Special notes for your reviewer**:

**Release note**:
```
NONE
```

cc @quinton-hoole @nikhiljindal @kubernetes/sig-federation-pr-reviews
2017-04-26 08:57:38 -07:00
Kubernetes Submit Queue 2d808b5925 Merge pull request #44881 from perotinus/nofedpodstolog
Automatic merge from submit-queue (batch tested with PRs 41287, 41636, 44881, 44826)

[Federation] Only attempt to log information about pods in federation/cluster/log-dump.sh if those pods exist.

Fixes an issue where the script fails, because bash considers an empty array an unbound variable.
**Release note**:
```release-note
NONE
```
2017-04-25 17:56:43 -07:00
Kubernetes Submit Queue d03ca66367 Merge pull request #41636 from luxas/bump_go_18
Automatic merge from submit-queue (batch tested with PRs 41287, 41636, 44881, 44826)

Bump to go1.8 and remove the edge GOROOT

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

Bumps to go1.8; we get:
 - performance improvements
 - build time improvements
 - the possibility to remove the hacky edge-GOROOT for arm and ppc64le that must use go1.8
 - all other awesome features that are included in go1.8: https://golang.org/doc/go1.8

**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/38228

**Special notes for your reviewer**:

@ixdy Please push the image ASAP so we can see if this passes all tests

**Release note**:

```release-note
Upgrade go version to v1.8
```
cc @ixdy @bradfitz @jessfraz @wojtek-t @timothysc @spxtr @thockin @smarterclayton @bprashanth @gmarek
2017-04-25 17:56:40 -07:00
Kubernetes Submit Queue d059c32cdf Merge pull request #44472 from perotinus/annotation_fixes
Automatic merge from submit-queue (batch tested with PRs 44607, 44472, 44482)

[Federation] Fix the comments on FederationNameAnnotation

Follow-up for minor issues raised in #42683

```release-note
NONE
```
2017-04-25 14:47:39 -07:00
Jonathan MacMillan 5336f2de05 [Federation] Convert ConfigMaps to use the generic sync controller. 2017-04-25 14:13:28 -07:00
Kubernetes Submit Queue 81d6fedb0b Merge pull request #44139 from nikhiljindal/delFinalizerDup
Automatic merge from submit-queue (batch tested with PRs 44583, 44139, 44753)

Federation: Removing duplicate finalizer manipulation logic in federation controllers

Ref #40989

Using apimachinery's meta accessor to manipulate objects instead of duplicating that logic in each controller.
Just a cleanup, no behavior change.

cc @kubernetes/sig-federation-pr-reviews
2017-04-25 13:52:38 -07:00
Lucas Käldström f32e6d8a89
Update protobuf 2017-04-25 23:50:31 +03:00
zhangxiaoyu-zidif 7474a9def0 cleancode:util.go 2017-04-25 17:13:25 +08:00
Madhusudan.C.S ffc28cc821 Revert "[Federation] Build a simple hyperkube image on-the-fly only containing the hyperkube binary for development and testing purposes." 2017-04-24 22:26:20 -07:00
Kubernetes Submit Queue 5b351bf684 Merge pull request #43181 from madhusudancs/fed-build-hyperkube-img
Automatic merge from submit-queue (batch tested with PRs 44862, 42241, 42101, 43181, 44147)

[Federation] Build a simple hyperkube image on-the-fly only containing the hyperkube binary for development and testing purposes.

**Release note**:

```release-note
NONE
```
2017-04-24 19:39:44 -07:00
Jonathan MacMillan 7e15b924e7 [Federation] Only attempt to log information about pods in federation/cluster/log-dump.sh if those pods exist. 2017-04-24 14:12:03 -07:00
Kubernetes Submit Queue c90faa8071 Merge pull request #44779 from enj/enj/r/etcd_default_name_copy
Automatic merge from submit-queue (batch tested with PRs 44837, 44779, 44492)

Default ObjectNameFunc for all REST Stores

All `Store`s in Kubernetes follow the same logic for determining the name of an object.  This change makes it so that `CompleteWithOptions` defaults the `ObjectNameFunc` if it is not specified.  Thus a user does not need to remember to use `ObjectMeta.Name`.  Using the wrong field as the name can lead to an object which has a name that bypasses normal object name validation.

Signed-off-by: Monis Khan <mkhan@redhat.com>

cc @liggitt @soltysh for review

**Release note**:

```
NONE
```
2017-04-24 07:55:59 -07:00
shashidharatd 950db8e0a1 Handle review comments 2017-04-24 10:45:14 +05:30
NickrenREN 7d00e5cfb6 remove deprecated NodeLegacyHostIP 2017-04-24 11:01:25 +08:00
nikhiljindal ee8379c5b3 Autogenerated bazel changes 2017-04-22 18:23:52 -07:00
nikhiljindal c82c1b05fd Updating tests 2017-04-22 18:23:51 -07:00
nikhiljindal df1288c3fa Using apimachinerymeta to manipulate finalizers to remove duplicate code 2017-04-22 18:23:51 -07:00
Monis Khan ed35deb69d
Default ObjectNameFunc for all REST Stores
All Stores in Kubernetes follow the same logic for determining the name
of an object.  This change makes it so that CompleteWithOptions defaults
the ObjectNameFunc if it is not specified.  Thus a user does not need to
remember to use ObjectMeta.Name.  Using the wrong field as the name can
lead to an object which has a name that bypasses normal object name
validation.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-04-21 15:47:25 -04:00
Kubernetes Submit Queue ee86c18d92 Merge pull request #44623 from p0lyn0mial/split_out_admission_options
Automatic merge from submit-queue (batch tested with PRs 42202, 40784, 44642, 44623, 44761)

Split out AdmissionOptions

**What this PR does / why we need it**: The changes in this PR split out AdmissionOptions from ServerRunOptions. In the long term AdmissionOptions will accepts various dependencies
and spit out AdmissionControl

**Release note**:

NONE
2017-04-21 11:52:09 -07:00
Kubernetes Submit Queue 3cc0e4b5b8 Merge pull request #44704 from caiyixiang/del_unuse_const
Automatic merge from submit-queue (batch tested with PRs 44722, 44704, 44681, 44494, 39732)

delete unuse const

delete unuseful const
2017-04-20 16:00:58 -07:00
caiyixiang 31829850b9 delete unuse const 2017-04-20 15:17:36 +08:00
shashidharatd 36e7ed4cae Auto generated code 2017-04-20 10:37:50 +05:30
shashidharatd 3cb4d69c0b Add new unit tests for federated service dns 2017-04-20 10:37:50 +05:30
shashidharatd 721224d72a Add new unit tests for federated service controller 2017-04-20 10:37:50 +05:30
shashidharatd d00eca48da Use federated informer framework and use annotations to store lb ingress 2017-04-20 10:37:50 +05:30
shashidharatd bacd7b7454 Add few new fake hooks to test 2017-04-20 08:55:36 +05:30
shashidharatd b28f41eb02 Add new ResourceEventHandlerFuncs to federated informer 2017-04-20 08:55:36 +05:30
shashidharatd 58b2cce95e Add types for federated service ingress annotation 2017-04-20 08:55:36 +05:30
FengyunPan 1bad02cb22 Use const value for pod's conditions 2017-04-20 10:43:24 +08:00
FengyunPan d1e018b06f Ignore IsNotFound error
IsNotFound error is fine since that means the object is
deleted already, so we should ignore it.
2017-04-20 08:59:42 +08:00
Kubernetes Submit Queue 4524579c0e Merge pull request #44674 from madhusudancs/fed-dump-logs-pod-pods
Automatic merge from submit-queue (batch tested with PRs 44499, 44674)

Strip "pods/" prefix from the pod names returned by kubectl get pods.

Note that the result returned by kubectl get -o name has plural prefixes "pods". We were already trying to remove the prefix "pod", but that's not how the results are returned unfortunately.

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

cc @perotinus @kubernetes/sig-federation-pr-reviews
2017-04-19 09:51:58 -07:00
Madhusudan.C.S c2a8f0bae9 Remove "pods/" prefix from the pod names returned by kubectl get pods.
Note that the result returned by kubectl get -o name has plural prefixes "pods".
2017-04-19 07:39:56 -07:00
Kubernetes Submit Queue 53258ba679 Merge pull request #44366 from therc/patch-3
Automatic merge from submit-queue

Fix ensureDnsRecords comments for federated services

I went to look at the source comments, because the documentation is not exhaustive about what kind of DNS records are created for federated services (and http://blog.kubernetes.io/2016/07/cross-cluster-services.html is wrong...).
It turns out that even the comment is not in sync with the code: two out of three records listed use `.federation`, while the author probably meant `.mydomain.com` (which has less chance of getting mixed up with `myfed`). I fixed those, as well as a few spelling and parenthesis errors. Hopefully this will help others save time and not scratch their heads.

cc @quinton-hoole
2017-04-18 23:55:49 -07:00
Kubernetes Submit Queue 8144a11e62 Merge pull request #44639 from marun/kubefed-apiserver-on-high-port
Automatic merge from submit-queue (batch tested with PRs 44645, 44639, 43510)

[Federation][kubefed]: Set apiserver to bind securely to 8443 instead of 443

On platforms like OpenShift that don't run containers as root by default, binding to ports < 1000 is not permitted.  Having the apiserver bind to a high port means it can run with reduced privileges.  The service will still expose the apiserver on 443, so this change shouldn't impact clients of the federation api.

cc: @kubernetes/sig-federation-pr-reviews @perotinus
2017-04-18 23:22:02 -07:00
Maru Newby 767ebf8b9e kubefed: Set apiserver pod to bind securely to 8443 instead of 443
On platforms like OpenShift that don't run containers as root by
default, binding to ports < 1000 is not permitted.  Having the
apiserver bind to a high port means it can run with reduced
privileges.  The service will still expose the apiserver on 443, so
this change shouldn't impact clients of the federation api.
2017-04-18 19:12:46 -07:00
p0lyn0mial de9706bc15 Split out AdmissionOptions
In the long term AdmissionOptions will accepts various dependencies
and spit out AdmissionControl
2017-04-18 19:48:14 +02:00
Kubernetes Submit Queue 768859404b Merge pull request #41849 from perotinus/kubefedlogs
Automatic merge from submit-queue

[Federation] Print out status updates while `kubefed init` is running

This is not an ideal final state–it does not address the appearance of hanging during long-running commands, for example–but it provides some level of information when the operations are successful.

See #41725.

**Release note**:

```release-note
Prints out status updates when running `kubefed init`
```
2017-04-18 01:01:57 -07:00
Kubernetes Submit Queue aa43023fd7 Merge pull request #44526 from FengyunPan/fix-UpdateClusterStatus-panic
Automatic merge from submit-queue (batch tested with PRs 44469, 44566, 44467, 44526)

[Federation]Fix panic: index out of range

When the number of clusterStatusNew's Conditions is different from
the number of clusterStatusOld's Conditions, clustercontroller
will panic. We should check it before comparing.
2017-04-17 20:07:01 -07:00
Jonathan MacMillan 39bfcfbba4 [Federation] Print out status updates while kubefed is running. 2017-04-17 14:53:07 -07:00
Kubernetes Submit Queue ca8f1bcf3d Merge pull request #44519 from thockin/remove-deprecated-public-ips
Automatic merge from submit-queue

Remove deprecatedPublicIPs field
2017-04-17 12:11:00 -07:00
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
FengyunPan 8886574a67 [Federation]Fix panic: index out of range
When the number of clusterStatusNew's Conditions is different from
the number of clusterStatusOld's Conditions, clustercontroller
will panic. We should check it before comparing.
2017-04-16 19:40:16 +08:00
Tim Hockin 9153bfa911 Remove deprecatedPublicIPs field 2017-04-15 13:16:05 -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
Jonathan MacMillan 3e69ca7452 [Federation] Fix the comments on FederationNameAnnotation 2017-04-13 18:44:24 -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
Rudi C 28a44e375b Fix ensureDnsRecords comments for federated services
I went to look at the source comments, because the documentation is not exhaustive about what kind of DNS records are created for federated services (and http://blog.kubernetes.io/2016/07/cross-cluster-services.html is wrong...).
It turns out that even the comment is not in sync with the code: two out of three records listed use `.federation`, while the author probably meant `.mydomain.com` (which has less chance of getting mixed up with `myfed`). I fixed those, as well as a few spelling and parenthesis errors. Hopefully this will help others save time and not scratch their heads.
2017-04-11 18:01:35 -04: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
xiangpengzhao 420caf200c
Delete "hard-coded" default value in flags usage. 2017-04-07 11:21:37 +08: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
Christian Bell 39d4fbfe36 fed: Disable orphaning of per-cluster resources on deletion.
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.
2017-04-05 13:07:28 -07:00
Huamin Chen 777eb32e91 generated files
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-04-05 12:46:42 +00:00
Kubernetes Submit Queue a845d81fdd Merge pull request #44083 from NickrenREN/event-warning
Automatic merge from submit-queue

Update some event types

**Release note**:
```release-note
NONE
```
2017-04-05 01:55:36 -07:00
NickrenREN 5439d1b576 Update some event types 2017-04-05 15:16:56 +08:00
Chris Hupman dc4b8e3496 Fixed inaccurate comments for Secret and ConfigMap
Fixes #42203

ran documentation update scripts in hack folder

Signed-off-by: Chris Hupman <chupman@us.ibm.com>
2017-04-04 19:42:08 +00:00
Daniel Martí 810dbc5e98 kubectl/cmd: remove a bunch of unused parameters
Found with github.com/mvdan/unparam.
2017-04-04 10:36:30 +01:00
Kubernetes Submit Queue e28cb42706 Merge pull request #42717 from andrewsykim/support-host-ip-downward-api
Automatic merge from submit-queue

Support status.hostIP in downward API

**What this PR does / why we need it**:
Exposes pod's hostIP (node IP) via downward API. 

**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/24657

**Special notes for your reviewer**:
Not sure if there's more documentation that's needed, please point me in the right direction and I will add some :)
2017-04-03 15:48:12 -07:00