forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apigroup.go
26 lines (23 loc) · 800 Bytes
/
apigroup.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package install
import (
"k8s.io/kubernetes/pkg/apimachinery/announced"
"k8s.io/kubernetes/pkg/util/sets"
"github.com/openshift/origin/pkg/oauth/api"
"github.com/openshift/origin/pkg/oauth/api/v1"
)
func init() {
if err := announced.NewGroupMetaFactory(
&announced.GroupMetaFactoryArgs{
GroupName: api.GroupName,
VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version},
ImportPrefix: importPrefix,
AddInternalObjectsToScheme: api.AddToScheme,
RootScopedKinds: sets.NewString("OAuthAccessToken", "OAuthAuthorizeToken", "OAuthClient", "OAuthClientAuthorization"),
},
announced.VersionToSchemeFunc{
v1.SchemeGroupVersion.Version: v1.AddToScheme,
},
).Announce().RegisterAndEnable(); err != nil {
panic(err)
}
}