Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

add revisions garbage collection mechanism #159

Merged
merged 2 commits into from
Aug 25, 2020

Conversation

erdun
Copy link
Contributor

@erdun erdun commented Aug 2, 2020

  1. add revisions garbage collection mechanism, default revision limit is 50.
  2. revision in use won't be deleted

@erdun erdun force-pushed the revision branch 2 times, most recently from 72bc7bf to ace7cd5 Compare August 3, 2020 02:03
Copy link
Member

@wonderflow wonderflow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds a mechanism about auto deleting ControllerRevision, it deserves us to add some documentation for it as users will care about this mechanism. Please add one, thanks!

pkg/controller/controller.go Outdated Show resolved Hide resolved
Signed-off-by: erdun <[email protected]>
Copy link
Member

@wonderflow wonderflow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, ping @ryanzhang-oss

@wonderflow wonderflow changed the title delete revisions add revisions garbage collection mechanism Aug 24, 2020
@Diddaa
Copy link
Contributor

Diddaa commented Aug 24, 2020

LGTM

}
}

toKeep := revisionLimit + len(liveHashes)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is toKeep used other than immediately below?

continue
}
// Clean up
revisionToClean := revision
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, why creating another variable?

@ryanzhang-oss ryanzhang-oss merged commit bc0db9f into crossplane:master Aug 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants