-
Notifications
You must be signed in to change notification settings - Fork 608
Add ProxyStatus to config/v1/types_proxy #335
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,8 +15,12 @@ type Proxy struct { | |
| // Spec holds user-settable values for the proxy configuration | ||
| // +required | ||
| Spec ProxySpec `json:"spec"` | ||
| // status holds observed values from the cluster. They may not be overridden. | ||
| // +optional | ||
| Status ProxyStatus `json:"status"` | ||
| } | ||
|
|
||
| // ProxySpec contains cluster proxy creation configuration. | ||
| type ProxySpec struct { | ||
| // httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var. | ||
| // +optional | ||
|
|
@@ -26,7 +30,26 @@ type ProxySpec struct { | |
| // +optional | ||
| HTTPSProxy string `json:"httpsProxy,omitempty"` | ||
|
|
||
| // noProxy is the list of domains for which the proxy should not be used. Empty means unset and will not result in an env var. | ||
| // noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. | ||
| // Each name is matched as either a domain which contains the host name as a suffix, or the host name itself. | ||
| // For instance, example.com would match example.com, example.com:80, and www.example.com. | ||
| // Wildcard(*) characters are not accepted, except a single * character which matches all hosts | ||
| // and effectively disables the proxy. Empty means unset and will not result in an env var. | ||
| // +optional | ||
| NoProxy string `json:"noProxy,omitempty"` | ||
| } | ||
|
|
||
| // ProxyStatus shows current known state of the cluster proxy. | ||
| type ProxyStatus struct { | ||
| // httpProxy is the URL of the proxy for HTTP requests. | ||
| // +optional | ||
| HTTPProxy string `json:"httpProxy,omitempty"` | ||
|
|
||
| // httpsProxy is the URL of the proxy for HTTPS requests. | ||
| // +optional | ||
| HTTPSProxy string `json:"httpsProxy,omitempty"` | ||
|
|
||
| // noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. | ||
| // +optional | ||
| NoProxy string `json:"noProxy,omitempty"` | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't a list of domains be
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, does the presence of
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I set this to be the same type as ProxySpec.NoProxy. I believe a comma-separated string is the convention after looking over some 3.11 & AWS docs.
Yes, I believe that is the case. Looking at this 3.11 doc:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Those 3.11 docs are complicated. What's the policy for things like that? Do we want docs here? If so, should they be full/authoritative or sparse? If empty or sparse, should we link to some authoritative external doc?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think extensive docs are probably not best situated here.. but I do think we should expand the current field comments to include information like this is comma separated list, it can include DNS domains, networks, IPs etc...?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why only
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
this package has cluster level configuration and I'm not sure how ^^ is related to the change. All operators are going to have to setup proxy for their operands based on this object.
NoProxy is the spec section is user-provided, while NoProxy in the status section is observed value from the spec of this object + network object + other default values that might include platform specific values too. Therefore, NoProxy makes sense as part of status. There's no such need for other spec fields therefore specifically skipped from status. And afaik there isn't a requirement for all fields to be part of the status l, right?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @abhinavdahiya imo it makes for a harder API to navigate. I've always interpreted By way of example, if the openshift controller manager needs to watch the global
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If we follow this anology, openshift controller should use the HTTP(S)_PROXY from the spec because the controller is fulfilling the intent of the user. and use the But putting all fields in status too is something not too imp to me, and I am okay if we want to go that route.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have added http- & httpsProxy to the status in order to match the spec. |
||
| } | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.