Commit Graph

97 Commits

Author SHA1 Message Date
Yang Li
3d0c961d57 Fix some golint errors for packages in pkg/kubectl
- Fix some golint errors for `pkg/kubectl`
- Fix a golint error for `pkg/kubectl/apps`
- Fix all golint errors for `pkg/kubectl/cmd`
- Fix some golint errors for `pkg/kubectl/generate/versioned`
- Fix a golint error for `pkg/kubectl/generate`
- Fix some golint errors for `pkg/kubectl/metricsutil`
- Fix all golint errors for `pkg/kubectl/util`
- Fix all golint errors for `pkg/kubectl/util/slice`
2018-11-02 11:55:40 +08:00
Sean Sullivan
ffd4ea963d kubectl: copy deployment util dependency into kubectl 2018-10-18 12:02:39 -07:00
Sean Sullivan
5f8f607c27 kubectl: copy pod utils into util/podutils package 2018-10-11 10:49:52 -07:00
David Eads
029b4388fe switching rolling update to external clients 2018-08-03 13:18:14 -04:00
Nail Islamov
3b5afd8809
Use DeleteOptions.PropagationPolicy instead of OrphanDependents (deprecated) in kubectl 2018-05-23 16:59:53 +10:00
p0lyn0mial
3b00b4a86f removes job scaler 2018-04-04 08:23:21 -04:00
p0lyn0mial
1f1d24005a removes custom scalers from kubectl 2018-03-26 19:33:42 +02:00
Maciej Szulik
5d721bff81
Remove pkg/client/unversioned 2018-02-21 13:08:11 +01:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski
d13b936a2a pkg/apis/core: fixup conversion func names in dependencies 2017-11-09 12:14:07 +01:00
tcharding
63ffb1995b kubectl: Move utility functions to util package
`parseFileSource()` and `parseLiteralSource()` are utility functions.
We have a package already for utility functions, `kubectl/util/`.

Move utility functions to `kubectl/util`, capitalize function names to
export from package.
2017-09-04 20:14:16 +10:00
Dr. Stefan Schimanski
c0dbe9a900 kubectl: simplify deepcopy calls 2017-08-16 10:58:51 +02:00
ymqytw
7500b55ce4 move retry to client-go 2017-08-14 14:16:26 -07:00
Kubernetes Submit Queue
6aeb790582 Merge pull request #49830 from jianglingxia/jlx72916
Automatic merge from submit-queue (batch tested with PRs 50418, 49830, 49206, 49061, 49912)

Renamed packge name to apiv1

**What this PR does / why we need it**:
Renamed packge name from k8s_api_v1 to apiv1
**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-08-09 22:07:15 -07:00
Lars Lehtonen
aa76cc8d7b
fix swallowed error in kubectl rolling_updater 2017-07-29 16:45:34 -07:00
jianglingxia
9e8d4b4188 Renamed packge name to apiv1 2017-07-29 16:47:14 +08:00
Alexander Campbell
ef9ae61240 kubectl: simplify code with help of linter 2017-06-23 09:49:30 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Kubernetes Submit Queue
49b0fe17c9 Merge pull request #45335 from zhangxiaoyu-zidif/fix-goerrors-new
Automatic merge from submit-queue (batch tested with PRs 45488, 45335, 45909, 46074, 46615)

fmt.Errorf replaces errors

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

fmt.Errorf replaces errors
importing errors is redundant.

**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-30 03:46:57 -07:00
Jeffrey Regan
5a9b06b717 **What this PR does / why we need it**:
Remove kubectl's dependence on pkg/api/helper, as part of
broader effort to isolate kubectl from the rest of k8s.
In this case, the code becomes private to kubectl; nobody else uses it.

**Which issue this PR fixes**

Part of a series of PRs to address kubernetes/community#598

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-05-21 20:44:21 -07:00
zhangxiaoyu-zidif
276a272a91 fmt.Errorf replaces errors 2017-05-09 06:26:45 +08:00
Chao Xu
4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00
Chao Xu
08aa712a6c move helpers.go to helper 2017-04-11 15:49:11 -07:00
Michail Kargakis
fe137a8123 Remove redundant pod helper 2017-02-10 17:58:59 +01:00
deads2k
c9a008dff3 move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
Clayton Coleman
be6d2933df
refactor: Move *Options references to metav1 2017-01-24 13:41:51 -05:00
deads2k
5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
Clayton Coleman
469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
deads2k
c47717134b move utils used in restclient to client-go 2017-01-19 07:55:14 -05:00
deads2k
77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Michail Kargakis
3ee150fcc0 kubectl: ignore deleted pods in the rolling updater 2016-12-22 14:26:17 +01:00
Wojciech Tyczynski
e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01:00
Kubernetes Submit Queue
b650149ee1 Merge pull request #37096 from andor-pierdelacabeza/patch-1
Automatic merge from submit-queue (batch tested with PRs 38260, 32811, 28458, 33570, 37096)

Fix renaming order shown on terminal
2016-12-08 02:11:26 -08:00
Clayton Coleman
3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Chao Xu
96cd71d8f6 kubectl 2016-11-23 15:53:09 -08:00
Alvaro [Andor]
f2fcf659fc Fix renaming order shown on terminal
When finishing a rolling update, a message is shown :
'Renaming oldRc to newRc'
In my case that'd be:
'Renaming nginx to nginx-df8d9fafc5007d83968cd37c8353d52e'
That naming order is incorrect, as the new name is temporary, and the final name should be the old one
2016-11-18 16:17:25 +01: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
Chao Xu
fbd187af45 move the retry util out of pkg/client/unversioned 2016-10-13 16:10:24 -07:00
deads2k
f756e43e7f convert rolling updater to generated client 2016-09-12 07:38:34 -04:00
lixiaobing10051267
849a8df35d make correction to two variables in inverse order 2016-08-05 16:17:01 +08: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
Andrey Kurilin
91cace347d Fix various typos in kubectl 2016-08-02 19:51:51 +03:00
Angus Salkeld
eec08872c7 Move deployment utilities to there own package 2016-07-08 09:46:56 +02:00
k8s-merge-robot
3166f9316f Merge pull request #28111 from mfojtik/min-ready-seconds
Automatic merge from submit-queue

Add MinReadySeconds to rolling updater

Add MinReadySeconds support to RollingUpdater that allows to specify the number of seconds to wait on top of the pod is "ready" because its readiness probe passed.
2016-07-01 19:21:16 -07:00
Michal Fojtik
7ea28e42c0 Add MinReadySeconds to rolling updater 2016-06-30 13:13:08 +02:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Janet Kuo
ee81e5ebfa Retry Pod/RC updates in kubectl rolling-update 2016-06-21 16:08:10 -07:00