Commit Graph

74 Commits (e5eb6a21b13217d35878003b18bc5c25c8adbda8)

Author SHA1 Message Date
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
Clayton Coleman 469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
Michail Kargakis d5227e364d controller: decouple cleanup policy from deployment strategies
Deployments get cleaned up only when they are paused, they get scaled up/down,
or when the strategy that drives rollouts completes. This means that stuck
deployments that fall into none of the above categories will not get cleaned
up. Since cleanup is already safe by itself (we only delete old replica sets
that are synced by the replica set controller and have no replicas) we can
execute it for every deployment when there is no intention to rollback.
2017-01-19 10:33:24 +01:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deads2k 77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
Michail Kargakis 6013186ac3 Update deployment equality helper 2017-01-11 18:34:12 +01:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Michail Kargakis ce04ee6170 extensions: add readyReplicas in Deployments 2017-01-02 11:59:15 +01:00
Mayank Kumar 777977612b ReplicaSet has owner ref of the Deployment that created it 2016-12-22 16:45:50 -08:00
Michail Kargakis 7ef3e6f7c9 controller: wait for all pods to be deleted before Recreating 2016-12-15 19:55:18 +01:00
Kubernetes Submit Queue 83a77fa5a1 Merge pull request #38299 from kargakis/calculate-unavailable-correctly
Automatic merge from submit-queue (batch tested with PRs 38608, 38299)

controller: set unavailableReplicas correctly when scaling down

```
deployment_controller.go:299] Error syncing deployment
e2e-tests-kubectl-2l7xx/e2e-test-nginx-deployment:
Deployment.extensions "e2e-test-nginx-deployment" is invalid:
status.unavailableReplicas: Invalid value: -1:
must be greater than or equal to 0
```

The validation error above occurs usually when a Deployment is
scaled down. In such a case we should default unavailableReplicas
to 0 instead of making an invalid api call.

@kubernetes/deployment
2016-12-12 04:18:04 -08:00