Commit Graph

74 Commits (88fb149cf5647db8649ab9a60e81bb719d41d496)

Author SHA1 Message Date
deads2k 519c13745f convert rest of kubectl to generated clients 2016-09-12 08:22:34 -04:00
deads2k f756e43e7f convert rolling updater to generated client 2016-09-12 07:38:34 -04:00
Jedrzej Nowak 9e2abd4b02 Fix various typos in pgk/cloudprovider,dns,kubectl 2016-08-31 18:56:52 +02:00
Michail Kargakis 4c56b8cfc5 kubectl: cast notFound error to struct 2016-08-25 10:40:44 +02:00
bprashanth 05aa040b0f Allow changes to container image for updates 2016-08-18 16:33:51 -07:00
bprashanth 30f3cb9d26 Scaler and reaper for petset 2016-08-17 17:37:56 -07:00
Chao Xu bcc1b68d47 let kubectl delete rc and rs using explicit non-orphan delete options 2016-08-11 11:30:26 -07:00
Kubernetes Submit Queue e7d01097dc Merge pull request #29971 from caesarxuchao/fix-kubectl-rolling-update-with-gc
Automatic merge from submit-queue

[GarbageCollector] Fix kubectl rolling-update to work with GC

This changes the order of the [Rename()](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/rolling_updater.go#L532) function. After the change, Rename() first deletes the old RC and orphans its pods, then creates the new RC, which will then have a chance to adopt the orphaned pods.

This also fixes the "should support rolling-update to same image" [test](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/kubectl.go#L915) when the garbage collector is on.

Here is the detailed explanation on why the test would have failed:
`kubectl rolling-update` will [rename](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/rolling_updater.go#L532-L546) the RC. It first creates the an identical RC (including spec.selectors) with the new name, then it deletes the existing RC. When GC is turned on, the newly created RC cannot adopt the existing pod, because it has a controllerRef pointing to the exising RC, so the new RC will create new pods and expect to see the creation. However, the new RC and the old RC have the same selector, so sometimes the old RC, instead of the new RC, has its [expectation lowered](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/replication/replication_controller.go#L346-L362), the new RC's expectation will stuck forever. The e2e test then times out when executing `kubectl delete newRC`, because there is the new RC will not scale down as its expectation is not fulfilled.

A side-note, we should fix [rm.getPodController()](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/replication/replication_controller.go#L346) to respect pod's controllerref, that will prevent similar bugs.

Also note that an old version `kubectl rolling-update` will not work with the GC. We cannot fix that.
2016-08-04 20:48:10 -07:00
Chao Xu 96c84303bd fix kubectl rolling-update when GC is enabled 2016-08-03 15:57:03 -07:00
Kubernetes Submit Queue 207e8836c0 Merge pull request #29921 from andreykurilin/kubectl_typos
Automatic merge from submit-queue

Fix various typos in kubectl
2016-08-03 13:43:32 -07:00
Kubernetes Submit Queue 1ac1865dd7 Merge pull request #29484 from kargakis/fix-scaler-error
Automatic merge from submit-queue

kubectl: notfound errors should not error out

Fixes the flake in https://github.com/kubernetes/kubernetes/issues/28378#issuecomment-234677846

@pwittrock ptal
2016-08-03 03:13:19 -07:00
Andrey Kurilin 91cace347d Fix various typos in kubectl 2016-08-02 19:51:51 +03:00
Harry Zhang c495397cae Refactor uuid into its own pkg 2016-07-30 00:07:02 -04:00
Michail Kargakis 36522378f4 kubectl: notfound errors should not error out 2016-07-24 12:46:38 +02:00
Michal Fojtik 3095437300 Retry updating deployment only on update conflict error 2016-07-19 13:01:06 +02:00
Angus Salkeld eec08872c7 Move deployment utilities to there own package 2016-07-08 09:46:56 +02:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Michail Kargakis 748c71f3eb kubectl: cast scale errors to actual errors when deleting 2016-05-26 10:33:52 +02:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Maciej Szulik a3b4447305 Move internal types of job from pkg/apis/extensions to pkg/apis/batch 2016-04-25 11:03:54 +02:00
Chao Xu 3efd3c62e6 Replace ineffective DeleteOptions with nil 2016-02-24 15:06:24 -08:00
Brian Grant 0b5edab208 Merge pull request #21857 from nikhiljindal/stopDeployment
fix deployment e2e flake: Update DeploymentReaper.Stop to use ObservedGeneration
2016-02-24 14:26:23 -08:00
Brian Grant b5c6341ec9 Merge pull request #21435 from janetkuo/use-intptr
Use IntPtr
2016-02-24 13:54:21 -08:00
nikhiljindal 2a538e317f Moving deployment deletion at the end 2016-02-24 13:00:45 -08:00
nikhiljindal 7e50fa6df0 Update DeploymentReaper.Stop to use ObservedGeneration to remove race condition 2016-02-24 00:09:44 -08:00
k8s-merge-robot aee2eb3977 Merge pull request #21434 from erictune/job-ga
Auto commit by PR queue bot
2016-02-22 00:12:54 -08:00
Janet Kuo 3a3ebf68f0 Retry Update in DeploymentReaper.Stop 2016-02-19 11:31:41 -08:00
Eric Tune b4d454e9d5 Autogenerate. 2016-02-19 09:48:03 -08:00
Eric Tune bcdbd1c709 Fix Job Reaping
Ensure batch.Kind("Job") has a reaper, so that pods are not orphaned.
Check for orphaned pods in test-cmd.sh.
Also provide describer and scaler for batch.Kind("Job").
The scaler, reaper, and describer for extensions can
be reused for batch.
2016-02-19 09:22:05 -08:00
Janet Kuo 1a5dd9f14f Use IntPtr 2016-02-17 15:08:50 -08:00
Janet Kuo 92eb075a2b When reaping deployments, retry deployment Update 2016-02-16 15:12:38 -08:00
Maciej Szulik 0ea31b56ed Adding reaper for deployments 2016-02-11 19:02:32 +01:00
Madhusudan.C.S 4f9b8b2bfc Link all the ReplicaSet controller boilerplate together.
1. Enable replica set in controller manager.
2. Enable replica set etcd storage in master package.
3. Add replica set support to kubectl commands.
2016-02-05 21:05:10 -08:00
Eric Tune 6133cb1f21 Move extensions.LabelSelector to unversioned.
Move type LabelSelector and type LabelSelectorRequirement from pkg/apis/extensions
This avoids an import loop when Job (and later DaemonSet, Deployment, ReplicaSet)
are moved out of extensions to new api groups.

Also Move LabelSelectorAsSelector utility from pkg/apis/extensions/ to pkg/api/unversioned/
Also its test.
Also LabelSelectorOp* constants.
Also the pkg/apis/extensions/validation functions ValidateLabelSelectorRequirement and
ValidateLabelSelector move to pkg/api/unversioned

The related type in pkg/apis/extensions/v1beta1/ is staying there.  I might move
it in another PR if neccessary.
2016-02-04 13:46:34 -08:00
Zach Loafman 62726c4ab8 Revert "kubectl: Make scaling smarter" 2016-01-22 14:52:38 -08:00
Michail Kargakis e894dcc8ff kubectl: Make scaling smarter
Skip updating resources that already meet the desired replica count.
This change has an impact in both kubectl scale and kubectl delete in
that reapable resources that already have the desired replicas (number
provided via --replicas for scale, or zero for delete) won't be updated
again and a "already scaled" message will be printed (in case of scale).
2015-12-21 10:07:21 +01:00
Janet Kuo 7a4643f123 When reaping jobs, ignores its pod not found error 2015-12-17 18:57:22 -08:00
Clayton Coleman 8f203a28f1 Change runtime.Object signature 2015-12-15 13:36:25 -05:00
Wojciech Tyczynski 960808bf08 Switch to versioned ListOptions in client. 2015-12-14 14:26:09 +01:00
Salvatore Dario Minonne 80575c3093 renaming PodSelector to LabelSelector 2015-12-04 09:49:08 +01:00
Wojciech Tyczynski 6dcb689d4e Simplify List() signature in clients. 2015-12-03 09:54:07 +01:00
Wojciech Tyczynski 8343c8ce6c Pass ListOptions to List() methods. 2015-12-01 15:00:36 +01:00
deads2k 1ac6d8afd3 update reaper, scaler, describer for GroupKind 2015-11-30 09:22:39 -05:00
Maciej Szulik 64f778804d Remove string from Reaper.Stop signature 2015-11-17 12:09:08 +01:00
Maciej Szulik e662b34ccd Remove dead pods upon stopping a job 2015-10-29 17:56:01 +01:00
Wojciech Tyczynski 647aa1bc8c Unify per-resource List for unversioned client 2015-10-14 08:37:57 +02:00
Chao Xu 493d2b6920 grep sed Experimental() 2015-10-13 13:22:54 -07:00
Mike Danese 6fe7edc5ea simplify DaemonReaper by using NodeSelector 2015-10-09 08:17:49 -07:00
Mike Danese 334b551166 use unconditional update and check error of update in DaemonSet reaper 2015-10-05 14:15:19 -07:00
Maciej Szulik 48775319d9 Reaper and scaler for jobs 2015-09-23 13:06:34 +02:00