storage capacity: GA, always enabled, remove feature check

The code and tests for scenarios where the feature is disabled are no longer
needed because the feature is graduating to GA.
This commit is contained in:
Patrick Ohly
2022-03-01 20:28:13 +01:00
parent faa027ca2b
commit 3a7deaa141
22 changed files with 74 additions and 222 deletions

View File

@@ -551,12 +551,8 @@ func ClusterRoles() []rbacv1.ClusterRole {
rbacv1helpers.NewRule(Read...).Groups(storageGroup).Resources("csinodes").RuleOrDie(),
// Needed for namespaceSelector feature in pod affinity
rbacv1helpers.NewRule(Read...).Groups(legacyGroup).Resources("namespaces").RuleOrDie(),
}
if utilfeature.DefaultFeatureGate.Enabled(features.CSIStorageCapacity) {
kubeSchedulerRules = append(kubeSchedulerRules,
rbacv1helpers.NewRule(Read...).Groups(storageGroup).Resources("csidrivers").RuleOrDie(),
rbacv1helpers.NewRule(Read...).Groups(storageGroup).Resources("csistoragecapacities").RuleOrDie(),
)
rbacv1helpers.NewRule(Read...).Groups(storageGroup).Resources("csidrivers").RuleOrDie(),
rbacv1helpers.NewRule(Read...).Groups(storageGroup).Resources("csistoragecapacities").RuleOrDie(),
}
roles = append(roles, rbacv1.ClusterRole{
// a role to use for the kube-scheduler