-
Notifications
You must be signed in to change notification settings - Fork 261
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
✨ Adds IPAM support for floating ips in OpenStackMachine #1762
✨ Adds IPAM support for floating ips in OpenStackMachine #1762
Conversation
|
✅ Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Welcome @bilbobrovall! |
Hi @bilbobrovall. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/check-cla |
/ok-to-test |
} | ||
|
||
func (r *OpenStackMachineReconciler) reconcileDeleteFloatingAddressFromPool(scope scope.Scope, openStackMachine *infrav1.OpenStackMachine) error { | ||
scope.Logger().Info("Reconciling floating IP claims delete") |
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 better to add more info e.g the machine's name in log
/retest |
500dd98
to
ef85850
Compare
/retest |
1 similar comment
/retest |
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.
Bunch of questions inline.
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.
Nice work
ab6bb87
to
41f26c1
Compare
/retest |
f25f808
to
9418c5f
Compare
I'll added som basic info to the book, maybe you could take a look and se if you think it's enough? |
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.
Critical changes:
- Update the missed json tag
- Remove status field (or explain why we need it)
With that I think I'd merge this.
@@ -104,6 +105,23 @@ The following fields in `PortOpts` are renamed in order to keep them consistent | |||
* `hostId` becomes `hostID` | |||
* `allowedCidrs` becomes `allowedCIDRs` | |||
|
|||
#### Additon of floatingIPPoolRef |
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.
*Addition
#### Additon of floatingIPPoolRef | ||
|
||
A new field, FloatingIPPoolRef, has been introduced. It is important to note that this feature requires the existence of an IPPool to operate seamlessly. This new field references an IPPool whice will be used for floating IP allocation. | ||
In additon to this field an IPPool resource called `OpenStackFloatingIPPool` has been added. Please not that this resource is new and still in alpha meaning its more likely to contain bugs and change in the future. |
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.
*note
@@ -95,7 +95,7 @@ type OpenStackMachineSpec struct { | |||
// to an IPAddressClaim. Once the IPAddressClaim is fulfilled, the FloatingIP | |||
// will be assigned to the OpenStackMachine. | |||
// +optional | |||
FloatingAddressFromPoolRef *corev1.TypedLocalObjectReference `json:"floatingAddressFromPool,omitempty"` | |||
FloatingIPPoolRef *corev1.TypedLocalObjectReference `json:"floatingAddressFromPool,omitempty"` |
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.
Need to update the json tag.
@@ -452,11 +611,32 @@ func (r *OpenStackMachineReconciler) reconcileNormal(ctx context.Context, scope | |||
return ctrl.Result{}, nil | |||
} | |||
|
|||
err = r.reconcileAPIServerLoadBalancer(scope, openStackCluster, openStackMachine, instanceStatus, instanceNS, clusterName) |
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.
Guessing this was to make gocyclo happy?
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.
Yep, initially it was possible to pass by just keeping down additions to reconcileNormal but after having to remove a couple of lines after every rebase, I just gave myself some margins 🫣
@@ -107,6 +114,10 @@ type OpenStackMachineStatus struct { | |||
// +optional | |||
Ready bool `json:"ready"` | |||
|
|||
// FloatingAddressFromPoolReady is true when the FloatingIP is ready. | |||
// +optional | |||
FloatingAddressFromPoolReady *bool `json:"floatingAddressFromPoolReady,omitempty"` |
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 don't think we need this because we set a Condition. Unless I've missed something important, please could you remove it?
9418c5f
to
4dd4578
Compare
4dd4578
to
51215e6
Compare
/hold cancel |
Should be fixed now |
51215e6
to
7dce82c
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bilbobrovall, mdbooth 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 |
What this PR does / why we need it:
Implements IPAM support for floating ips in OpenStackMachine
First part of #1750
Special notes for your reviewer:
TODOs:
/hold