cluster-api-provider-openstack
cluster-api-provider-openstack copied to clipboard
⚠️ Remove PortOpts.SecurityGroupFilters
This replaces https://github.com/kubernetes-sigs/cluster-api-provider-openstack/pull/1257.
What this PR does / why we need it:
Deprecating and replacing PortOpts.SecurityGroups of *[]string format field from OpenStackMachineTemplate ports and replace is with *[]SecurityGroupParam format. The PortOpts.SecurityGroupFilters of type []SecurityGroupParam is removed.
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 #1251
Special notes for your reviewer:
~~I opened a new PR instead of rebasing the existing since there are some issues and I'm unsure how to solve them. This way it will be easier to compare the rebased and original code side by side.~~
- ~~We need to provide a conversion function for the
PortOpts.SecurityGroupsfield that changes from*[]stringin v1alpha5 to*[]SecurityGroupParamin v1alpha6.~~ - ~~The same conversion is needed from v1alpha4 to v1alpha6 and this is where I'm having issues. The required name of the conversion function becomes the same for both v1alpha4 and v1alpha5 because it goes from
*[]stringwhich doesn't have a version.~~
~~If I add this conversion function to both v1alpha4 and v1alpha5, the generator complains that there is a duplicate.~~Convert_Slice_string_To_Slice_v1alpha6_SecurityGroupParam - ~~If I instead add the conversion in only one place (e.g. v1alpha5), then the generator will be happy and import the conversion function in the other API version as well! But the compiler does not like this at all. It gets an import error.~~
could not import ./api/v1alpha4 (no required module provides package "./api/v1alpha4")
~~This wasn't a problem in the original PR since it only needed the conversion from v1alpha4 -> v1alpha5 (so no duplicate function name or import needed). If you have any suggestions on how to solve this, please let me know.~~
Edit: I think I figured it out! By adding the conversion function in v1alpha6 instead of v1alpha5 and/or v1alpha4, I avoid the issue.
TODOs:
- [x] squashed commits
- if necessary:
- [ ] includes documentation
- [ ] adds unit tests
/hold
Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!
| Name | Link |
|---|---|
| Latest commit | 20cd37a241a45ae292549ecd020b7799d86de203 |
| Latest deploy log | https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/64182cfb22118800086f6930 |
| Deploy Preview | https://deploy-preview-1291--kubernetes-sigs-cluster-api-openstack.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Hi @lentzi90. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
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.
/ok-to-test
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: lentzi90
Once this PR has been reviewed and has the lgtm label, please assign tobiasgiese for approval by writing /assign @tobiasgiese in a comment. For more information see:The Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/retest
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
/test pull-cluster-api-provider-openstack-e2e-full-test
/test pull-cluster-api-provider-openstack-e2e-full-test
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: lentzi90 Once this PR has been reviewed and has the lgtm label, please assign tobiasgiese for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
PR needs rebase.
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.
@lentzi90: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| pull-cluster-api-provider-openstack-e2e-test | 20cd37a241a45ae292549ecd020b7799d86de203 | link | true | /test pull-cluster-api-provider-openstack-e2e-test |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
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. I understand the commands that are listed here.
Replaced by #1516 which just drops securityGroups instead of renaming securityGroupFilters to securityGroups and dropping the old securityGroups.