Commit Graph

84 Commits

Author SHA1 Message Date
waynepeking348
ab1be93809 clean rs by revision instead of creat timestamp 2020-12-20 17:05:42 +08:00
wawa0210
7d8aae51df
fix pkg/controller/deployment staticcheck 2020-06-23 19:32:20 +08:00
Lu Fengqi
0d04485a52 deployment: remove annotation for non-exist parameter 'podMap'
Since the parameter 'podMap' has been removed by commit 831a2d1129
("deployment: remove unused parameter 'podMap'"), the related annotation
also should be removed.

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
2020-05-26 16:49:52 +08:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Clayton Coleman
bd9260711f
deployment: Ignore namespace termination errors when creating replicasets
Instead of reporting an event or displaying an error, simply exit
when the namespace is being terminated. This reduces the amount of
controller churn on namespace shutdown. Unlike other controllers, we
drop the replica set create error very late (in the queue handleErr)
in order to avoid changing the structure of the controller
substantially.
2019-10-20 18:39:01 -04:00
Ted Yu
9418affa4d add comment on rev history length limit 2019-05-14 03:11:20 +08:00
Ted Yu
9546fd540e Impose length limit when concatenating revision history 2019-05-08 10:14:18 -07:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Weibin Lin
1f921760d6 Default extensions/v1beta1 Deployment's RevisionHistoryLimit to MaxInt32 2018-08-14 09:20:45 +08:00
Janet Kuo
a4f85c8dd0 Default extensions/v1beta1 Deployment's ProgressDeadlineSeconds to MaxInt32.
1. MaxInt32 has the same meaning as unset, for compatibility
2. Deployment controller treats MaxInt32 the same as unset (nil)
2018-07-27 10:10:30 -07:00
Janet Kuo
666a41c2ea Safe encode template hash value to make it consistent with resource name 2018-07-13 09:52:26 -07:00
zhangjie
831a2d1129 deployment: remove unused parameter 'podMap'
Signed-off-by: kadisi <iamkadisi@163.com>
2018-06-25 09:22:58 +08: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
hangaoshuai
1fa06a6bd4 fixtodo:rsDeepCopy only when sizeNeedsUpdate or annotationsNeedUpdate 2018-04-02 09:27:11 +08:00
Janet Kuo
647d8d8a22 Deployment to stop adding pod-template-hash labels/selector on adoption 2018-03-26 15:52:42 -07:00
Jun Xiang Tee
18289cc0df fix deployment's collision avoidance mechanism 2018-02-07 11:28:43 -08:00
supereagle
b694d51842 use versiond group clients from client-go 2017-11-07 14:47:22 +08: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
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
Kenneth Owens
313a8b304a Adds the rand.SafeEncodeString function and uses this function to
generate names for ReplicaSets and ControllerRevisions.
2017-08-30 14:01:11 -07:00
Dr. Stefan Schimanski
1d053c4f7c controllers: simplify deepcopy calls 2017-08-29 19:21:24 +02:00
Di Xu
85602fd542 CollisionCount should have type int32 across controllers that use it for collision avoidance 2017-08-18 10:48:12 +08:00
Mikhail Mazurskiy
042b5642b9
Migrate to NewControllerRef from meta/v1 package 2017-08-06 22:43:46 +10:00
Jacob Simpson
a765b8cfca Migrate api.Scheme to scheme.Scheme 2017-07-17 15:05:38 -07:00
Michail Kargakis
da1ff1c38e
controller: cleanup complete deployments only
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-07-11 19:20:14 +02:00
Chao Xu
31d0869f83 revert 45764 2017-06-25 21:41:10 -07:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Mayank Kumar
ff503dbc32 delete dependent pods for rs when deleting deployments 2017-06-14 12:52:02 -07:00
Janet Kuo
d02f40a5e7 Implement DaemonSet history logic in controller
1. Create controllerrevisions (history) and label pods with template
   hash for both RollingUpdate and OnDelete update strategy
2. Clean up old, non-live history based on revisionHistoryLimit
3. Remove duplicate controllerrevisions (the ones with the same template)
   and relabel their pods
4. Update RBAC to allow DaemonSet controller to manage
   controllerrevisions
5. In DaemonSet controller unit tests, create new pods with hash labels
2017-06-03 00:44:23 -07:00
Michail Kargakis
4a2c5eae92
Implement hash collision avoidance mechanism
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-05-25 11:17:45 +02:00
Kubernetes Submit Queue
79a2e359cd Merge pull request #44024 from zhangxiaoyu-zidif/egnew
Automatic merge from submit-queue

fix the typos of e.g.

fix the typos of e.g.


**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-05 23:41:33 -07:00
zhangxiaoyu-zidif
932ece5cfd e3d534b2c4 2017-04-04 14:16:34 +08:00
Michail Kargakis
97fed0aff4 Wait for clean old RSs statuses in the middle of Recreate rollouts 2017-04-02 20:06:25 +02:00
shiywang
49161d1b18 fix Scaled down deployments cannot identify old replica sets 2017-03-30 00:13:28 +08:00
better88
6c13a02026 Fix revision when SetDeploymentRevision 2017-03-17 23:23:41 +08:00
Anthony Yeh
d96c4847b6 Deployment: Filter Pods by Deployment selector in addition to ControllerRef.
Deployment should ignore Pods that don't match the selector, even if
they have a ControllerRef pointing to one of the ReplicaSets it owns.
The ReplicaSet itself will orphan the Pod as soon as it syncs.
2017-03-06 15:12:07 -08:00
Anthony Yeh
37534b66df Deployment: Always set BlockOwnerDeletion in ControllerRef. 2017-03-06 15:12:07 -08:00
Anthony Yeh
92d75cbb23 Deployment: Use ControllerRef to list controlled objects.
Although Deployment already applied its ControllerRef to adopt matching
ReplicaSets, it actually still used label selectors to list objects that
it controls. That meant it didn't actually follow the rules of
ControllerRef, so it could still fight with other controller types.

This should mean that the special handling for overlapping Deployments
is no longer necessary, since each Deployment will only see objects that
it owns (via ControllerRef).
2017-03-06 15:12:06 -08:00
Michail Kargakis
d70e63c231 controller: reduce log verbosity for deployments 2017-03-03 14:34:11 +01:00
Kubernetes Submit Queue
3f4ef9ae11 Merge pull request #41250 from kargakis/switch-get-from-cache
Automatic merge from submit-queue (batch tested with PRs 41621, 41946, 41941, 41250, 41729)

controller: poll replica sets from the cache
2017-02-26 06:47:00 -08:00
Janet Kuo
a265186aaa Deployment: filter out old RSes that are deleted or with non-zero replicas before cleanup 2017-02-16 14:48:10 -08:00
Michail Kargakis
7bbf7b0473 controller: poll replica sets from the cache 2017-02-10 17:46:42 +01:00
Michail Kargakis
97c9e7fe07 Do not cleanup replicasets already marked for deletion 2017-02-09 10:31:25 +01:00
Michail Kargakis
ff83eb58eb Add more logs during the cleanup phase of a deployment 2017-02-09 10:31:15 +01:00