mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-16 06:16:52 +00:00
* Store capability OpenAPI V3 JSON schema in ConfigMap Store the OpenAPI v3 JSON Schema generated from the parameters of a capability which could be used by api server To fix #899 address comments try to fix data race issue Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com> * address comments: generate cue instance from cue json instead of local file * update ConfigMap data at any time * add more unit-test * fix conflicts * adapt to new spec.schematic.cue.template * adapt to new spec.schematic.cue.template for controller unittest cases * fix ci issues * adapt to namespaced scope definition * add more testcases on namespaced definitions with and without namespaces Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
47 lines
2.0 KiB
Go
47 lines
2.0 KiB
Go
/*
|
|
Copyright 2019 The Crossplane 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 v1alpha2
|
|
|
|
import (
|
|
"github.com/crossplane/crossplane-runtime/pkg/logging"
|
|
ctrl "sigs.k8s.io/controller-runtime"
|
|
|
|
controller "github.com/oam-dev/kubevela/pkg/controller/core.oam.dev"
|
|
"github.com/oam-dev/kubevela/pkg/controller/core.oam.dev/v1alpha2/application"
|
|
"github.com/oam-dev/kubevela/pkg/controller/core.oam.dev/v1alpha2/applicationconfiguration"
|
|
"github.com/oam-dev/kubevela/pkg/controller/core.oam.dev/v1alpha2/applicationdeployment"
|
|
"github.com/oam-dev/kubevela/pkg/controller/core.oam.dev/v1alpha2/core/scopes/healthscope"
|
|
"github.com/oam-dev/kubevela/pkg/controller/core.oam.dev/v1alpha2/core/traits/manualscalertrait"
|
|
"github.com/oam-dev/kubevela/pkg/controller/core.oam.dev/v1alpha2/core/traits/traitdefinition"
|
|
"github.com/oam-dev/kubevela/pkg/controller/core.oam.dev/v1alpha2/core/workloads/containerizedworkload"
|
|
"github.com/oam-dev/kubevela/pkg/controller/core.oam.dev/v1alpha2/core/workloads/workloaddefinition"
|
|
)
|
|
|
|
// Setup workload controllers.
|
|
func Setup(mgr ctrl.Manager, args controller.Args, l logging.Logger) error {
|
|
for _, setup := range []func(ctrl.Manager, controller.Args, logging.Logger) error{
|
|
applicationconfiguration.Setup,
|
|
containerizedworkload.Setup, manualscalertrait.Setup, healthscope.Setup,
|
|
application.Setup, applicationdeployment.Setup, traitdefinition.Setup, workloaddefinition.Setup,
|
|
} {
|
|
if err := setup(mgr, args, l); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
return nil
|
|
}
|