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
Set default value for correlation and jitter of NetworkChaos #361
Conversation
Codecov Report
@@ Coverage Diff @@
## master #361 +/- ##
========================================
- Coverage 61% 61% -0.01%
========================================
Files 56 56
Lines 3347 3354 +7
========================================
+ Hits 2042 2046 +4
- Misses 1145 1147 +2
- Partials 160 161 +1
Continue to review full report at Codecov.
|
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.
LGTM
Did we need to update doc about network? |
api/v1alpha1/networkchaos_webhook.go
Outdated
@@ -44,6 +52,20 @@ func (in *NetworkChaos) Default() { | |||
in.Spec.Selector.DefaultNamespace(in.GetNamespace()) | |||
// the target's namespace selector | |||
in.Spec.Target.TargetSelector.DefaultNamespace(in.GetNamespace()) | |||
|
|||
in.defaultDelay() |
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.
Shall we add it to NetworkChaosSpec
to keep same style as other's setting default ?
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 agree with this opinion @Gallardot
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.
Good suggestion!All done!
I think it is necessary to add unit test to verify the validating and default webhook. This request is ok to me. I suggest to create issue to mention us for the unit test later. |
@zhouqiang-cl I have updated the doc. |
LGTM |
@Yisaer I have added some unit test for the validating and default webhook before. Maybe you means e2e test for the webhook? |
Thanks for your contribution. If your PR get merged, you will be rewarded 604 points. |
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.
LGTM
/merge |
/run-all-tests |
UCP #292
What problem does this PR solve?
#292
What is changed and how does it work?
Check List
Tests
Code changes
Side effects
Related changes
Does this PR introduce a user-facing change?: