Commit Graph

1407 Commits (e4953081f743fe8b64d049f083fd35540f5360e0)

Author SHA1 Message Date
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
p0lyn0mial 7b0950b298 bazel update 2017-05-16 00:18:38 +02: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
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
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
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
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