mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
separate announce factories
This commit is contained in:
@@ -29,11 +29,11 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
Install(api.Registry, api.Scheme)
|
||||
Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
|
||||
}
|
||||
|
||||
// Install registers the API group and adds types to a scheme
|
||||
func Install(registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
|
||||
func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
|
||||
if err := announced.NewGroupMetaFactory(
|
||||
&announced.GroupMetaFactoryArgs{
|
||||
GroupName: batch.GroupName,
|
||||
@@ -45,7 +45,7 @@ func Install(registry *registered.APIRegistrationManager, scheme *runtime.Scheme
|
||||
v1.SchemeGroupVersion.Version: v1.AddToScheme,
|
||||
v2alpha1.SchemeGroupVersion.Version: v2alpha1.AddToScheme,
|
||||
},
|
||||
).Announce().RegisterAndEnable(registry, scheme); err != nil {
|
||||
).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user