Skip to content

Commit 9e51498

Browse files
committed
Add origin types to the kubectl scheme
1 parent f268d8e commit 9e51498

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

cmd/oc/oc.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@ import (
1212
"github.com/openshift/origin/pkg/cmd/util/serviceability"
1313
"github.com/openshift/origin/pkg/oc/cli"
1414

15+
"k8s.io/kubernetes/pkg/kubectl/scheme"
16+
17+
apps "github.com/openshift/origin/pkg/apps/apis/apps/install"
18+
authz "github.com/openshift/origin/pkg/authorization/apis/authorization/install"
19+
build "github.com/openshift/origin/pkg/build/apis/build/install"
20+
image "github.com/openshift/origin/pkg/image/apis/image/install"
21+
network "github.com/openshift/origin/pkg/network/apis/network/install"
22+
oauth "github.com/openshift/origin/pkg/oauth/apis/oauth/install"
23+
project "github.com/openshift/origin/pkg/project/apis/project/install"
24+
quota "github.com/openshift/origin/pkg/quota/apis/quota/install"
25+
route "github.com/openshift/origin/pkg/route/apis/route/install"
26+
security "github.com/openshift/origin/pkg/security/apis/security/install"
27+
template "github.com/openshift/origin/pkg/template/apis/template/install"
28+
user "github.com/openshift/origin/pkg/user/apis/user/install"
29+
1530
// install all APIs
1631
_ "github.com/openshift/origin/pkg/api/install"
1732
_ "k8s.io/kubernetes/pkg/apis/autoscaling/install"
@@ -31,6 +46,20 @@ func main() {
3146
runtime.GOMAXPROCS(runtime.NumCPU())
3247
}
3348

49+
// add Origin types to the kubectl scheme
50+
apps.Install(scheme.GroupFactoryRegistry, scheme.Registry, scheme.Scheme)
51+
authz.Install(scheme.GroupFactoryRegistry, scheme.Registry, scheme.Scheme)
52+
build.Install(scheme.GroupFactoryRegistry, scheme.Registry, scheme.Scheme)
53+
image.Install(scheme.GroupFactoryRegistry, scheme.Registry, scheme.Scheme)
54+
network.Install(scheme.GroupFactoryRegistry, scheme.Registry, scheme.Scheme)
55+
oauth.Install(scheme.GroupFactoryRegistry, scheme.Registry, scheme.Scheme)
56+
project.Install(scheme.GroupFactoryRegistry, scheme.Registry, scheme.Scheme)
57+
quota.Install(scheme.GroupFactoryRegistry, scheme.Registry, scheme.Scheme)
58+
route.Install(scheme.GroupFactoryRegistry, scheme.Registry, scheme.Scheme)
59+
security.Install(scheme.GroupFactoryRegistry, scheme.Registry, scheme.Scheme)
60+
template.Install(scheme.GroupFactoryRegistry, scheme.Registry, scheme.Scheme)
61+
user.Install(scheme.GroupFactoryRegistry, scheme.Registry, scheme.Scheme)
62+
3463
basename := filepath.Base(os.Args[0])
3564
command := cli.CommandFor(basename)
3665
if err := command.Execute(); err != nil {

0 commit comments

Comments
 (0)