Skip to content

Conversation

@blackpiglet
Copy link
Contributor

@blackpiglet blackpiglet commented Jan 7, 2026

Ensure the RBAC resources are restored before pods.

The change helps to avoid pod start error when the pod depends on the RBAC resources, e.g., Prometheus operator checks whether it has enough permission before launching the corresponding controller.
If Prometheus operator pod starts before the RBAC resources creation, it will not launch controllers, and it will not retry.

https://github.com/prometheus-operator/prometheus-operator/blob/f7f07bcdfb415aea4c87c1fb0dafe00968ad5420/cmd/operator/main.go#L392-L400

Thank you for contributing to Velero!

Please add a summary of your change

Does your change fix a particular issue?

Fixes #9471

Please indicate you've done the following:

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.53%. Comparing base (6eae73f) to head (b7289b5).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9474   +/-   ##
=======================================
  Coverage   60.53%   60.53%           
=======================================
  Files         386      386           
  Lines       36355    36355           
=======================================
  Hits        22007    22007           
  Misses      12769    12769           
  Partials     1579     1579           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

… sequence.

Ensure the RBAC resources are restored before pods.
The change help to avoid pod starting error when pod depends on the RBAC resources,
e.g., prometheus operator check whether it has enough permission before launching
controller, if prometheus operator pod starts before RBAC resources created, it
will not launch controllers, and it will not retry.
https://github.com/prometheus-operator/prometheus-operator/blob/f7f07bcdfb415aea4c87c1fb0dafe00968ad5420/cmd/operator/main.go#L392-L400

Signed-off-by: Xun Jiang <[email protected]>
@blackpiglet blackpiglet force-pushed the add_role_rolebinding_in_restore_sequence branch from ce45c18 to b7289b5 Compare January 7, 2026 04:40
@blackpiglet blackpiglet requested a review from sseago January 7, 2026 14:42
@ywk253100 ywk253100 merged commit 1feaafc into vmware-tanzu:main Jan 8, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Role/rolebinding should be restored before pod

3 participants