Merge pull request #114116 from jsafrane/fix-pvc-autodelete

Fix OwnerReferencesPermissionEnforcement complaints when autodeleting PVCs
This commit is contained in:
Kubernetes Prow Robot 2022-12-10 06:04:40 -08:00 committed by GitHub
commit 6edb35d63e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -384,7 +384,7 @@ func buildControllerRoles() ([]rbacv1.ClusterRole, []rbacv1.ClusterRoleBinding)
}
if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) {
role.Rules = append(role.Rules, rbacv1helpers.NewRule("update").Groups(legacyGroup).Resources("persistentvolumeclaims").RuleOrDie())
role.Rules = append(role.Rules, rbacv1helpers.NewRule("update", "delete").Groups(legacyGroup).Resources("persistentvolumeclaims").RuleOrDie())
}
return role