-
Notifications
You must be signed in to change notification settings - Fork 43
[WIP] Merge cluster-proxy into core #151
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
Conversation
Signed-off-by: Jian Qiu <[email protected]>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiujian16 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 |
| registration process begins after the cluster registration process and will not impact normal cluster | ||
| registration. | ||
|
|
||
| #### Proxy API |
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 wonder whether we should use term "proxy", I got some cases that users get confused about cluster-proxy with other "proxy" settings like addonproxyconfig.proxyconfig.
Could we use another term like "tunnel"?
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.
tunnel may not be clearly state the functions. Tunnel would mean that agent and hub is establishing the tunnel, but proxy is more accurate which mean user is proxying the request.
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.
some naming suggestion from chatgpt.
grpxy (grpc proxy, short, sysadmin vibe)
tunnx (tunnel nginx-style)
relayx (captures the agent relay role)
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 believe the complete description of this functionality can be "proxy requests between hub and agent," but it can also be "establish a tunnel between hub and agent that can be used to proxy requests."
For users of this functionality, they indeed only need to know about an endpoint that can proxy requests - they don't need to know about the existence of a "tunnel." However, for developers and maintainers, the term "tunnel" helps distinguish this functionality from other proxy-related features.
If "tunnel" doesn't work, could we adopt other terms such as: gateway, bridge, relay, etc.?
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.
relay seems ok to me, but since cluster-proxy has been known to many, I am not quite sure how strong the desire to rename.
@jnpacker thought?
enhancements/sig-architecture/149-moving-cluster-proxy-to-core/README.md
Outdated
Show resolved
Hide resolved
enhancements/sig-architecture/149-moving-cluster-proxy-to-core/README.md
Show resolved
Hide resolved
enhancements/sig-architecture/149-moving-cluster-proxy-to-core/README.md
Outdated
Show resolved
Hide resolved
|
|
||
| #### Installation | ||
|
|
||
| To enable the feature, the user needs to enable the feature gate in `ClusterManager` and `Klusterlet` API. |
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.
In hub side, except for grpc server, we will also need endpoint and certificates for the http server.
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.
yes, it is specified in the following.
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.
Don‘t we also need cert and endpoint configuration of this http server also set in cluster-manager?
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.
cluster manager will generate the cert. and we only need to configure endpoint I think?
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.
What if user want to use their customzied cert as the proxy endpoint maybe exposed in their domain?
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.
grpc connection is internal used by proxy, but http proxy is facing to user or maybe user's user.
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 got your point, yes we need at least endpoint of http server. I am not sure we need ca bundle. Do we support setting this in cluster-proxy today?
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.
updated
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.
Currently, this version of http-server using CA generated by openshift:
- https://github.com/stolostron/backplane-operator/blob/main/pkg/templates/charts/toggle/cluster-proxy-addon/templates/user-deployment.yaml#L139-L148
- https://github.com/stolostron/backplane-operator/blob/b5438698d74b66ada00c92cc63c13611757b77c8/pkg/templates/charts/toggle/cluster-proxy-addon/templates/user-service.yaml#L9
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 fix looks good to me
enhancements/sig-architecture/149-moving-cluster-proxy-to-core/README.md
Show resolved
Hide resolved
| #### Installation | ||
|
|
||
| To enable the feature, the user needs to enable the feature gate in `ClusterManager` and `Klusterlet` API. | ||
| In addition, A new proxyConfig field should be added in `ClusterManager` API: |
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.
how about introduce a config for grpcserver instead of proxyConifg
type GRPCServerConfiguration struct {
ImagePullSpec string `json:"imagePullSpec,omitempty"`
FeatureGates []FeatureGate `json:"featureGates,omitempty"`
EndpointExposure *GRPCEndpointExposure `json:"endpointExposure,omitempty"`
}use featureGates to control proxy or transport hub resources with grpc
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.
when we use grpc registration driver, does it mean we need to set both in registrationConfig and gRPCconfig?
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.
yes, for registrationConfig, we need to set authType with grpc to enable the grpc registration
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.
updated
Signed-off-by: Jian Qiu <[email protected]>
| endpoint: grpc://<external grpc address> | ||
| ``` | ||
|
|
||
| Example of grpc registration with proxy disabled: |
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.
| Example of grpc registration with proxy disabled: | |
| Example of grpc registration with proxy enabled: |
| endpoint: grpc://<external grpc address> | ||
| ``` | ||
|
|
||
| Example of grpc registraion with proxy enabled: |
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.
| Example of grpc registraion with proxy enabled: | |
| Example of grpc registraion with proxy disabled: |
|
@skeeey @xuezhaojun are your fine with the API change on the clusterManager, if so we will need to update clustermanager API sooner. |
I'm fine with it |
|
/lgtm |
Yes, the PR looks good to me. |
Signed-off-by: Jian Qiu <[email protected]>
|
New changes are detected. LGTM label has been removed. |
Signed-off-by: Jian Qiu <[email protected]>
|
we finally decide we will still follow with addon pattern for cluster-proxy. /close |
|
@qiujian16: Closed this PR. 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-sigs/prow repository. |
No description provided.