Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure deployments to have no own revisionHistoryLimit #15698

Merged

Conversation

SaschaSchwarze0
Copy link
Contributor

Proposed Changes

Continuation of #15640

The revision history limit of a deployment are its replicasets. As Knative has its own concept of revisions and the way a deployment looks like for revision is defined by the revision, there is no reason to maintain a history of replicasets. Multiple replicasets can exist if Knative configuration is updated (config-deployment) or if Knative itself is updated (and the queue-proxy image changes). Having no revisionHistoryLimit on the Deployment saves a lot of space in the Kubernetes database.

This PR changes the deployments that Knative creates to always have revisionHistoryLimit set to 0.

Release Note

Kubernetes Deployments created for a Knative Revision are not configured with revisionHistoryLimit=0 which saves a lot of space in your Kubernetes database if you have a lot of Knative Services that are not updated while you regularly update Knative itself and pick up new queue-proxy images.

@knative-prow knative-prow bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 16, 2025
Copy link

knative-prow bot commented Jan 16, 2025

Hi @SaschaSchwarze0. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

The revision history limit of a deployment are its replicasets. As Knative has its own concept of revisions and the way a deployment looks like for revision is defined by the revision, there is no reason to maintain a history of replicasets. Multiple replicasets can exist if Knative configuration is updated (config-deployment) or if Knative itself is updated (and the queue-proxy image changes). Having no revisionHistoryLimit on the Deployment saves a lot of space in the Kubernetes database.

Co-authored-by: Subhasree Das <[email protected]>
Signed-off-by: Sascha Schwarze <[email protected]>
@SaschaSchwarze0 SaschaSchwarze0 force-pushed the sascha-revision-history-limit-0 branch from c408385 to 280b048 Compare January 16, 2025 08:19
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.83%. Comparing base (c3f2bfe) to head (280b048).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15698      +/-   ##
==========================================
+ Coverage   80.76%   80.83%   +0.06%     
==========================================
  Files         222      222              
  Lines       18025    18026       +1     
==========================================
+ Hits        14558    14571      +13     
+ Misses       3094     3084      -10     
+ Partials      373      371       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dprotaso
Copy link
Member

/lgtm
/approve

@SaschaSchwarze0 thanks for the quick turn around

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jan 16, 2025
Copy link

knative-prow bot commented Jan 16, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, SaschaSchwarze0

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 16, 2025
@dprotaso
Copy link
Member

/ok-to-test

@knative-prow knative-prow bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 16, 2025
@dprotaso dprotaso added this to the v1.17.0 milestone Jan 16, 2025
@knative-prow knative-prow bot merged commit bee28f3 into knative:main Jan 16, 2025
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants