From b188701862ffd66376d89896fd84a87e0e6c70a5 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Wed, 7 Jan 2026 01:15:11 +0800 Subject: [PATCH] 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 --- changelogs/CHANGELOG-1.17.md | 1 + pkg/cmd/server/config/config.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/changelogs/CHANGELOG-1.17.md b/changelogs/CHANGELOG-1.17.md index c5ba4d6a0..fa658a5eb 100644 --- a/changelogs/CHANGELOG-1.17.md +++ b/changelogs/CHANGELOG-1.17.md @@ -16,6 +16,7 @@ https://velero.io/docs/v1.17/upgrade-to-1.17/ * Track actual resource names for GenerateName in restore status (#9409, @shubham-pampattiwar) * Fix managed fields patch for resources using GenerateName (#9408, @shubham-pampattiwar) * don't copy securitycontext from first container if configmap found (#9394, @sseago) + * Add Role, RoleBinding, ClusterRole, and ClusterRoleBinding in restore sequence. (#9479, @blackpiglet) ## v1.17.1 diff --git a/pkg/cmd/server/config/config.go b/pkg/cmd/server/config/config.go index 401a89632..36176228b 100644 --- a/pkg/cmd/server/config/config.go +++ b/pkg/cmd/server/config/config.go @@ -113,7 +113,11 @@ var ( "datauploads.velero.io", "persistentvolumes", "persistentvolumeclaims", + "clusterroles", + "roles", "serviceaccounts", + "clusterrolebindings", + "rolebindings", "secrets", "configmaps", "limitranges",