-
Notifications
You must be signed in to change notification settings - Fork 13
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] Make sure the ERS only handles defaulted EDS CR #71
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.
This pull request contains a valid label.
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.
This pull request contains a valid label.
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.
This pull request contains a valid label.
if dd.Spec.Strategy.ReconcileFrequency == nil { | ||
return false | ||
} |
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.
This is duplicated (see below in this function)
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.
👍
Codecov Report
@@ Coverage Diff @@
## v0.5 #71 +/- ##
=======================================
Coverage ? 31.93%
=======================================
Files ? 41
Lines ? 2918
Branches ? 0
=======================================
Hits ? 932
Misses ? 1897
Partials ? 89
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
What does this PR do?
Motivation
By design, the ERS controller can receive requests before the EDS controller defaults the CR.
This PR adds safeguard against nil pointers when accessing CR fields (e.g
Spec.Strategy.ReconcileFrequency.Duration
) in the ERS controller.Additional Notes
Related to #65
Describe your test plan
Same as #65
the CR is created.
The controller should update the spec.strategy to add it back.
Didn't override a value provided by the user.