Fix Provisioner cluster role binding creation process
This is a Follow Up story after fixing issue 1912:
Description:
Provisioner is responsible for initial setup of the created Kyma Runtime.
There was once introduced functionality to dynamically update list of runtime administrators by the Provisioner during Upgrade Shoot API call. This code was supposed to create and label required ClusterRoles and ClusterRoleBindings to generate correct set of administrators accounts during creation/update of the managed Kyma Runtime.
Code responsible for creating ClusterRoles and ClusterRole bindings can be found here: https://github.com/kyma-project/control-plane/blob/main/components/provisioner/internal/operations/stages/provisioning/create_operators_bindings.go
Problems with code:
- Mixed responsibility - same step is evenly executed after creation of Kyma Runtime and when Gardener Shoot is updated. Expected results are different. This can be treated as of violation Single Responsibility Principle.
- Code does not works to handle correctly updates of list of SKR administrators. Bindings must be added manually by the first administrator when new administrators. It is not obvious for the user. It is possible that provisioner API is not called properly when the list of subaccount administrator is changed
- Created ClusterRules are not labeled according to convention with label
reconciler.kyma-project.io/managed-by=reconciler - Code is not covered properly with Unit Tests
Suggested solution:
- Check with other teams what is the current state of functionality to update list of administrators of SKR with Provisioner.
- Refactor the code. A. If Provisioner is not able to dynamically update runtime bindings - consider removing execution path for shoot upgrade. B. If Provisioner is somehow able to dynamically update runtime bindings - Consider refactoring of the code by splitting it into two separate operations executed on different stages of Kyma runtime
- Add label
reconciler.kyma-project.io/managed-by=reconcilerfor createdClusterRules - Cover code with unit tests
[Moved from Provisioner to KIM]
This issue or PR has been automatically marked as stale due to the lack of recent activity. Thank you for your contributions.
This bot triages issues and PRs according to the following rules:
- After 60d of inactivity,
lifecycle/staleis applied - After 7d of inactivity since
lifecycle/stalewas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Close this issue or PR with
/close
If you think that I work incorrectly, kindly raise an issue with the problem.
/lifecycle stale
This issue or PR has been automatically closed due to the lack of activity. Thank you for your contributions.
This bot triages issues and PRs according to the following rules:
- After 60d of inactivity,
lifecycle/staleis applied - After 7d of inactivity since
lifecycle/stalewas applied, the issue is closed
You can:
- Reopen this issue or PR with
/reopen - Mark this issue or PR as fresh with
/remove-lifecycle stale
If you think that I work incorrectly, kindly raise an issue with the problem.
/close
@kyma-bot: Closing this issue.
In response to this:
This issue or PR has been automatically closed due to the lack of activity. Thank you for your contributions.
This bot triages issues and PRs according to the following rules:
- After 60d of inactivity,
lifecycle/staleis applied- After 7d of inactivity since
lifecycle/stalewas applied, the issue is closedYou can:
- Reopen this issue or PR with
/reopen- Mark this issue or PR as fresh with
/remove-lifecycle staleIf you think that I work incorrectly, kindly raise an issue with the problem.
/close
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.
This issue or PR has been automatically closed due to the lack of activity. Thank you for your contributions.
This bot triages issues and PRs according to the following rules:
- After 60d of inactivity,
lifecycle/staleis applied - After 7d of inactivity since
lifecycle/stalewas applied, the issue is closed
You can:
- Reopen this issue or PR with
/reopen - Mark this issue or PR as fresh with
/remove-lifecycle stale
If you think that I work incorrectly, kindly raise an issue with the problem.
/close
@kyma-bot: Closing this issue.
In response to this:
This issue or PR has been automatically closed due to the lack of activity. Thank you for your contributions.
This bot triages issues and PRs according to the following rules:
- After 60d of inactivity,
lifecycle/staleis applied- After 7d of inactivity since
lifecycle/stalewas applied, the issue is closedYou can:
- Reopen this issue or PR with
/reopen- Mark this issue or PR as fresh with
/remove-lifecycle staleIf you think that I work incorrectly, kindly raise an issue with the problem.
/close
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.
@koala7659 : could we keep this closed as the provision has reached End-Of-Life soon?
@tobiscr I think we should close this. This code is being gradually removed (. https://github.com/kyma-project/control-plane/pull/3438/files) and soon will be fully replaced with new infrastructure-manager service