-
Notifications
You must be signed in to change notification settings - Fork 69
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
feat(rule): Adding a general tag rule #233
Conversation
Nice ! , do you think adding a |
swabbie-aws/src/main/kotlin/com/netflix/spinnaker/swabbie/aws/TemporalThresholdRule.kt
Outdated
Show resolved
Hide resolved
...aws/src/main/kotlin/com/netflix/spinnaker/swabbie/aws/exclusions/AmazonTagExclusionPolicy.kt
Show resolved
Hide resolved
swabbie-core/src/main/kotlin/com/netflix/spinnaker/config/SwabbieProperties.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks great to me. My one request always is to include more verbose class comments that explain how to use something or give an example (I've added one comment in the specific area on this PR).
For things that are exposed via config, I find it super helpful to have an example in the class comments for when I'm trying to easily understand how to enable a feature. I think this is arguably worse than actual documentation, but it is easy and more likely to get changed as functionality changes 😆
swabbie-aws/src/test/java/com/netflix/spinnaker/swabbie/aws/TemporalThresholdRuleTest.kt
Outdated
Show resolved
Hide resolved
|
143c25c
to
1d46fcc
Compare
Keeping it simple. |
cd10a63
to
9fbeeeb
Compare
- will match defined tag values in config to the ones on the resource - if matched and calculated age is older than today, the resource is marked
- make tags a distinct object on the resource for convenience - temporal tags are managed internally - fix a bug on ttl calculation
- renamed TemporalThresholdRule to ExpiredResourceRule - Updated to use a clock to determine if resource is expired - clean up test
9fbeeeb
to
e506ffd
Compare
ExpiredResourceRule
to apply to resources that are tagged with a ttl.