diff --git a/cmd/ks-apiserver/app/server.go b/cmd/ks-apiserver/app/server.go index a9a985e9a..5a7f789f6 100644 --- a/cmd/ks-apiserver/app/server.go +++ b/cmd/ks-apiserver/app/server.go @@ -29,6 +29,7 @@ import ( "kubesphere.io/kubesphere/pkg/apiserver/runtime" "kubesphere.io/kubesphere/pkg/apiserver/servicemesh/tracing" "kubesphere.io/kubesphere/pkg/informers" + "kubesphere.io/kubesphere/pkg/kapis" "kubesphere.io/kubesphere/pkg/server" apiserverconfig "kubesphere.io/kubesphere/pkg/server/config" "kubesphere.io/kubesphere/pkg/server/filter" @@ -36,8 +37,6 @@ import ( "kubesphere.io/kubesphere/pkg/utils/signals" "kubesphere.io/kubesphere/pkg/utils/term" "net/http" - - "kubesphere.io/kubesphere/pkg/apis" ) func NewAPIServerCommand() *cobra.Command { @@ -134,7 +133,7 @@ func CreateAPIServer(s *options.ServerRunOptions) error { container.Filter(filter.Logging) container.RecoverHandler(server.LogStackOnRecover) - apis.InstallAPIs(container) + kapis.InstallAPIs(container) // install config api apiserverconfig.InstallAPI(container) diff --git a/cmd/ks-iam/app/server.go b/cmd/ks-iam/app/server.go index 4a745ab86..89db7d97b 100644 --- a/cmd/ks-iam/app/server.go +++ b/cmd/ks-iam/app/server.go @@ -24,9 +24,9 @@ import ( cliflag "k8s.io/component-base/cli/flag" "k8s.io/klog" "kubesphere.io/kubesphere/cmd/ks-iam/app/options" - "kubesphere.io/kubesphere/pkg/apis" "kubesphere.io/kubesphere/pkg/apiserver/runtime" "kubesphere.io/kubesphere/pkg/informers" + "kubesphere.io/kubesphere/pkg/kapis" "kubesphere.io/kubesphere/pkg/models/iam" "kubesphere.io/kubesphere/pkg/server" apiserverconfig "kubesphere.io/kubesphere/pkg/server/config" @@ -107,7 +107,7 @@ func Run(s *options.ServerRunOptions, stopChan <-chan struct{}) error { container.DoNotRecover(false) container.RecoverHandler(server.LogStackOnRecover) - apis.InstallAuthorizationAPIs(container) + kapis.InstallAuthorizationAPIs(container) if s.GenericServerRunOptions.InsecurePort != 0 { klog.Infof("Server listening on %s:%d ", s.GenericServerRunOptions.BindAddress, s.GenericServerRunOptions.InsecurePort) diff --git a/pkg/apis/logging/install/install.go b/pkg/apis/logging/install/install.go deleted file mode 100644 index 27e393b50..000000000 --- a/pkg/apis/logging/install/install.go +++ /dev/null @@ -1,33 +0,0 @@ -/* - - Copyright 2019 The KubeSphere Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*/ -package install - -import ( - "github.com/emicklei/go-restful" - urlruntime "k8s.io/apimachinery/pkg/util/runtime" - loggingv1alpha2 "kubesphere.io/kubesphere/pkg/apis/logging/v1alpha2" - "kubesphere.io/kubesphere/pkg/apiserver/runtime" -) - -func init() { - Install(runtime.Container) -} - -func Install(container *restful.Container) { - urlruntime.Must(loggingv1alpha2.AddToContainer(container)) -} diff --git a/pkg/apis/monitoring/install/install.go b/pkg/apis/monitoring/install/install.go deleted file mode 100644 index 4d9ce94ad..000000000 --- a/pkg/apis/monitoring/install/install.go +++ /dev/null @@ -1,33 +0,0 @@ -/* - - Copyright 2019 The KubeSphere Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*/ -package install - -import ( - "github.com/emicklei/go-restful" - urlruntime "k8s.io/apimachinery/pkg/util/runtime" - monitoringv1alpha2 "kubesphere.io/kubesphere/pkg/apis/monitoring/v1alpha2" - "kubesphere.io/kubesphere/pkg/apiserver/runtime" -) - -func init() { - Install(runtime.Container) -} - -func Install(container *restful.Container) { - urlruntime.Must(monitoringv1alpha2.AddToContainer(container)) -} diff --git a/pkg/apis/operations/install/install.go b/pkg/apis/operations/install/install.go deleted file mode 100644 index f893998c6..000000000 --- a/pkg/apis/operations/install/install.go +++ /dev/null @@ -1,33 +0,0 @@ -/* - - Copyright 2019 The KubeSphere Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*/ -package install - -import ( - "github.com/emicklei/go-restful" - urlruntime "k8s.io/apimachinery/pkg/util/runtime" - operationsv1alpha2 "kubesphere.io/kubesphere/pkg/apis/operations/v1alpha2" - "kubesphere.io/kubesphere/pkg/apiserver/runtime" -) - -func init() { - Install(runtime.Container) -} - -func Install(container *restful.Container) { - urlruntime.Must(operationsv1alpha2.AddToContainer(container)) -} diff --git a/pkg/kapis/devops/group.go b/pkg/kapis/devops/group.go new file mode 100644 index 000000000..4de4837bf --- /dev/null +++ b/pkg/kapis/devops/group.go @@ -0,0 +1,17 @@ +/* +Copyright 2019 The KubeSphere authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package devops diff --git a/pkg/apis/iam/install/install.go b/pkg/kapis/devops/install/install.go similarity index 87% rename from pkg/apis/iam/install/install.go rename to pkg/kapis/devops/install/install.go index 984a97523..8174c03f0 100644 --- a/pkg/apis/iam/install/install.go +++ b/pkg/kapis/devops/install/install.go @@ -15,13 +15,14 @@ limitations under the License. */ + package install import ( "github.com/emicklei/go-restful" urlruntime "k8s.io/apimachinery/pkg/util/runtime" - iamv1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2" "kubesphere.io/kubesphere/pkg/apiserver/runtime" + "kubesphere.io/kubesphere/pkg/kapis/devops/v1alpha2" ) func init() { @@ -29,5 +30,5 @@ func init() { } func Install(container *restful.Container) { - urlruntime.Must(iamv1alpha2.AddToContainer(container)) + urlruntime.Must(v1alpha2.AddToContainer(container)) } diff --git a/pkg/apis/devops/v1alpha2/register.go b/pkg/kapis/devops/v1alpha2/register.go similarity index 100% rename from pkg/apis/devops/v1alpha2/register.go rename to pkg/kapis/devops/v1alpha2/register.go diff --git a/pkg/apis/iam/group.go b/pkg/kapis/iam/group.go similarity index 100% rename from pkg/apis/iam/group.go rename to pkg/kapis/iam/group.go diff --git a/pkg/apis/openpitrix/install/install.go b/pkg/kapis/iam/install/install.go similarity index 87% rename from pkg/apis/openpitrix/install/install.go rename to pkg/kapis/iam/install/install.go index 5f436be1e..4e4df52af 100644 --- a/pkg/apis/openpitrix/install/install.go +++ b/pkg/kapis/iam/install/install.go @@ -20,8 +20,8 @@ package install import ( "github.com/emicklei/go-restful" urlruntime "k8s.io/apimachinery/pkg/util/runtime" - openpitrixv1 "kubesphere.io/kubesphere/pkg/apis/openpitrix/v1" "kubesphere.io/kubesphere/pkg/apiserver/runtime" + "kubesphere.io/kubesphere/pkg/kapis/iam/v1alpha2" ) func init() { @@ -29,5 +29,5 @@ func init() { } func Install(container *restful.Container) { - urlruntime.Must(openpitrixv1.AddToContainer(container)) + urlruntime.Must(v1alpha2.AddToContainer(container)) } diff --git a/pkg/apis/iam/v1alpha2/register.go b/pkg/kapis/iam/v1alpha2/register.go similarity index 100% rename from pkg/apis/iam/v1alpha2/register.go rename to pkg/kapis/iam/v1alpha2/register.go diff --git a/pkg/apis/kapis.go b/pkg/kapis/kapis.go similarity index 52% rename from pkg/apis/kapis.go rename to pkg/kapis/kapis.go index 75f8104b9..1e8d81ca5 100644 --- a/pkg/apis/kapis.go +++ b/pkg/kapis/kapis.go @@ -1,18 +1,18 @@ -package apis +package kapis import ( "github.com/emicklei/go-restful" urlruntime "k8s.io/apimachinery/pkg/util/runtime" - devopsv1alpha2 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha2" - iamv1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2" - loggingv1alpha2 "kubesphere.io/kubesphere/pkg/apis/logging/v1alpha2" - monitoringv1alpha2 "kubesphere.io/kubesphere/pkg/apis/monitoring/v1alpha2" - openpitrixv1 "kubesphere.io/kubesphere/pkg/apis/openpitrix/v1" - operationsv1alpha2 "kubesphere.io/kubesphere/pkg/apis/operations/v1alpha2" - resourcesv1alpha2 "kubesphere.io/kubesphere/pkg/apis/resources/v1alpha2" - servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/apis/servicemesh/metrics/v1alpha2" - tenantv1alpha2 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha2" - terminalv1alpha2 "kubesphere.io/kubesphere/pkg/apis/terminal/v1alpha2" + devopsv1alpha2 "kubesphere.io/kubesphere/pkg/kapis/devops/v1alpha2" + iamv1alpha2 "kubesphere.io/kubesphere/pkg/kapis/iam/v1alpha2" + loggingv1alpha2 "kubesphere.io/kubesphere/pkg/kapis/logging/v1alpha2" + monitoringv1alpha2 "kubesphere.io/kubesphere/pkg/kapis/monitoring/v1alpha2" + openpitrixv1 "kubesphere.io/kubesphere/pkg/kapis/openpitrix/v1" + operationsv1alpha2 "kubesphere.io/kubesphere/pkg/kapis/operations/v1alpha2" + resourcesv1alpha2 "kubesphere.io/kubesphere/pkg/kapis/resources/v1alpha2" + servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/kapis/servicemesh/metrics/v1alpha2" + tenantv1alpha2 "kubesphere.io/kubesphere/pkg/kapis/tenant/v1alpha2" + terminalv1alpha2 "kubesphere.io/kubesphere/pkg/kapis/terminal/v1alpha2" ) func InstallAPIs(container *restful.Container) { diff --git a/pkg/apis/logging/group.go b/pkg/kapis/logging/group.go similarity index 100% rename from pkg/apis/logging/group.go rename to pkg/kapis/logging/group.go diff --git a/pkg/apis/devops/install/install.go b/pkg/kapis/logging/install/install.go similarity index 86% rename from pkg/apis/devops/install/install.go rename to pkg/kapis/logging/install/install.go index 306edb599..999daa8e5 100644 --- a/pkg/apis/devops/install/install.go +++ b/pkg/kapis/logging/install/install.go @@ -15,14 +15,13 @@ limitations under the License. */ - package install import ( "github.com/emicklei/go-restful" urlruntime "k8s.io/apimachinery/pkg/util/runtime" - devopsv1alpha2 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha2" "kubesphere.io/kubesphere/pkg/apiserver/runtime" + "kubesphere.io/kubesphere/pkg/kapis/logging/v1alpha2" ) func init() { @@ -30,5 +29,5 @@ func init() { } func Install(container *restful.Container) { - urlruntime.Must(devopsv1alpha2.AddToContainer(container)) + urlruntime.Must(v1alpha2.AddToContainer(container)) } diff --git a/pkg/apis/logging/v1alpha2/register.go b/pkg/kapis/logging/v1alpha2/register.go similarity index 100% rename from pkg/apis/logging/v1alpha2/register.go rename to pkg/kapis/logging/v1alpha2/register.go diff --git a/pkg/apis/monitoring/group.go b/pkg/kapis/monitoring/group.go similarity index 100% rename from pkg/apis/monitoring/group.go rename to pkg/kapis/monitoring/group.go diff --git a/pkg/kapis/monitoring/install/install.go b/pkg/kapis/monitoring/install/install.go new file mode 100644 index 000000000..c1c15e8ae --- /dev/null +++ b/pkg/kapis/monitoring/install/install.go @@ -0,0 +1,33 @@ +/* + + Copyright 2019 The KubeSphere Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +package install + +import ( + "github.com/emicklei/go-restful" + urlruntime "k8s.io/apimachinery/pkg/util/runtime" + "kubesphere.io/kubesphere/pkg/apiserver/runtime" + "kubesphere.io/kubesphere/pkg/kapis/monitoring/v1alpha2" +) + +func init() { + Install(runtime.Container) +} + +func Install(container *restful.Container) { + urlruntime.Must(v1alpha2.AddToContainer(container)) +} diff --git a/pkg/apis/monitoring/v1alpha2/register.go b/pkg/kapis/monitoring/v1alpha2/register.go similarity index 100% rename from pkg/apis/monitoring/v1alpha2/register.go rename to pkg/kapis/monitoring/v1alpha2/register.go diff --git a/pkg/apis/openpitrix/group.go b/pkg/kapis/openpitrix/group.go similarity index 100% rename from pkg/apis/openpitrix/group.go rename to pkg/kapis/openpitrix/group.go diff --git a/pkg/kapis/openpitrix/install/install.go b/pkg/kapis/openpitrix/install/install.go new file mode 100644 index 000000000..6193817d8 --- /dev/null +++ b/pkg/kapis/openpitrix/install/install.go @@ -0,0 +1,33 @@ +/* + + Copyright 2019 The KubeSphere Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +package install + +import ( + "github.com/emicklei/go-restful" + urlruntime "k8s.io/apimachinery/pkg/util/runtime" + "kubesphere.io/kubesphere/pkg/apiserver/runtime" + "kubesphere.io/kubesphere/pkg/kapis/openpitrix/v1" +) + +func init() { + Install(runtime.Container) +} + +func Install(container *restful.Container) { + urlruntime.Must(v1.AddToContainer(container)) +} diff --git a/pkg/apis/openpitrix/v1/register.go b/pkg/kapis/openpitrix/v1/register.go similarity index 100% rename from pkg/apis/openpitrix/v1/register.go rename to pkg/kapis/openpitrix/v1/register.go diff --git a/pkg/apis/operations/group.go b/pkg/kapis/operations/group.go similarity index 100% rename from pkg/apis/operations/group.go rename to pkg/kapis/operations/group.go diff --git a/pkg/kapis/operations/install/install.go b/pkg/kapis/operations/install/install.go new file mode 100644 index 000000000..ca8bcfde4 --- /dev/null +++ b/pkg/kapis/operations/install/install.go @@ -0,0 +1,33 @@ +/* + + Copyright 2019 The KubeSphere Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ +package install + +import ( + "github.com/emicklei/go-restful" + urlruntime "k8s.io/apimachinery/pkg/util/runtime" + "kubesphere.io/kubesphere/pkg/apiserver/runtime" + "kubesphere.io/kubesphere/pkg/kapis/operations/v1alpha2" +) + +func init() { + Install(runtime.Container) +} + +func Install(container *restful.Container) { + urlruntime.Must(v1alpha2.AddToContainer(container)) +} diff --git a/pkg/apis/operations/v1alpha2/register.go b/pkg/kapis/operations/v1alpha2/register.go similarity index 100% rename from pkg/apis/operations/v1alpha2/register.go rename to pkg/kapis/operations/v1alpha2/register.go diff --git a/pkg/apis/resources/group.go b/pkg/kapis/resources/group.go similarity index 100% rename from pkg/apis/resources/group.go rename to pkg/kapis/resources/group.go diff --git a/pkg/apis/terminal/install/install.go b/pkg/kapis/resources/install/install.go similarity index 86% rename from pkg/apis/terminal/install/install.go rename to pkg/kapis/resources/install/install.go index 91877c445..85400efb9 100644 --- a/pkg/apis/terminal/install/install.go +++ b/pkg/kapis/resources/install/install.go @@ -20,8 +20,8 @@ package install import ( "github.com/emicklei/go-restful" urlruntime "k8s.io/apimachinery/pkg/util/runtime" - terminalv1alpha2 "kubesphere.io/kubesphere/pkg/apis/terminal/v1alpha2" "kubesphere.io/kubesphere/pkg/apiserver/runtime" + "kubesphere.io/kubesphere/pkg/kapis/resources/v1alpha2" ) func init() { @@ -29,5 +29,5 @@ func init() { } func Install(c *restful.Container) { - urlruntime.Must(terminalv1alpha2.AddToContainer(c)) + urlruntime.Must(v1alpha2.AddToContainer(c)) } diff --git a/pkg/apis/resources/v1alpha2/register.go b/pkg/kapis/resources/v1alpha2/register.go similarity index 100% rename from pkg/apis/resources/v1alpha2/register.go rename to pkg/kapis/resources/v1alpha2/register.go diff --git a/pkg/apis/servicemesh/metrics/group.go b/pkg/kapis/servicemesh/metrics/group.go similarity index 100% rename from pkg/apis/servicemesh/metrics/group.go rename to pkg/kapis/servicemesh/metrics/group.go diff --git a/pkg/apis/servicemesh/metrics/install/install.go b/pkg/kapis/servicemesh/metrics/install/install.go similarity index 81% rename from pkg/apis/servicemesh/metrics/install/install.go rename to pkg/kapis/servicemesh/metrics/install/install.go index 3e6563e53..5c5a18365 100644 --- a/pkg/apis/servicemesh/metrics/install/install.go +++ b/pkg/kapis/servicemesh/metrics/install/install.go @@ -3,8 +3,8 @@ package install import ( "github.com/emicklei/go-restful" urlruntime "k8s.io/apimachinery/pkg/util/runtime" - "kubesphere.io/kubesphere/pkg/apis/servicemesh/metrics/v1alpha2" "kubesphere.io/kubesphere/pkg/apiserver/runtime" + "kubesphere.io/kubesphere/pkg/kapis/servicemesh/metrics/v1alpha2" ) func init() { diff --git a/pkg/apis/servicemesh/metrics/v1alpha2/register.go b/pkg/kapis/servicemesh/metrics/v1alpha2/register.go similarity index 100% rename from pkg/apis/servicemesh/metrics/v1alpha2/register.go rename to pkg/kapis/servicemesh/metrics/v1alpha2/register.go diff --git a/pkg/apis/servicemesh/metrics/v1alpha2/swagger-doc.go b/pkg/kapis/servicemesh/metrics/v1alpha2/swagger-doc.go similarity index 100% rename from pkg/apis/servicemesh/metrics/v1alpha2/swagger-doc.go rename to pkg/kapis/servicemesh/metrics/v1alpha2/swagger-doc.go diff --git a/pkg/kapis/tenant/group.go b/pkg/kapis/tenant/group.go new file mode 100644 index 000000000..2f29dcfcc --- /dev/null +++ b/pkg/kapis/tenant/group.go @@ -0,0 +1,17 @@ +/* +Copyright 2019 The KubeSphere authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package tenant diff --git a/pkg/apis/tenant/install/install.go b/pkg/kapis/tenant/install/install.go similarity index 92% rename from pkg/apis/tenant/install/install.go rename to pkg/kapis/tenant/install/install.go index 9e344eb06..d164f7ca2 100644 --- a/pkg/apis/tenant/install/install.go +++ b/pkg/kapis/tenant/install/install.go @@ -20,8 +20,8 @@ package install import ( "github.com/emicklei/go-restful" urlruntime "k8s.io/apimachinery/pkg/util/runtime" - tenantv1alpha2 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha2" "kubesphere.io/kubesphere/pkg/apiserver/runtime" + tenantv1alpha2 "kubesphere.io/kubesphere/pkg/kapis/tenant/v1alpha2" ) func init() { diff --git a/pkg/apis/tenant/v1alpha2/register.go b/pkg/kapis/tenant/v1alpha2/register.go similarity index 100% rename from pkg/apis/tenant/v1alpha2/register.go rename to pkg/kapis/tenant/v1alpha2/register.go diff --git a/pkg/apis/terminal/group.go b/pkg/kapis/terminal/group.go similarity index 100% rename from pkg/apis/terminal/group.go rename to pkg/kapis/terminal/group.go diff --git a/pkg/apis/resources/install/install.go b/pkg/kapis/terminal/install/install.go similarity index 86% rename from pkg/apis/resources/install/install.go rename to pkg/kapis/terminal/install/install.go index dd634770a..2f5e9efcd 100644 --- a/pkg/apis/resources/install/install.go +++ b/pkg/kapis/terminal/install/install.go @@ -20,8 +20,8 @@ package install import ( "github.com/emicklei/go-restful" urlruntime "k8s.io/apimachinery/pkg/util/runtime" - resourcev1alpha2 "kubesphere.io/kubesphere/pkg/apis/resources/v1alpha2" "kubesphere.io/kubesphere/pkg/apiserver/runtime" + "kubesphere.io/kubesphere/pkg/kapis/terminal/v1alpha2" ) func init() { @@ -29,5 +29,5 @@ func init() { } func Install(c *restful.Container) { - urlruntime.Must(resourcev1alpha2.AddToContainer(c)) + urlruntime.Must(v1alpha2.AddToContainer(c)) } diff --git a/pkg/apis/terminal/v1alpha2/register.go b/pkg/kapis/terminal/v1alpha2/register.go similarity index 100% rename from pkg/apis/terminal/v1alpha2/register.go rename to pkg/kapis/terminal/v1alpha2/register.go diff --git a/tools/cmd/doc-gen/main.go b/tools/cmd/doc-gen/main.go index 1b8460267..b4f23cca9 100644 --- a/tools/cmd/doc-gen/main.go +++ b/tools/cmd/doc-gen/main.go @@ -28,18 +28,18 @@ import ( "io/ioutil" "kubesphere.io/kubesphere/pkg/apiserver/runtime" "kubesphere.io/kubesphere/pkg/constants" + _ "kubesphere.io/kubesphere/pkg/kapis/servicemesh/metrics/install" "log" // Install apis - _ "kubesphere.io/kubesphere/pkg/apis/devops/install" - _ "kubesphere.io/kubesphere/pkg/apis/iam/install" - _ "kubesphere.io/kubesphere/pkg/apis/logging/install" - _ "kubesphere.io/kubesphere/pkg/apis/monitoring/install" - _ "kubesphere.io/kubesphere/pkg/apis/openpitrix/install" - _ "kubesphere.io/kubesphere/pkg/apis/operations/install" - _ "kubesphere.io/kubesphere/pkg/apis/resources/install" - _ "kubesphere.io/kubesphere/pkg/apis/servicemesh/metrics/install" - _ "kubesphere.io/kubesphere/pkg/apis/tenant/install" - _ "kubesphere.io/kubesphere/pkg/apis/terminal/install" + _ "kubesphere.io/kubesphere/pkg/kapis/devops/install" + _ "kubesphere.io/kubesphere/pkg/kapis/iam/install" + _ "kubesphere.io/kubesphere/pkg/kapis/logging/install" + _ "kubesphere.io/kubesphere/pkg/kapis/monitoring/install" + _ "kubesphere.io/kubesphere/pkg/kapis/openpitrix/install" + _ "kubesphere.io/kubesphere/pkg/kapis/operations/install" + _ "kubesphere.io/kubesphere/pkg/kapis/resources/install" + _ "kubesphere.io/kubesphere/pkg/kapis/tenant/install" + _ "kubesphere.io/kubesphere/pkg/kapis/terminal/install" ) var output string