Commit Graph

451 Commits (1c012f1c4966dfe6124192abafeba892ae9510a0)

Author SHA1 Message Date
zhangjie 831a2d1129 deployment: remove unused parameter 'podMap'
Signed-off-by: kadisi <iamkadisi@163.com>
2018-06-25 09:22:58 +08:00
Jeff Grafton 23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Mayank Kumar a1cd3a4bcc remove redundant getKey functions from tests 2018-05-30 22:15:06 -07:00
Anthony Yeh 436db71751
Set explicit labels/selector for apps/v1 Deployment/RS. 2018-05-22 13:43:07 -07:00
Anthony Yeh e32a15558b
Use apps/v1 in Deployment controller. 2018-05-22 13:42:10 -07:00
David Eads 94e3d94d67 update tests to be specific about the versions they are testing instead of floating 2018-05-01 13:18:41 -04:00
David Eads a89291a5de stop duplicating preferred version order 2018-04-26 10:03:36 -04:00
Janet Kuo 19b4fee95c Fix a bug in Deployment controller when comparing templates 2018-04-04 17:14:07 -07:00
Kubernetes Submit Queue 1102fd0dcb
Merge pull request #61981 from hanxiaoshuai/fixtodo0331
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fixtodo:rsDeepCopy only when sizeNeedsUpdate or annotationsNeedUpdate

**What this PR does / why we need it**:
```
// TODO: Do not mutate the replica set here, instead simply compare the annotation and if they mismatch
// call SetReplicasAnnotations inside the following if clause. Then we can also move the deep-copy from
// above inside the if too.
```
fixtodo:rsDeepCopy only when sizeNeedsUpdate or annotationsNeedUpdate
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-02 08:02:40 -07:00
hangaoshuai 808c39387f add unit test for new function AnnotationsNeedUpdate 2018-04-02 09:27:43 +08:00
hangaoshuai 1fa06a6bd4 fixtodo:rsDeepCopy only when sizeNeedsUpdate or annotationsNeedUpdate 2018-04-02 09:27:11 +08:00
Mikhail Mazurskiy 468655b76a
Use typed events client directly 2018-04-01 18:57:29 +10:00
Janet Kuo cda3f18b8c Remove unused Deployment util functions 2018-03-26 17:08:31 -07:00
Janet Kuo 647d8d8a22 Deployment to stop adding pod-template-hash labels/selector on adoption 2018-03-26 15:52:42 -07:00
Tomas Nozicka ffdd3b58e5 Add tests for Deployments Recreate strategy when there are pods in terminal state present 2018-02-24 14:29:56 +01:00
Tomas Nozicka 952e6c64b6 Fix Deployment with Recreate strategy not to wait on Pods in terminal phase 2018-02-24 14:29:53 +01:00
Jeff Grafton ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Jun Xiang Tee 18289cc0df fix deployment's collision avoidance mechanism 2018-02-07 11:28:43 -08:00
Fabian Ruff c0ced154eb
Fix UpdatePodWithRetries inline documentation 2018-01-19 12:57:24 +01:00
Kubernetes Submit Queue 2dc9b1822b
Merge pull request #56740 from dhilipkumars/UTImprove
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

[Deployments] Move some tests to use go sub-test

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-13 08:34:21 -08:00
zouyee ff380d67f4 remove deplicate func 2018-01-08 18:42:01 +08:00
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
dhilipkumars 623d7c42ac Move some tests to use go sub-test 2017-12-02 13:50:35 +05:30
Dr. Stefan Schimanski bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Kubernetes Submit Queue a701a42a82
Merge pull request #49763 from supereagle/versioned-group-clients
Automatic merge from submit-queue (batch tested with PRs 55331, 55272, 55228, 49763, 55242). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

use versiond group clients from client-go

**What this PR does / why we need it**:
Some **Deprecated** group clients are still used, replace them with versioned group clients.

**Which issue this PR fixes**: fixes #49760

**Special notes for your reviewer**:
/assign @caesarxuchao

**Release note**:
```release-note
NONE
```
2017-11-08 17:13:27 -08:00
Kubernetes Submit Queue 576c9118a6
Merge pull request #53592 from frodenas/bootstrap-controller
Automatic merge from submit-queue (batch tested with PRs 53592, 52562, 55175, 55213). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Check RegisterMetricAndTrackRateLimiterUsage error when starting BootstrapSigner & TokenCleaner controllers

**What this PR does / why we need it**:
Prevent `BootstrapSigner` and `TokenCleaner` controllers to start if `metrics.RegisterMetricAndTrackRateLimiterUsage` returns an error.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-07 11:21:15 -08:00
supereagle b694d51842 use versiond group clients from client-go 2017-11-07 14:47:22 +08:00
John Kelly cb98157834 pkg/controller/deployment: syncRolloutStatus additional unit test case
Added additional test case that exercises fix #53614 or npe when scaling --replicas=0
Moved creation of clientset and deployment controller objects inside test loop since it's mutated every time an API action happens.

Signed-off-by: John Kelly <jekohk@gmail.com>
2017-11-01 16:17:24 -04:00
John Kelly 9bf61e72b8 pkg/controller/deployment: unit tests for syncRolloutStatus
Created unit tests for syncRolloutStatus function in the deployment package.
Tests for syncRolloutStatus have brought the overall test coverage of deployment/progress to 82.1%.

Signed-off-by: John Kelly <jekohk@gmail.com>
2017-11-01 16:17:24 -04:00
Ferran Rodenas d67898b875 Check RegisterMetricAndTrackRateLimiterUsage error when starting controllers
Signed-off-by: Ferran Rodenas <rodenasf@vmware.com>
2017-11-01 12:46:07 +01:00
Kevin 4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00
Kubernetes Submit Queue 2d914ee703 Merge pull request #53984 from sttts/sttts-legacyscheme
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

pkg/api: extract Scheme/Registry/Codecs into pkg/api/legacyscheme

This serves as

- a preparation for the pkg/api->pkg/apis/core move
- and makes the dependency to the scheme explicit when vizualizing
  left depenncies.

The later helps with our our efforts to split up the monolithic repo
into self-contained sub-repos, e.g. for kubectl, controller-manager
and kube-apiserver in the future.
2017-10-18 10:49:10 -07:00
Dr. Stefan Schimanski cad0364e73 Update bazel 2017-10-18 17:24:04 +02:00
Dr. Stefan Schimanski 7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
Kubernetes Submit Queue 1d8f1e268f Merge pull request #47699 from supereagle/fix-typos
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix typos: remove duplicated word in comments

**What this PR does / why we need it**: Remove the duplicated word `the` in comments

**Which issue this PR fixes** : fixes #

**Special notes for your reviewer**:

```release-note
NONE
```
2017-10-17 02:35:52 -07:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Kubernetes Submit Queue 3aff54f345 Merge pull request #53589 from sttts/sttts-pkg-api-testing
Automatic merge from submit-queue (batch tested with PRs 53204, 53364, 53559, 53589, 53088). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

pkg/api: move *_test.go -> pkg/api/testing

Cleaning up pkg/api, one little step towards pkg/apis/core.
2017-10-11 15:14:45 -07:00
Dr. Stefan Schimanski 9488150762 SimpleNameGenerator: unify to use k8s.io/apiserver/pkg/storage/names 2017-10-11 16:05:52 +02:00
Davanum Srinivas 5690ba6241 Fix potential problem when scaling --replicas=0
We have defensive code for checking if newRS != nil for
DeploymentProgressing and DeploymentTimedOut but not for
DeploymentComplete. Let's add the check here as well as
this problem was seen in the wild.
2017-10-09 17:39:51 -04:00
Kubernetes Submit Queue 566364da49 Merge pull request #52951 from kargakis/remove-dead-code
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Simplify some deployment utilities

Sponsored by the recent refactoring that removed errors
from deep copies.

Signed-off-by: Michalis Kargakis <mkargaki@redhat.com>
2017-10-03 08:11:04 -07:00
Kubernetes Submit Queue 5f8726e427 Merge pull request #52886 from surajnarwade/remove-unused
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Cleaning up unused functions in /pkg/controller/deployment/util
2017-09-24 06:19:55 -07:00
Michalis Kargakis 086ab4291a
Simplify some deployment utilities
Sponsored by the recent refactoring that removed errors
from deep copies.

Signed-off-by: Michalis Kargakis <mkargaki@redhat.com>
2017-09-23 22:31:05 +02:00
Kubernetes Submit Queue 446daf02a5 Merge pull request #52240 from mattjmcnaughton/mattjmcnaughton/do-not-import-apimachinery-from-staging
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Modify `apimachinery` imports using `staging`

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

Currently some of the imports of `apimachinery` use
`k8s.io/kubernetes/staging/src/k8s.io/apimachinery...`. Replace
these with `k8s.io/apimachinery`, as is in use throughout the rest
of the code base.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>

**Release note**:
```release-note
NONE
```
2017-09-23 09:08:26 -07:00
Suraj Narwade 0082bd0061 Cleaning up unused functions in /pkg/controller/deployment/util 2017-09-23 15:55:22 +05:30
Kubernetes Submit Queue ec382f3511 Merge pull request #50989 from wgliang/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

should use time.Since instead of time.Now().Sub

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

should use time.Since instead of time.Now().Sub

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
NONE
**Special notes for your reviewer**:
NONE
**Release note**:

```release-note
```
NONE
2017-09-23 00:24:35 -07:00
Michail Kargakis a702742d31
Remove kargakis from OWNERS, add tnozicka
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-09-19 11:05:23 +02:00
supereagle 87c29a08e1 fix typos: remove duplicated word in comments 2017-09-16 14:38:10 +08:00
mattjmcnaughton 8323fb4b4f Modify `apimachinery` imports using `staging`
Currently some of the imports of `apimachinery` use
`k8s.io/kubernetes/staging/src/k8s.io/apimachinery...`. Replace
these with `k8s.io/apimachinery`, as is in use throughout the rest
of the code base.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>
2017-09-10 10:19:30 -04:00
Michail Kargakis af0f5dcc88
Fix deployment timeout reporting
If the previous condition has been a successful rollout then we
shouldn't try to estimate any progress. Scenario:

* progressDeadlineSeconds is smaller than the difference between
  now and the time the last rollout finished in the past.
* the creation of a new ReplicaSet triggers a resync of the
  Deployment prior to the cached copy of the Deployment getting
  updated with the status.condition that indicates the creation
   of the new ReplicaSet.

The Deployment will be resynced and eventually its Progressing
condition will catch up with the state of the world.

Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-09-08 17:48:46 +02:00