-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Added wait and interval time flags to minikube service command #1651
Added wait and interval time flags to minikube service command #1651
Conversation
0162221
to
3fa9543
Compare
3fa9543
to
79b9e10
Compare
Codecov Report
@@ Coverage Diff @@
## master #1651 +/- ##
==========================================
+ Coverage 38.62% 38.69% +0.06%
==========================================
Files 51 51
Lines 2664 2667 +3
==========================================
+ Hits 1029 1032 +3
Misses 1454 1454
Partials 181 181
Continue to review full report at Codecov.
|
@@ -110,7 +114,8 @@ You can add one by annotating a service with the label %s:%s | |||
func init() { | |||
addonsOpenCmd.Flags().BoolVar(&addonsURLMode, "url", false, "Display the kubernetes addons URL in the CLI instead of opening it in the default browser") | |||
addonsOpenCmd.Flags().BoolVar(&https, "https", false, "Open the addons URL with https instead of http") | |||
|
|||
addonsOpenCmd.Flags().IntVar(&wait, "wait", constants.DefaultWait, "Amount of time to wait for service in seconds") | |||
addonsOpenCmd.Flags().IntVar(&interval, "interval", constants.DefaultInterval, "The time interval for each check that wait performs in seconds") |
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 like the wait flag, but interval seems a bit overkill. Any reason to not just try every 1-2 seconds, no matter what wait is?
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.
The issue here is that, for users, I tested the timing (w/ 6 second interval) so that there were only ~3-6 outputs "waiting" if a user waited for a sensible service to come up (single pod service). For something automated, there is no real reason to have the wait be so high. I am fine with removing it though.
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.
With this, simply using the wait flag will have a 6 second default, "minikube service --wait 300 nginx"
This might be useful for users trying to automate services coming up with minikube.