forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathregister.go
62 lines (52 loc) · 1.64 KB
/
register.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package v1
import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
coreinternalconversions "k8s.io/kubernetes/pkg/apis/core"
buildv1 "github.com/openshift/api/build/v1"
buildinternalconversions "github.com/openshift/origin/pkg/build/apis/build/v1"
"github.com/openshift/origin/pkg/cmd/server/apis/config"
)
var (
// Legacy is the 'v1' apiVersion of config
LegacyGroupName = ""
LegacySchemeGroupVersion = schema.GroupVersion{Group: LegacyGroupName, Version: "v1"}
legacySchemeBuilder = runtime.NewSchemeBuilder(
addKnownTypesToLegacy,
config.InstallLegacy,
coreinternalconversions.AddToScheme,
buildinternalconversions.Install,
addConversionFuncs,
addDefaultingFuncs,
)
InstallLegacy = legacySchemeBuilder.AddToScheme
externalLegacySchemeBuilder = runtime.NewSchemeBuilder(
addKnownTypesToLegacy,
buildv1.Install,
)
InstallLegacyExternal = externalLegacySchemeBuilder.AddToScheme
)
// Adds the list of known types to api.Scheme.
func addKnownTypesToLegacy(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(LegacySchemeGroupVersion,
&MasterConfig{},
&NodeConfig{},
&SessionSecrets{},
&BasicAuthPasswordIdentityProvider{},
&AllowAllPasswordIdentityProvider{},
&DenyAllPasswordIdentityProvider{},
&HTPasswdPasswordIdentityProvider{},
&LDAPPasswordIdentityProvider{},
&KeystonePasswordIdentityProvider{},
&RequestHeaderIdentityProvider{},
&GitHubIdentityProvider{},
&GitLabIdentityProvider{},
&GoogleIdentityProvider{},
&OpenIDIdentityProvider{},
&LDAPSyncConfig{},
&DefaultAdmissionConfig{},
&BuildDefaultsConfig{},
&BuildOverridesConfig{},
)
return nil
}