-
Notifications
You must be signed in to change notification settings - Fork 31
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
✨ Add proxy option #136
✨ Add proxy option #136
Conversation
Adding `proxy` command line option to specify proxy string as an argument. THe proxy s passed to analyzer providers settings. Fixes: konveyor#11 Signed-off-by: Marek Aufart <maufart@redhat.com>
This is looking great, can we make sure to have the NOPROXY settings as well as use environment variables |
Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Marek Aufart <maufart@redhat.com>
cmd/analyze.go
Outdated
@@ -162,8 +163,9 @@ func NewAnalyzeCmd(log logr.Logger) *cobra.Command { | |||
analyzeCommand.Flags().BoolVar(&analyzeCmd.overwrite, "overwrite", false, "overwrite output directory") | |||
analyzeCommand.Flags().StringVar(&analyzeCmd.jaegerEndpoint, "jaeger-endpoint", "", "jaeger endpoint to collect traces") | |||
analyzeCommand.Flags().BoolVar(&analyzeCmd.enableDefaultRulesets, "enable-default-rulesets", true, "run default rulesets with analysis") | |||
analyzeCommand.Flags().StringVar(&analyzeCmd.proxy, "proxy", "", "HTTP&HTTPS proxy string URL") | |||
analyzeCommand.Flags().StringVar(&analyzeCmd.noProxy, "no-proxy", "", "proxy excluded URLs (relevant only with `proxy`)") | |||
analyzeCommand.Flags().StringVar(&analyzeCmd.httpProxy, "http-proxy", os.Getenv("http_proxy"), "HTTP proxy string URL") |
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.
one small concern, would be that the default value printed out here, would be changed based on env var.
Also I think you will need to handle both http_proxy
and HTTP_PROXY
.
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.
Thanks for comment! Printing actual default values in help didn't look bad to me.
What I've been looking on proxy env variables, lower case http_proxy
is much more common than HTTP_PROXY
. However, please update me if mentioned issues needs to be addressed.
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.
Pretty sure it does; Docker, I think, only uses uppercase, and I think Openshift does as well.
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.
👍 will update!
Signed-off-by: Marek Aufart <maufart@redhat.com>
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.
Looks good to me!
Adding
proxy
command line option to specify proxy string as an argument. THe proxy s passed to analyzer providers settings.Fixes: #11