Skip to content

Commit 47d2a6d

Browse files
authored
Merge pull request #49854 from adriananeci/enhance_revisionHistoryLimit
Add note about deployment cleanup policy
2 parents 0b64484 + faaae90 commit 47d2a6d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

content/en/docs/concepts/workloads/controllers/deployment.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,6 +1079,16 @@ Explicitly setting this field to 0, will result in cleaning up all the history o
10791079
thus that Deployment will not be able to roll back.
10801080
{{< /note >}}
10811081

1082+
The cleanup only starts **after** a Deployment reaches a
1083+
[complete state](/docs/concepts/workloads/controllers/deployment/#complete-deployment).
1084+
If you set `.spec.revisionHistoryLimit` to 0, any rollout nonetheless triggers creation of a new
1085+
ReplicaSet before Kubernetes removes the old one.
1086+
1087+
Even with a non-zero revision history limit, you can have more ReplicaSets than the limit
1088+
you configure. For example, if pods are crash looping, and there are multiple rolling updates
1089+
events triggered over time, you might end up with more ReplicaSets than the
1090+
`.spec.revisionHistoryLimit` because the Deployment never reaches a complete state.
1091+
10821092
## Canary Deployment
10831093

10841094
If you want to roll out releases to a subset of users or servers using the Deployment, you

0 commit comments

Comments
 (0)