-
Notifications
You must be signed in to change notification settings - Fork 82
Fix OADP 526 #704
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
Fix OADP 526 #704
Conversation
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.
It'd be nice to have a test for invalid resource inputs. Otherwise looks great. Thanks for quick turnaround!
ResourcesReqs.Requests[corev1.ResourceMemory] = resource.MustParse(dpa.Spec.Configuration.Restic.PodConfig.ResourceAllocations.Requests.Memory().String()) | ||
// Set custom limits and requests values if defined on Restic Spec | ||
if dpa.Spec.Configuration.Restic.PodConfig.ResourceAllocations.Requests.Cpu() != nil && dpa.Spec.Configuration.Restic.PodConfig.ResourceAllocations.Requests.Cpu().Value() != 0 { | ||
parsedQuantity, err := resource.ParseQuantity(dpa.Spec.Configuration.Restic.PodConfig.ResourceAllocations.Requests.Cpu().String()) |
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.
+1 to using ParseQuantity()
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.
+1
I just realized that since resource is a typed field. Validation on the CR itself will kick in and prevent users from putting stupid values. @shubham-pampattiwar approving |
/retest |
1 similar comment
/retest |
@shubham-pampattiwar: all tests passed! Full PR test history. Your PR dashboard. 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/test-infra repository. I understand the commands that are listed here. |
From OADP-526 Fix version says 1.0.3 |
@kaovilai: new pull request created: #712 In response to this:
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/test-infra repository. |
* fix OADP 526 * add ignore err comments
…p (fix azure flakes) (#717) * revert to b64e96e * bump probe to 10s * mimic velero cli loglevel options (#692) use logrus ParseLevel directly * Fix OADP 526 (#704) * fix OADP 526 * add ignore err comments * fix docs link for build from src (#706) * Datamover CRD design (#597) * Adding initial datamover design * Typo in reviewers * Add summary & user stories * Fixing nits * Adding intial feedback * Adding feedback * nit: changing the selector field name * Adding review comments * Adding plugin clarification * updating image to reflect the latest design * Reflect recent velero csi plugin changes * use a full vm for arm builds in travis (#713) * OADP-535 allow for nullable resource allocations (#711) * OADP-535 allow for nullable resource allocations * Add missing nullables * Include nullable on additionalProperties Co-authored-by: Shubham Pampattiwar <[email protected]> Co-authored-by: Savitha Raghunathan <[email protected]> Co-authored-by: Jason Montleon <[email protected]> Co-authored-by: Dylan Murray <[email protected]>
Fixes https://issues.redhat.com/browse/OADP-526