-
Notifications
You must be signed in to change notification settings - Fork 284
Use Octavia #426
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
Use Octavia #426
Conversation
|
Currently this PR is WIP. Bacause this PR created loadbalancer, pool, listener and healthmonitor successfully, but failed to assign floating ip to vip_port_id of loadbalancer. |
| if err != nil { | ||
| return err | ||
| } | ||
| loadbalancerService, err := loadbalancer.NewService(osProviderClient, clientOpts, clusterProviderSpec.UseOctavia) |
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.
Can you create this services at the start of the method (where networkingService was created before)? It was intended to first create all clients, so that we don't start to do anything if one of them cannot be created (also in the other files)
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.
This method needs clusterProviderSpec.useOcatavia so that must after providerv1.ClusterSpecAndStatusFromProviderSpec.
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.
Oh of course you're right
f8b6cf8 to
8186e43
Compare
|
Now I created cluster successfully except for following two changes.
|
|
i am having similar issue to you on 2) |
Yeah, I know second issue is addressed here: Since I have only octavia environment, I hope merging this PR first so that I would test #421 manually in my octavia environment. |
|
If it makes Octavia deployment possible for you and doesnt break anything else, why not |
|
/approve works for me |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hidekazuna, jichenjc 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 |
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.
Just some nits. Otherwise lgtm
| return errors.New("network.APIServerLoadBalancer is not yet available in clusterProviderStatus") | ||
| } | ||
|
|
||
| loadBalancerName := fmt.Sprintf("%s-cluster-%s-%s", networkPrefix, clusterName, kubeapiLBSuffix) |
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.
Can you add this log message again? Seems like a rebase mistake to me (concurrent change on master & file move)
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 added the log message again due to accidentally removed.
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.
Still removed in the diff :)
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.
Now really added 👍
| "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/loadbalancers" | ||
| "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/monitors" | ||
| "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/pools" | ||
| // "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/listeners" |
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 would prefer removing the unused imports
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.
Sure.
| ) | ||
|
|
||
| const ( | ||
| networkPrefix string = "k8s" |
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.
prefix has been changed to k8s-clusterapi here: https://github.com/kubernetes-sigs/cluster-api-provider-openstack/pull/424/files
Please also change it here
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 changed the prefix.
| networkingClient, err := openstack.NewNetworkV2(client, gophercloud.EndpointOpts{ | ||
| Region: clientOpts.RegionName, | ||
| }) | ||
|
|
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.
please also add error handling here:
if err != nil {
return nil, fmt.Errorf("failed to create networking service client: %v", err)
}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 added the error handling.
8186e43 to
f0423a5
Compare
f0423a5 to
5b75178
Compare
|
/lgtm |
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #418
Special notes for your reviewer:
Release note: