add unit tests for NewControllerDescriptors

- controller descriptors should not be feature gated
- aliases should not be defined for new controllers and have only a
  canonical name
This commit is contained in:
Filip Křepinský
2023-09-19 13:31:02 +02:00
parent 44cac26667
commit 1591a0e132
2 changed files with 62 additions and 2 deletions

View File

@@ -427,7 +427,7 @@ func newResourceClaimControllerDescriptor() *ControllerDescriptor {
aliases: []string{"resource-claim-controller"},
initFunc: startResourceClaimController,
requiredFeatureGates: []featuregate.Feature{
features.DynamicResourceAllocation,
features.DynamicResourceAllocation, // TODO update app.TestFeatureGatedControllersShouldNotDefineAliases when removing this feature
},
}
}
@@ -738,7 +738,7 @@ func newLegacyServiceAccountTokenCleanerControllerDescriptor() *ControllerDescri
aliases: []string{"legacy-service-account-token-cleaner"},
initFunc: startLegacyServiceAccountTokenCleanerController,
requiredFeatureGates: []featuregate.Feature{
features.LegacyServiceAccountTokenCleanUp,
features.LegacyServiceAccountTokenCleanUp, // TODO update app.TestFeatureGatedControllersShouldNotDefineAliases when removing this feature
},
}
}