Validation: Move validation into apimachinery package (#111736)

This commit is contained in:
Ryan McKinley
2025-09-30 12:59:33 +00:00
committed by GitHub
parent d8fd872ad3
commit cfbf64c3fd
13 changed files with 379 additions and 133 deletions
+8
View File
@@ -152,6 +152,14 @@ func (b *IdentityAccessManagementAPIBuilder) AllowedV0Alpha1Resources() []string
func (b *IdentityAccessManagementAPIBuilder) UpdateAPIGroupInfo(apiGroupInfo *genericapiserver.APIGroupInfo, opts builder.APIGroupOptions) error {
storage := map[string]rest.Storage{}
// teams + users must have shorter names because they are often used as part of another name
opts.StorageOptsRegister(iamv0.TeamResourceInfo.GroupResource(), apistore.StorageOptions{
MaximumNameLength: 80,
})
opts.StorageOptsRegister(iamv0.UserResourceInfo.GroupResource(), apistore.StorageOptions{
MaximumNameLength: 80,
})
teamResource := iamv0.TeamResourceInfo
teamLegacyStore := team.NewLegacyStore(b.store, b.legacyAccessClient, b.enableAuthnMutation)
storage[teamResource.StoragePath()] = teamLegacyStore