Add Role, RoleBinding, ClusterRole, and ClusterRoleBinding in restore 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 <xun.jiang@broadcom.com>
This commit is contained in:
Xun Jiang
2026-01-07 12:40:23 +08:00
parent 6eae73f0bf
commit b7289b51c7
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
Add Role, RoleBinding, ClusterRole, and ClusterRoleBinding in restore sequence.
+4
View File
@@ -115,7 +115,11 @@ var (
"datauploads.velero.io",
"persistentvolumes",
"persistentvolumeclaims",
"clusterroles",
"roles",
"serviceaccounts",
"clusterrolebindings",
"rolebindings",
"secrets",
"configmaps",
"limitranges",