-
Notifications
You must be signed in to change notification settings - Fork 191
Dynamic Validator Refactor for Operator Compatibility #1244
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
Dynamic Validator Refactor for Operator Compatibility #1244
Conversation
d499711 to
f634b6f
Compare
|
I think this makes code more re-usable but it makes all the code exponentially more complicated and harder to read. Im ok with this but we just need to be more aware of things like this. Now it requires more experienced reviews, code is harder to change, any task touching this code will be much harder. Just saying :) |
f634b6f to
7efdbaa
Compare
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.
vnetId
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.
Fixed
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.
json:"vnetId,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.
Fixed
7efdbaa to
7d91fe9
Compare
| code string | ||
| typ 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.
Please raise follow-up to try to get this generalized so this would be set by called instead in the initiation
Things to note:
NewValidator.virtualNetworkClientincache.goinstead of borrowing.Which issue this PR addresses:
Refactor openshiftcluster-dynamicvalidator into an interface that allows some functions to be used outside of the context of the RP.
What this PR does / why we need it:
This should allow us to call validation methods from the context of the operator to expose them as conditions.
Test plan for issue:
Unit tests
E2E tests
Is there any documentation that needs to be updated for this PR?
No