@@ -10,16 +10,15 @@ import (
10
10
"k8s.io/apiserver/pkg/util/logs"
11
11
"k8s.io/kubernetes/pkg/kubectl/scheme"
12
12
13
+ "github.com/openshift/api"
14
+ "github.com/openshift/api/authorization"
15
+ "github.com/openshift/api/quota"
13
16
"github.com/openshift/library-go/pkg/serviceability"
17
+ "github.com/openshift/origin/pkg/api/install"
18
+ "github.com/openshift/origin/pkg/api/legacy"
14
19
"github.com/openshift/origin/pkg/oc/cli"
15
20
"github.com/openshift/origin/pkg/version"
16
-
17
- // install all APIs
18
- apiinstall "github.com/openshift/origin/pkg/api/install"
19
- _ "k8s.io/kubernetes/pkg/apis/autoscaling/install"
20
- _ "k8s.io/kubernetes/pkg/apis/batch/install"
21
- _ "k8s.io/kubernetes/pkg/apis/core/install"
22
- _ "k8s.io/kubernetes/pkg/apis/extensions/install"
21
+ "k8s.io/kubernetes/pkg/api/legacyscheme"
23
22
)
24
23
25
24
func main () {
@@ -33,7 +32,17 @@ func main() {
33
32
runtime .GOMAXPROCS (runtime .NumCPU ())
34
33
}
35
34
36
- apiinstall .InstallAll (scheme .Scheme )
35
+ // the kubectl scheme expects to have all the recognizable external types it needs to consume. Install those here.
36
+ api .Install (scheme .Scheme )
37
+ legacy .InstallExternalLegacyAll (scheme .Scheme )
38
+ // TODO fix up the install for the "all types"
39
+ authorization .Install (scheme .Scheme )
40
+ quota .Install (scheme .Scheme )
41
+
42
+ // the legacyscheme is used in kubectl and expects to have the internal types registered. Explicitly wire our types here.
43
+ // this does
44
+ install .InstallInternalOpenShift (legacyscheme .Scheme )
45
+ legacy .InstallInternalLegacyAll (scheme .Scheme )
37
46
38
47
basename := filepath .Base (os .Args [0 ])
39
48
command := cli .CommandFor (basename )
0 commit comments