-
Notifications
You must be signed in to change notification settings - Fork 253
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
✨ Move subnet options to SubnetSpec #1856
Conversation
✅ Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
f029840
to
f063a8b
Compare
I made a small update of unnecessary restore and added CRD changes docs. |
/test pull-cluster-api-provider-openstack-e2e-full-test |
/lgtm |
// If you leave this empty, no network will be created. | ||
NodeCIDR string `json:"nodeCidr,omitempty"` | ||
// +kubebuilder:validation:MaxItems=1 | ||
NodeSubnets []SubnetSpec `json:"nodeSubnets,omitempty"` | ||
|
||
// If NodeCIDR is set this option can be used to detect an existing router. |
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.
We need to update these comments where NodeCIDR is mentioned.
Also re-reviewing this, I realized that we also have Network
, Subnets
, Router
.
Maybe to avoid confusion we could rename NodeSubnets
to ManagedSubnets
in the same vain as ManagedSecurityGroups
(see PR).
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.
Yeah, that's not a bad idea. I've applied it, let's see if correctly.
/retitle ✨ Move subnet options to SubnetSpec |
Looks like it works! |
/lgtm |
/lgtm |
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.
Doc nit if you care to update.
// network, a subnet with NodeCIDR, and a router connected to this subnet. | ||
// If you leave this empty, no network will be created. | ||
NodeCIDR string `json:"nodeCidr,omitempty"` | ||
// ManagedSubnets are describing OpenStack Subnets to be created. Cluster actuator |
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.
nit
// ManagedSubnets are describing OpenStack Subnets to be created. Cluster actuator | |
// ManagedSubnets describe OpenStack Subnets to be created. The cluster controller |
@@ -539,6 +539,8 @@ func reconcileNetworkComponents(scope scope.Scope, cluster *clusterv1.Cluster, o | |||
handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to reconcile router: %w", err)) | |||
return fmt.Errorf("failed to reconcile router: %w", err) | |||
} | |||
} else { | |||
return fmt.Errorf("failed to reconcile network: ManagedSubnets only supports one element, %d provided", len(openStackCluster.Spec.ManagedSubnets)) |
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.
Reviewer note: confirmed this is also checked at admission as maxitems is specified in the CRD.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dulek, 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 |
/hold cancel |
/lgtm |
This commit introduces SubnetSpec field onto the OpenStackClusterSpec that is supposed to hold all options related to subnets created by CAPO. This means nodeCidr and DNSNameservers are moved into that struct.
/lgtm |
What this PR does / why we need it:
This commit introduces SubnetSpec field onto the OpenStackClusterSpec that is supposed to hold all options related to subnets created by CAPO. This means nodeCidr and DNSNameservers are moved into that struct.
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 #
Special notes for your reviewer:
TODOs:
/hold