-
Notifications
You must be signed in to change notification settings - Fork 40
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
Pagination & Launch config deletion #115
Pagination & Launch config deletion #115
Conversation
Codecov Report
@@ Coverage Diff @@
## master #115 +/- ##
==========================================
- Coverage 86.93% 86.56% -0.37%
==========================================
Files 10 10
Lines 995 1020 +25
==========================================
+ Hits 865 883 +18
- Misses 94 98 +4
- Partials 36 39 +3
Continue to review full report at Codecov.
|
@@ -26,7 +27,8 @@ import ( | |||
) | |||
|
|||
const ( | |||
ProvisionerName = "eks" | |||
ProvisionerName = "eks" | |||
defaultLaunchConfigurationRetention = 2 |
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.
In a separate PR, we might want to make it configurable (or at least have some annotation that can override this).
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.
Yes, I was trying to come up with a way to not add this to the CR, but using a controller flag also doesnt make much sense, because not all provisioners care about launch configurations (e.g. eks-managed).
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.
Annotation is a good idea!
* fix deletions & add pagination * Update cloud.go * Update delete.go * fix test * tidy * Update update.go * Update update.go * get input inside create launch config
Fixes #114
This adds pagination for DescribeLaunchConfigurations and refactors create/update/delete to properly handle launch configuration deletion.
New logic will be called on CloudDiscovery instead of during update, and will delete the oldest launch configurations per instance group outside of the newest ones according to number of default retention (default 2) - we can make this configurable in the future.
IG Deletion now simply deletes all launch configs with the resource prefix.