-
Notifications
You must be signed in to change notification settings - Fork 278
✨ New API: OpenStackCluster.Spec.ExternalNetwork #1790
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
Conversation
✅ Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/hold cancel |
701c4ba
to
eb4e8cc
Compare
/cc dulek stephenfin |
/cc MaysaMacedo |
@EmilienM: GitHub didn't allow me to request PR reviews from the following users: MaysaMacedo. Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
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. |
/test pull-cluster-api-provider-openstack-e2e-full-test |
3ee79a5
to
50a169a
Compare
/test pull-cluster-api-provider-openstack-e2e-full-test |
Ready for review, CI all green. |
50a169a
to
5342f4f
Compare
/uncc seanschneeweiss |
5342f4f
to
9a23991
Compare
9a23991
to
e9cf857
Compare
e9cf857
to
24667f4
Compare
/test pull-cluster-api-provider-openstack-e2e-full-test |
5a177ab
to
d4a19b5
Compare
d4a19b5
to
068c545
Compare
/hold cancel |
068c545
to
17b73a6
Compare
/test pull-cluster-api-provider-openstack-e2e-full-test |
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.
/lgtm
Leaving the approval to someone else. More coverage for those conversions could be nice as @mdbooth mentioned but I don't see it as critical right now
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.
/lgtm from my side too.
17b73a6
to
cbcd198
Compare
api/v1alpha7/conversion.go
Outdated
"externalNetwork": conversion.UnconditionalFieldRestorer( | ||
func(c *infrav1.OpenStackCluster) *infrav1.NetworkFilter { | ||
return &c.Spec.ExternalNetwork | ||
}, | ||
), | ||
"disableExternalNetwork": conversion.UnconditionalFieldRestorer( | ||
func(c *infrav1.OpenStackCluster) *bool { | ||
return &c.Spec.DisableExternalNetwork | ||
}, | ||
), |
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 these as they're already covered by spec
above. In any case we would not want separate field restorers for individual fields like this. We want a single field restorer to cover a complete 'scope', e.g. the spec.
We only treat bastion
separate because it's expected to be modified frequently, which makes it different to the rest of the spec. We don't want to exclude a spec from restore just because the bastion was modified, as it's reasonable that these fields might be managed differently.
I wonder if we should be excluding the bastion from the spec restorer, though 🤔 Yes, I'm pretty sure we should. I'll have to think about that.
I just pushed an update which fixes conversion of the new fields. The changes are:
|
/approve I'm happy for this to merge once somebody else has looked it over. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dulek, EmilienM, 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 |
/test pull-cluster-api-provider-openstack-e2e-full-test |
// The external network can be specified in the cluster spec or will be searched for if not specified. | ||
// OpenStackCluster.Status.ExternalNetwork will be set to nil if one of these conditions are met: | ||
// - no external network was given in the cluster spec and no external network was found | ||
// - the user has set OpenStackCluster.Spec.ExternalNetworkType to 'none'. |
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 doc looks outdated
cbcd198
to
87cb356
Compare
/test pull-cluster-api-provider-openstack-e2e-full-test |
/lgtm |
What this PR does / why we need it:
This PR converts
OpenStackCluster.Spec.ExternalNetworkID
toOpenStackCluster.Spec.ExternalNetwork
.The field
externalNetworkID
has been renamed toexternalNetwork
and isn't a string anymore but a reference to aNetworkFilter
object.becomes
It is now possible to specify a
NetworkFilter
object to select the external network to use for the cluster. TheNetworkFilter
object allows to select the network by name, by ID or by tags.If a network is provided, it'll be added to
OpenStackCluster.Status.ExternalNetwork
. If the network can't be found, an error will be returned.If no network is provided, CAPO will try to find network marked "External" and add it to
OpenStackCluster.Status.ExternalNetwork
. If it can't find a network marked "External",OpenStackCluster.Status.ExternalNetwork
will be set to nil.If more than one network is found, an error will be returned.
It is now possible for a user to specify that no external network should be used by setting
DisableExternalNetwork
totrue
: