Skip to content
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

Merged
merged 8 commits into from
Oct 9, 2021

Conversation

KONY128
Copy link
Contributor

@KONY128 KONY128 commented Sep 6, 2021

I created a new mode to easily expose LoadBalancer Service by OpenELB.

For detailed information, plz read this proposal: #214

@ks-ci-bot ks-ci-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Sep 6, 2021
@FeynmanZhou
Copy link
Member

/cc @zheng1

Comment on lines 15 to 28
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"
Copy link
Collaborator

@zheng1 zheng1 Sep 14, 2021

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

Suggested change
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"

@zheng1
Copy link
Collaborator

zheng1 commented Sep 14, 2021

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.

@FeynmanZhou
Copy link
Member

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?

@KONY128 KONY128 requested a review from zheng1 October 8, 2021 08:25
@zheng1
Copy link
Collaborator

zheng1 commented Oct 9, 2021

/approve
/lgtm

@ks-ci-bot ks-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 9, 2021
@ks-ci-bot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ks-ci-bot ks-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 9, 2021
@ks-ci-bot ks-ci-bot merged commit 410d488 into openelb:master Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants