clear resourceversion for migrated cluster roles

pull/6/head
David Eads 2017-11-22 16:16:01 -05:00
parent c45820f0c8
commit c22fbadc0f
1 changed files with 1 additions and 0 deletions

View File

@ -343,6 +343,7 @@ func primeAggregatedClusterRoles(clusterRolesToAggregate map[string]string, clus
}
glog.V(1).Infof("migrating %v to %v", existingRole.Name, newName)
existingRole.Name = newName
existingRole.ResourceVersion = "" // clear this so the object can be created.
if _, err := clusterRoleClient.ClusterRoles().Create(existingRole); err != nil && !apierrors.IsAlreadyExists(err) {
return err
}