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

implement LoadBalancer task for ALICloud #5207

Merged
merged 2 commits into from
Jun 11, 2018

Conversation

Lily922
Copy link
Contributor

@Lily922 Lily922 commented May 25, 2018

Implement LoadBalancer task for AlibabaCloud
This is part of #4127.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 25, 2018
@geojaz
Copy link
Member

geojaz commented May 25, 2018

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 25, 2018
@geojaz geojaz added area/networking do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels May 25, 2018
sourceItems := ""
for _, cidr := range b.Cluster.Spec.KubernetesAPIAccess {
if cidr != "0.0.0.0" && cidr != "0.0.0.0/0" {
sourceItems = sourceItems + cidr + ","
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this leaves a trailing comma; not sure if that's a problem. It might be easier to build a string slice and then join it. Something like:

var cidrs []string

for _, cidr := range ... {
  cidrs = append(cidrs, cidr)
}

sourceItems := strings.Join(cidrs, ",")

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: looks like it doesn't matter but leaving as this approach is probably easier & a bit cleaner.

}
tags, _, err := cloud.SlbClient().DescribeTags(describeTagsArgs)
if err != nil {
glog.V(4).Info("Error getting tags on loadbalancerID:%q", *actual.LoadbalancerId)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this probably should return an error

@justinsb
Copy link
Member

justinsb commented Jun 1, 2018

So this LGTM - one comment on error handling but as this is additive I think this can go in and we can iterate on it!

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 1, 2018
@justinsb justinsb added this to the 1.10 milestone Jun 2, 2018
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 4, 2018
@Lily922
Copy link
Contributor Author

Lily922 commented Jun 4, 2018

@justinsb Thanks for your review. We modified this code, and can we have a new lgtm?

@Lily922
Copy link
Contributor Author

Lily922 commented Jun 11, 2018

@justinsb This pr has been a long time, hope it can be merged.

@justinsb
Copy link
Member

Sorry for the delay @LilyFaFa

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 11, 2018
@justinsb justinsb removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 11, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb, LilyFaFa

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

@k8s-ci-robot k8s-ci-robot merged commit 7a004d7 into kubernetes:master Jun 11, 2018
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. area/networking cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants