-
Notifications
You must be signed in to change notification settings - Fork 551
Introduce GRPC_PROXY EnvVar Support #2364
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
Introduce GRPC_PROXY EnvVar Support #2364
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: awgreene The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
be37352
to
b037c55
Compare
Please take a look @kevinrizza @estroz |
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.
Couple of questions! Looks good.
5ccf427
to
c0e0e4f
Compare
/retest |
c0e0e4f
to
f454e9b
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.
design questions
/hold |
f454e9b
to
99ee72c
Compare
/unhold |
0f26cbe
to
98872ac
Compare
/lgtm |
/hold looks like some related unit tests are failing. |
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.
sorry for the late review here, but spotted a few things of note:
func (s *SourceStore) Add(key registry.CatalogKey, address string) (*SourceConn, error) { | ||
_ = s.Remove(key) | ||
|
||
conn, err := grpc.Dial(address, grpc.WithInsecure()) | ||
conn, err := grpcConnection(address) |
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.
Can we abstract the dial logic away? maybe take a Dailer
as a field of SourceStore
?
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.
If we pursue this option wouldn't the connection to the proxy need to remain open indefinitely?
HTTPProxy: getGRPCProxyEnv(), | ||
HTTPSProxy: getGRPCProxyEnv(), | ||
NoProxy: getEnvAny("NO_PROXY", "no_proxy"), | ||
CGI: os.Getenv("REQUEST_METHOD") != "", |
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.
nit: We should probably memoize these so we don't fetch them for every dial.
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.
This seems reasonable but would make the values static, which likely isn't a problem given how deployments and pods work.
/lgtm looks like the unit test may have been on a stale commit |
Introduce the ability to specify a dial context for GRPC connections. Signed-off-by: Alexander Greene <[email protected]>
98872ac
to
31c7815
Compare
/lgtm |
@awgreene: #2364 failed to apply on top of branch "release-4.9":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This reverts commit afc0848.
This reverts commit afc0848.
Introduce the ability to specify a dial context for GRPC connections.