-
Notifications
You must be signed in to change notification settings - Fork 4
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 stunnel client implementation #7
add stunnel client implementation #7
Conversation
e46581f
to
61e4c85
Compare
e6427c5
to
a477b7b
Compare
Signed-off-by: Alay Patel <[email protected]>
a477b7b
to
c5f95af
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.
Just a couple little items.
But I am curious about your thoughts on the consistency of the Interface method names. (or maybe having too many days off just left me confused 😕)
transport/stunnel/client.go
Outdated
|
||
type client struct { | ||
logger logr.Logger | ||
ingressPort int32 |
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'm struggling a bit w/ the ingressPort
name. It's ConnectPort
in the Transport interface, but the NewClient
params also refer to it as ingressPort. And Endpoint has IngressPort().
Did we make a mistake by having Transport.ConnectPort() and Endpoint.IngressPort()?
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.
It's part of a bad refactor, it should be connectPort here in the transport package.
IMO, having ListenPort and ConnectPort at the transport level makes sense because out of the port one is used to accept connection other is used to connect.
In the case of endpoint interface both are used to accept connections, the difference is whether it is exposed external to the cluster or it is internal because of which BackendPort and IngressPort made much more sense, assuming Ingress is the terms used widely to accept traffic into the cluster. Most Kube resources use targetPort and port to mean the same thing respectively but that was turning out to be a little confusing when we were having conversations in the team about this. I would be open to renaming the endpoint interface methods if we want to be consistent with Kube resource fields
return "localhost" | ||
} | ||
|
||
func NewClient(ctx context.Context, c ctrlclient.Client, logger logr.Logger, |
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.
Please comment the params
10e7f2c
to
be65fd2
Compare
Co-authored-by: John Strunk <[email protected]> Signed-off-by: Alay Patel <[email protected]>
be65fd2
to
207aed0
Compare
@JohnStrunk Thanks for the feedback, updated a couple of things and added clarification on the naming, PTAL. If we do want to revisit the endpoint interface naming, can we let this PR in and handle it in a separate issue? Thanks |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alaypatel07, JohnStrunk 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 |
Describe what this PR does
This adds stunnel client implementation. Depends on #4 fixes #5
Is there anything that requires special attention?
Related issues: