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

names of deleted ClusterRoleBindings are logged #569

Merged
merged 5 commits into from
Dec 17, 2024

Conversation

Disper
Copy link
Member

@Disper Disper commented Dec 16, 2024

Description

Changes proposed in this pull request:

  • names of deleted ClusterRoleBindings are logged, example:
{"level":"info","ts":"2024-12-16T13:39:15+01:00","msg":"Following CRBs were deleted","runtimeID":"bd995ed8-b126-477a-8e2d-2e965ff4775b","shootName":"c-5661efc","requestID":5,"deletedCRBs":["admin-fs8jt","admin-t6tzx"],"RuntimeCR":"bd995ed8-b126-477a-8e2d-2e965ff4775b","shoot":"c-5661efc"}

Related issue(s)
#554 #555

@Disper Disper requested a review from a team as a code owner December 16, 2024 13:34
@kyma-bot kyma-bot added cla: yes Indicates the PR's author has signed the CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 16, 2024
@kyma-bot kyma-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 17, 2024
@@ -60,6 +61,16 @@ func sFnApplyClusterRoleBindings(ctx context.Context, m *fsm, s *systemState) (s
return updateStatusAndStop()
}

func logDeletedClusterRoleBindings(removed []rbacv1.ClusterRoleBinding, m *fsm, s *systemState) {
if cap(removed) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why capacity, not length?
removed could still be empty

@kyma-bot kyma-bot added the lgtm Looks good to me! label Dec 17, 2024
@kyma-bot kyma-bot merged commit 7c764bb into kyma-project:main Dec 17, 2024
9 checks passed
@Disper Disper deleted the log_crb_deletion branch December 17, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. lgtm Looks good to me! size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants