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

feat(teamrolebindings): allow changing namespaces for teamrolebindings #813

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Zaggy21
Copy link
Contributor

@Zaggy21 Zaggy21 commented Dec 17, 2024

Description

This PR allows changes to the .Spec.Namespaces of TeamRoleBinding. Namespaces can be changed, but the webhook denies changing the TRB from cluster-scoped to namespace-scoped (by changing initially empty Namespaces) and vice versa (by removing all namespaces).
Changes to the Namespaces of TRB are reconciled by the TeamRoleBindingController. The removal of RoleBindings from the remote cluster changed to not only relying on .Spec.Namespaces, but to take into account the RoleBindings that could've been deployed before the change (now checked by the name of RoleBindings deployed).

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help
  • Separate ticket for tests # (issue/pr)

I've added tests for the TeamRoleBinding controller and the TeamRoleBinding webhook.

Added to documentation?

  • 📜 README.md
  • 🤝 Documentation pages updated
  • 🙅 no documentation needed
  • (if applicable) generated OpenAPI docs for CRD changes

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

@Zaggy21 Zaggy21 requested a review from a team as a code owner December 17, 2024 17:25
@Zaggy21 Zaggy21 linked an issue Dec 17, 2024 that may be closed by this pull request
3 tasks
@github-actions github-actions bot added documentation Improvements or additions to documentation feature core-apis helm-charts labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-apis documentation Improvements or additions to documentation feature helm-charts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] - Allow changing Namespaces for TeamRoleBindings
2 participants