Skip to content
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 spec.allowAllInClusterTraffic to spec.ManagedSecurityGroups #1892

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

EmilienM
Copy link
Contributor

@EmilienM EmilienM commented Feb 19, 2024

What this PR does / why we need it:

Move OpenStackCluster.Spec.AllowAllInClusterTraffic under OpenStackCluster.Spec.ManagedSecurityGroups.

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 #1878

TODOs:

  • squashed commits
  • if necessary:
    • includes documentation
    • adds unit tests

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 19, 2024
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 19, 2024
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 19, 2024
Copy link

netlify bot commented Feb 19, 2024

Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!

Name Link
🔨 Latest commit 350b7e6
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/65d620b09687bc00083160ff
😎 Deploy Preview https://deploy-preview-1892--kubernetes-sigs-cluster-api-openstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@EmilienM EmilienM changed the title Move AllowAllInClusterTraffic ✨ Move AllowAllInClusterTraffic Feb 19, 2024
@EmilienM EmilienM changed the title ✨ Move AllowAllInClusterTraffic ✨ Move spec.allowAllInClusterTraffic to spec.ManagedSecurityGroups` Feb 19, 2024
@EmilienM EmilienM changed the title ✨ Move spec.allowAllInClusterTraffic to spec.ManagedSecurityGroups` ✨ Move spec.allowAllInClusterTraffic to spec.ManagedSecurityGroups Feb 19, 2024
@EmilienM
Copy link
Contributor Author

We need #1826 to merge first.

@huxcrux
Copy link
Contributor

huxcrux commented Feb 19, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 19, 2024
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 21, 2024
@huxcrux
Copy link
Contributor

huxcrux commented Feb 21, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2024
api/v1alpha8/openstackcluster_types.go Outdated Show resolved Hide resolved
api/v1alpha7/conversion.go Outdated Show resolved Hide resolved
api/v1alpha6/conversion.go Outdated Show resolved Hide resolved
api/v1alpha5/conversion.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2024
@EmilienM
Copy link
Contributor Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 21, 2024
@EmilienM EmilienM requested a review from mdbooth February 21, 2024 16:11
@@ -168,7 +168,7 @@ func (s *Service) generateDesiredSecGroups(openStackCluster *infrav1.OpenStackCl
controlPlaneRules = append(controlPlaneRules, getSGControlPlaneAdditionalPorts(openStackCluster.Spec.APIServerLoadBalancer.AdditionalPorts)...)
}

if openStackCluster.Spec.AllowAllInClusterTraffic {
if openStackCluster.Spec.ManagedSecurityGroups != nil && openStackCluster.Spec.ManagedSecurityGroups.AllowAllInClusterTraffic {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems odd that we'd be in this function if ManagedSecurityGroups was nil. Also we checked it explicitly at the top of the function.

Still, belt and braces is no bad thing when dereferencing a pointer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I thought the same but i'm trying to avoid pointer errors later.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 22, 2024
@huxcrux
Copy link
Contributor

huxcrux commented Feb 22, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 22, 2024
@k8s-ci-robot k8s-ci-robot merged commit 5cfeccc into kubernetes-sigs:main Feb 22, 2024
9 checks passed
@EmilienM EmilienM deleted the issue_1878 branch February 22, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Setting allowAllInClusterTraffic without managedSecurityGroups has no effect
4 participants