Skip to content

Commit 460cd25

Browse files
committed
Give system:image-builder role to backup cron job SA
Signed-off-by: David Kwon <dakwon@redhat.com>
1 parent e19b4e2 commit 460cd25

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

controllers/backupcronjob/rbac.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (r *BackupCronJobReconciler) ensureImagePushRoleBinding(ctx context.Context
9999
},
100100
RoleRef: rbacv1.RoleRef{
101101
Kind: constants.RbacClusterRoleKind,
102-
Name: common.RegistryImagePullerRoleName(),
102+
Name: common.RegistryImageBuilderRoleName(),
103103
APIGroup: "rbac.authorization.k8s.io",
104104
},
105105
}

pkg/common/naming.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ func WorkspaceSCCRolebindingName(sccName string) string {
160160
}
161161

162162
func RegistryImagePullerRoleName() string {
163-
return fmt.Sprintf("system:image-puller")
163+
return "system:image-puller"
164+
}
165+
166+
func RegistryImageBuilderRoleName() string {
167+
return "system:image-builder"
164168
}
165169

166170
func RegistryImagePullerRolebindingName(namespace string) string {

0 commit comments

Comments
 (0)