-
Notifications
You must be signed in to change notification settings - Fork 14
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
Disk storage #96
Disk storage #96
Conversation
@@ -317,18 +321,3 @@ func (s *LimitadorStatus) Equals(other *LimitadorStatus, logger logr.Logger) boo | |||
func init() { | |||
SchemeBuilder.Register(&Limitador{}, &LimitadorList{}) | |||
} | |||
|
|||
type PodDisruptionBudgetType struct { |
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.
moving this type to have func init() {
as the last function in the file. Just personal taste.
@@ -248,16 +268,6 @@ func (r *LimitadorReconciler) reconcileLimitsConfigMap(ctx context.Context, limi | |||
return nil | |||
} | |||
|
|||
// SetupWithManager sets up the controller with the Manager. | |||
func (r *LimitadorReconciler) SetupWithManager(mgr ctrl.Manager) error { |
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.
moving this function to the end of the file. Just personal taste.
Codecov Report
@@ Coverage Diff @@
## main #96 +/- ##
===========================================
+ Coverage 53.97% 68.80% +14.82%
===========================================
Files 12 14 +2
Lines 867 984 +117
===========================================
+ Hits 468 677 +209
+ Misses 363 267 -96
- Partials 36 40 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
a50bcb6
to
1eca019
Compare
b5ba1ee
to
89fb4b6
Compare
ready for review @Kuadrant/engineering |
PVC *PVCGenericSpec `json:"persistentVolumeClaim,omitempty"` | ||
|
||
// +optional | ||
Optimize *DiskOptimizeType `json:"optimize,omitempty"` |
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.
maybe we can add
// +kubebuilder:default=throughput
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.
I would rather rely on Limitador's own defaults. If optimize is not set in the CR, it would not go in the command line and defaults would be applied by Limitador, not Limitador Operator.
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.
Took me a little while to go through all the changes here but I've run through the verification and the code. I think it looks good from my side but perhaps you'd prefer a second review. Either way I'll leave my approve, nice job!
Thanks @adam-cattermole Sorry for the "too big" PR. I refactored the options to have a cleaner deployment objects. I think that the outcome is a better code to extend and maintain. There is no rush. Let's wait for the review from @didierofrivia |
…ymentvolumemounts test
rebased to fix merge conflicts (in the CSV) |
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.
Great work! I've also tried it with optimize: throughput
and the command sent to the limitador container was as expected. Also, the validation works when a different value than thoughput
or disk
is set. 🥇
What
Deploy limitador with disk (persistent) storage.
Simplest deployment option for disk storage
TODO:
Verification Steps
Simplest deployment
dev setup
Deploy the limitador CR with storage set to
disk
Check deployment is correct
Should return
Check command line
should look like this
By default,
1Gi
persistent volume is booked for limitadorShould get