Skip to content

fix(rbac): add events.k8s.io RBAC marker#72

Merged
Zaggy21 merged 2 commits into
mainfrom
fix/rbac-events-k8s-io-marker
Jul 9, 2026
Merged

fix(rbac): add events.k8s.io RBAC marker#72
Zaggy21 merged 2 commits into
mainfrom
fix/rbac-events-k8s-io-marker

Conversation

@Zaggy21

@Zaggy21 Zaggy21 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

I added events.k8s.io RBAC marker and regenerated role.yaml.

This fix is done because there appeared logs like: User \"system:serviceaccount:greenhouse:shoot-grafter\" cannot patch resource \"events\" in API group \"events.k8s.io\".

On-behalf-of: @SAP krzysztof.zagorski@sap.com
Signed-off-by: Zaggy21 <k.zaggy@gmail.com>
Copilot AI review requested due to automatic review settings July 8, 2026 14:04
@Zaggy21
Zaggy21 requested a review from a team as a code owner July 8, 2026 14:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds missing RBAC permissions for emitting/patching Kubernetes Events in the events.k8s.io API group, addressing authorization errors observed at runtime.

Changes:

  • Add a //+kubebuilder:rbac marker for events.k8s.io Events in the CareInstruction controller.
  • Regenerate config/rbac/role.yaml to include events.k8s.io in the manager ClusterRole rules.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
controller/careinstruction/careinstruction_controller.go Adds the events.k8s.io RBAC marker for Events.
config/rbac/role.yaml Regenerated ClusterRole rules to include events.k8s.io Events permissions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread controller/careinstruction/careinstruction_controller.go Outdated
uwe-mayer
uwe-mayer previously approved these changes Jul 8, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Krzysztof Zagorski <k.zaggy@gmail.com>
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
shoot-grafter/controller/careinstruction 74.61% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
shoot-grafter/controller/careinstruction/careinstruction_controller.go 74.02% (ø) 254 188 66

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@k-fabryczny
k-fabryczny self-requested a review July 9, 2026 08:26
@Zaggy21
Zaggy21 merged commit 22153dd into main Jul 9, 2026
7 checks passed
@jellonek
jellonek deleted the fix/rbac-events-k8s-io-marker branch July 9, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 [BUG shoot-grafter] - AuthCM changes not propagated to Garden cluster

4 participants