-
Notifications
You must be signed in to change notification settings - Fork 199
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
Feat: a more simple way to expose LoadBalancer Service by OpenELB #215
Conversation
/cc @zheng1 |
pkg/constant/constants.go
Outdated
PorterLBSAnnotationKey string = "lbs.porter.kubesphere.io/v1alpha1" | ||
PorterOnePort string = "one" | ||
PorterAllNode string = "all" | ||
PorterNodeExtnlIPPrefLabel string = "lbs.porter.kubesphere.io/external-ip-preffered" | ||
PorterNodeExcludeLBSLabel string = "lbs.porter.kubesphere.io/exclude.node" | ||
PorterLBSExposedExternalIP string = "lbs.porter.kubesphere.io/exposed.node.external-ips" | ||
PorterLBSExposedInternalIP string = "lbs.porter.kubesphere.io/exposed.node.internal-ips" | ||
PorterForwardImage string = "kubespheredev/openelb-forward:v0.4.2" | ||
PorterProxyImage string = "kubespheredev/openelb-proxy:v0.4.2" | ||
NameSeparator string = "-" | ||
IPSeparator string = "," | ||
EnvArgSplitter string = " " | ||
PorterDeDsPrefix string = "svc-proxy-" | ||
PorterLBSFInalizer string = "lbs.porter.kubesphere.io/finalizer" |
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 adding a protocol called node-proxy
? Use the annotation protocol.porter.kubesphere.io/v1alpha1: node-proxy
to enable this mode.
In this case, the code here could be redefined with the following changes
PorterLBSAnnotationKey string = "lbs.porter.kubesphere.io/v1alpha1" | |
PorterOnePort string = "one" | |
PorterAllNode string = "all" | |
PorterNodeExtnlIPPrefLabel string = "lbs.porter.kubesphere.io/external-ip-preffered" | |
PorterNodeExcludeLBSLabel string = "lbs.porter.kubesphere.io/exclude.node" | |
PorterLBSExposedExternalIP string = "lbs.porter.kubesphere.io/exposed.node.external-ips" | |
PorterLBSExposedInternalIP string = "lbs.porter.kubesphere.io/exposed.node.internal-ips" | |
PorterForwardImage string = "kubespheredev/openelb-forward:v0.4.2" | |
PorterProxyImage string = "kubespheredev/openelb-proxy:v0.4.2" | |
NameSeparator string = "-" | |
IPSeparator string = "," | |
EnvArgSplitter string = " " | |
PorterDeDsPrefix string = "svc-proxy-" | |
PorterLBSFInalizer string = "lbs.porter.kubesphere.io/finalizer" | |
NodeProxyTypeAnnotationKey string = "node-proxy.porter.kubesphere.io/type" | |
NodeProxyTypeDeployment string = "deployment" | |
NodeProxyTypeDaemonSet string = "daemonset" | |
LabelNodeProxyExternalIPPreffered string = "node-proxy.porter.kubesphere.io/external-ip-preffered" | |
LabelNodeProxyExcludeNode string = "node-proxy.porter.kubesphere.io/exclude-node" | |
NodeProxyExternalIPAnnotationKey string = "node-proxy.porter.kubesphere.io/external-ip" | |
NodeProxyInternalIPAnnotationKey string = "node-proxy.porter.kubesphere.io/internal-ip" | |
NodeProxyForwardImage string = "kubespheredev/openelb-forward:v0.4.2" | |
NodeProxyProxyImage string = "kubespheredev/openelb-proxy:v0.4.2" | |
NameSeparator string = "-" | |
IPSeparator string = "," | |
EnvArgSplitter string = " " | |
NodeProxyWorkloadPrefix string = "node-proxy-" | |
NodeProxyFinalizerName string = "node-proxy.porter.kubesphere.io/finalizer" |
Thank you ever so much for this contribution. For the definition of using methods and annotations, I submitted a code comment, please take a look. I have no other problems with the other code changes. Can you make the following change in the next PR: pass NodeProxyForwardImage and NodeProxyProxyImage as env, and define these two values via configmap when deploying the porter, so that it is easy for other users to define custom images. |
@KONY128 Just circling back, how's this PR going? |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: KONY128, zheng1 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 |
I created a new mode to easily expose LoadBalancer Service by OpenELB.
For detailed information, plz read this proposal: #214