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

Create or delete RoleBindings in a Profile based on the PMR #11

Open
kimwnasptd opened this issue Nov 26, 2024 · 1 comment · May be fixed by #36
Open

Create or delete RoleBindings in a Profile based on the PMR #11

kimwnasptd opened this issue Nov 26, 2024 · 1 comment · May be fixed by #36
Labels
enhancement New feature or request

Comments

@kimwnasptd
Copy link
Contributor

kimwnasptd commented Nov 26, 2024

Context

This is a sub-step for the common library that handles a PMR #8

In this step the create_or_udpate_profiles(pmr) function needs to be able to

  1. delete contributor RoleBindings that exist in a namespace, but for which no contributor is defined in the PMR
  2. create contributor RoleBindings in a namespace, if defined in the PMR

Note that we can't update the roleRef in a RoleBinding, thus even for updating existing RoleBindings we'll need to delete and re-apply them.

What needs to get done

the create_or_update_profiles(pmr) function:

  1. Parses the cluster's contributor RoleBindings
  2. If the user defined in the RoleBinding is not defined in the PMR, then the RoleBinding is deleted
  3. Parse the PMR contributors
  4. Create a RoleBinding for he contributor, if the RoleBinding doesn't already exist.

Definition of Done

  1. There are integration tests for the above case
  2. The code for the above behavior is merged
@kimwnasptd kimwnasptd added the enhancement New feature or request label Nov 26, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-6596.

This message was autogenerated

@kimwnasptd kimwnasptd changed the title Remove contributor RoleBindings when contributor not defined in PMR Create or delete RoleBindings in a Profile based on the PMR Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant