Commit Graph

153 Commits (98e6d2c1e552120f20d7d726c5779ecfcb7145e5)

Author SHA1 Message Date
Kubernetes Submit Queue 2c50d2b6fc Merge pull request #36094 from janetkuo/overlapping-deployment-select
Automatic merge from submit-queue

Update how we detect overlapping deployments

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

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

**Special notes for your reviewer**: cc @kubernetes/deployment 

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
NONE
```

When looking for overlapping deployments, we should also find other deployments that select current deployment's pods,
not just the ones whose pods are selected by current deployment.
2016-11-05 21:04:58 -07:00
Michail Kargakis a5029bf373 controller: support perma-failed deployments
This commit adds support for failing deployments based on a timeout
parameter defined in the spec. If there is no progress for the amount
of time defined as progressDeadlineSeconds then the deployment will be
marked as failed by adding a condition with a ProgressDeadlineExceeded
reason in it. Progress in the context of a deployment means the creation
or adoption of a new replica set, scaling up new pods, and scaling down
old pods.
2016-11-04 13:36:46 +01:00
Janet Kuo 9f3560c563 Update how we detect overlapping deployments
When looking for overlapping deployments, we should also find other deployments that select current deployment's pods,
not just the ones whose pods are selected by current deployment.
2016-11-02 15:29:28 -07:00
Kubernetes Submit Queue 7f309f5fae Merge pull request #35471 from caesarxuchao/client-gen-multi-versions
Automatic merge from submit-queue

Let release_1_5 clientset include multiple versions of a group

Fix #35237 

This PR make versioned clientset to include multiple versions of a group. Currently only `batch` has `v1` and `v2alpha1`. The clientset interface now looks like:
```go
	BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface
	BatchV1() v1batch.BatchV1Interface
	// Deprecated: please explicitly pick a version if possible.
	Batch() v1batch.BatchV1Interface
```

Commit "update client-gen to say internalversion rather than unversioned" fixes https://github.com/kubernetes/kubernetes/issues/24481. 


cc @kubernetes/sig-api-machinery @soltysh @deads2k @nikhiljindal 



```release-note
release_1_5 clientset supports multiple versions of a group.
```
2016-10-29 15:40:13 -07:00
Kubernetes Submit Queue 7c9c8cbf28 Merge pull request #34952 from kargakis/update-observedgeneration-for-overlapping-deployments
Automatic merge from submit-queue

Make overlapping deployments deletable

@kubernetes/deployment ptal

Fixes https://github.com/kubernetes/kubernetes/issues/34466 by 1) not adding the overlapping annotation in the working deployment, 2) updates observedGeneration for overlapping deployments, and 3) updates the kubectl deployment reaper to do non-cascading deletion for deployments with the overlapping annotation.
2016-10-29 14:50:16 -07:00
Chao Xu 850729bfaf include multiple versions in clientset
update client-gen to use the term "internalversion" rather than "unversioned";
leave internal one unqualified;
cleanup client-gen
2016-10-29 13:30:47 -07:00
Jan Chaloupka 6079053407 Update clientset generator to use RESTClient interface instead of the RESTClient data type 2016-10-21 10:13:51 +02:00
Michail Kargakis f2ae192e3a controller: update overlapping deployments to be deletable 2016-10-18 17:46:34 +02:00
Michail Kargakis 212a26dc95 controller: set minReadySeconds in deployment's replica sets
* Estimate available pods for a deployment by using minReadySeconds on
the replica set.
* Stop requeueing deployments on pod events, superseded by following the
replica set status.
* Cleanup redundant deployment utilities
2016-10-13 12:27:47 +02:00
deads2k aa5cbb704f convert deployment controller to shared informers 2016-10-07 15:06:57 -04:00
deads2k c30b2efc46 update replicaset lister 2016-10-05 15:20:27 -04:00
deads2k 358a57d74a update deployment lister 2016-10-05 13:27:35 -04:00
Michail Kargakis 0a843a50ba controller: don't retry deployments with overlapping selectors
Returning an error will cause the deployment to be requeued. We should
just emit an event for deployments with overlapping selectors and silently
drop then out of the queue. This should be transitioned to a Condition
once we have them.
2016-09-26 17:59:51 +02:00
Mike Danese a765d59932 move informer and controller to pkg/client/cache
Signed-off-by: Mike Danese <mikedanese@google.com>
2016-09-15 12:50:08 -07:00
lojies 9498b227a1 change infof to Errorf in some codes 2016-09-12 15:55:42 +08:00
deads2k 4317173d3f add names for workqueues to gather controller latency/depth metrics 2016-08-30 09:51:50 -04:00
Kubernetes Submit Queue 68f54756c2 Merge pull request #31449 from janetkuo/return-deployment-rollback
Automatic merge from submit-queue

Use updated deployment after rollback

@kubernetes/deployment 

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
NONE
```
2016-08-26 06:49:06 -07:00
Janet Kuo 6e86a20304 Use updated deployment after rollback 2016-08-25 13:08:52 -07:00
Janet Kuo 90557ec56c Handle overlapping deployments gracefully
1. When overlapping deployments are discovered, annotate them
2. Expose those overlapping annotations as warnings in kubectl describe
3. Only respect the earliest updated one (skip syncing all other overlapping deployments)
4. Use indexer instead of store for deployment lister
2016-08-23 14:33:30 -07:00
Wojciech Tyczynski acfd8c787f Avoid computing super-expensive DeepEqual on every pod update 2016-08-11 08:35:36 +02:00
Michal Rostecki 59ca5986dd Print/log pointers of structs with %#v instead of %+v
There are many places in k8s where %+v is used to format a pointer
to struct, which isn't working as expected.

Fixes #26591
2016-08-01 22:27:56 +02:00
Michail Kargakis 62afa3de71 controller: update all rs annotations on a scaled rollout
When a new rollout with a different size than the previous size of the
deployment is initiated then only the new replica set will notice the
new size. Old replica sets are not updated by the rollout path.
2016-07-20 22:40:43 +02:00
gmarek 7815a3e7bc DeploymentController doesn't take any actions when being deleted 2016-07-12 09:43:08 +02:00
Michail Kargakis 1fb8dd838b controller: various fixes for the deployment controller
Changes:
* moved waiting for synced caches before starting any work
* refactored worker() to really quit on quit
* changed queue to a ratelimiting queue and added retries on errors
* deep-copy deployments before mutating - we still need to deep-copy
replica sets and pods
2016-07-08 17:30:40 +02:00
Michail Kargakis 332d151d61 Break deployment controller into separate self-contained files
* rolling.go (has all the logic for rolling deployments)
* recreate.go (has all the logic for recreate deployments)
* sync.go (has all the logic for getting and scaling replica sets)
* rollback.go (has all the logic for rolling back a deployment)
* util.go (contains all the utilities used throughout the controller)

Leave back at deployment_controller.go all the necessary bits for
creating, setting up, and running the controller loop.

Also add package documentation.
2016-07-02 09:53:52 +02:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot fc1937f68f Merge pull request #20273 from kargakis/allow-scaling-paused-deployments
Automatic merge from submit-queue

Proportionally scale paused and rolling deployments

Enable paused and rolling deployments to be proportionally scaled.
Also have cleanup policy work for paused deployments.

Fixes #20853
Fixes #20966
Fixes #20754

@bgrant0607 @janetkuo @ironcladlou @nikhiljindal

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/20273)
<!-- Reviewable:end -->
2016-06-24 19:41:51 -07:00
Janet Kuo 726ba45b59 Deployment controller's cleanupUnhealthyReplicas should respect minReadySeconds 2016-06-20 15:03:57 -07:00
Michail Kargakis f3d2e3ff22 controller: proportionally scale paused and rolling deployments
Enable paused and rolling deployments to be proportionally scaled.
Also have cleanup policy work for paused deployments.
2016-06-20 12:13:35 +02:00
Janet Kuo 764df2e096 Listing pods only once when getting pods for RS in deployment 2016-06-10 09:55:28 -07:00
Janet Kuo 36f704c975 List RSes only once when getting old+new RSes in deployment controller 2016-06-02 11:24:43 -07:00
Janet Kuo 310a7d2eb5 Adding logs in deployment for debugging 2016-05-31 15:59:46 -07:00
jianhuiz 441e206671 move server client shared annotations to new api/annotations package 2016-05-09 11:10:44 -07:00
mqliang 9011207f18 add namespace index to rc and pod 2016-05-06 17:12:36 +08:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
gmarek 3171aac57c Generated clients can return their RESTClients, RESTClient can return its RateLimiter 2016-04-27 22:15:10 +02:00
Chao Xu 49559a3332 Generate the typed clients under the clientset folder 2016-03-31 15:28:45 -07:00
k8s-merge-robot e35efb5765 Merge pull request #23467 from mikedanese/dont-sync-deployment
Auto commit by PR queue bot
2016-03-29 06:42:20 -07:00
Mike Danese c4305762b2 don't sync deployment when pod selector is empty 2016-03-28 10:12:41 -07:00
goltermann 32d569d6c7 Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
Janet Kuo 482efba8de Copy annotations back from RS to Deployment on rollback 2016-03-21 10:21:48 -07:00
Janet Kuo 26bcdb1bd6 Separate GetOldRS and GetNewRS in deployment controller (get and mutate) and deployment util (get only) 2016-03-15 10:23:20 -07:00
Janet Kuo 4a181dacec Fix the possible negative scale down value; add logs when scaling down 2016-03-10 16:01:18 -08:00
Madhusudan.C.S db48dcf583 ReplicaSetSpec.Template shouldn't be a pointer.
PodTemplateSpec should be consistent for all the types in extensions/v1beta1.

See PR #19510.
2016-03-09 21:24:16 -08:00
Michail Kargakis 1388919976 controller: resolve unavailable in conjuction with surge for deployments
Due to rounding down for maxUnavailable, we may end up with deployments
that have zero surge and unavailable pods something that 1) is not allowed
as per validation, 2) blocks deployments. If we end up in such a situation
set maxUnavailable to 1 on the theory that surge might not work due to
quota.
2016-03-07 13:03:41 +01:00
k8s-merge-robot 8ab8231c20 Merge pull request #22577 from jpiccari/master
Auto commit by PR queue bot
2016-03-06 00:18:53 -08:00
Joshua Piccari f5f83b076a Improve go report card by fixing typos in comments 2016-03-04 18:30:59 -08:00
Janet Kuo 59b1f5b8b5 Log contents of pods on creation/update/deletion in controllers 2016-03-04 13:57:34 -08:00
Janet Kuo 48dc694ba6 Add more comments and rename getAllReplicaSets to getAllReplicaSetsAndSyncRevision 2016-03-02 17:51:35 -08:00
Janet Kuo e42eab59bc Add comments about deployment revision update 2016-03-02 11:19:48 -08:00