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

🌱 Redundant IP claims and related RBAC policies #2056

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ksahil12
Copy link

Removed RBAC rules are not being utilized by operator and hence can be cleaned up. It includes:

  1. ipclaims
  2. ipaddresses
  3. ipaddressclaims

What this PR does / why we need it:

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 #

Removed RBAC rules are not being utilized by operator and hence can be cleaned up.
It includes:
1. ipclaims
2. ipaddresses
3. ipaddressclaims
@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign tuminoid for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@metal3-io-bot
Copy link
Contributor

Hi @ksahil12. Thanks for your PR.

I'm waiting for a metal3-io 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-sigs/prow repository.

@metal3-io-bot metal3-io-bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 28, 2024
@ksahil12 ksahil12 changed the title Redundant IP claims and related RBAC policies 🌱 Redundant IP claims and related RBAC policies Oct 28, 2024
@tuminoid
Copy link
Member

/ok-to-test
/test metal3-centos-e2e-integration-test-main

Please sign off the commit to pass DCO.

/cc @kashifest

@metal3-io-bot metal3-io-bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 28, 2024
@Rozzii
Copy link
Member

Rozzii commented Oct 30, 2024

/retest

@metal3-io-bot
Copy link
Contributor

@ksahil12: 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
generate 5fa1e8a link true /test generate

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

Copy link
Member

@Rozzii Rozzii left a 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 this is actually correct.
These comments are not in the file that I would expect them to be but they are also no repeated elswhere.
Simply deleting them won't be enough, I will look into this in a bit more detail.
/hold

@metal3-io-bot metal3-io-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 30, 2024
@adilGhaffarDev
Copy link
Member

adilGhaffarDev commented Oct 30, 2024

I don't think this is actually correct.
These comments are not in the file that I would expect them to be but they are also no repeated elswhere.
Simply deleting them won't be enough, I will look into this in a bit more detail.

@ksahil12 you have to run "make generate" after removing the comments, this will update rbacs in the config. However, I think this change will break CAPM3 because we need these rbacs for Metal3Data.

@Rozzii
Copy link
Member

Rozzii commented Oct 30, 2024

After looking into it a bit more, these are package level kubebuilder tags: https://book.kubebuilder.io/reference/markers/rbac.html .
Functionally nothing would change if we would move these commands to a different file, and these tags are certainly not redundant this is the only place where they are listed.

This change would only make sense if the tags would be moved to an other .go file within the package where the IPAM related resources are actually accessed but even then it would be just a syntax change no functional change .

Also just by removing the kubebuilder tag commands without running "make generate" on the repo, the actual RBAC boilerplate code wouldn't be re-generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants