-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
implement LoadBalancer task for ALICloud #5207
Conversation
/ok-to-test |
sourceItems := "" | ||
for _, cidr := range b.Cluster.Spec.KubernetesAPIAccess { | ||
if cidr != "0.0.0.0" && cidr != "0.0.0.0/0" { | ||
sourceItems = sourceItems + cidr + "," |
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 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, ",")
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.
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) |
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 think this probably should return an error
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 |
@justinsb Thanks for your review. We modified this code, and can we have a new lgtm? |
…e conflict with the upstream branch
@justinsb This pr has been a long time, hope it can be merged. |
Sorry for the delay @LilyFaFa /approve |
[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 |
Implement LoadBalancer task for AlibabaCloud
This is part of #4127.