mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-19 04:26:39 +00:00
Feat: add vela minimal chart (#2340)
* Feat: add vela minimal chart * Feat: add README in minimal chart
This commit is contained in:
@@ -23,6 +23,8 @@ const (
|
||||
DisableAllCaps = "all"
|
||||
// DisableNoneCaps disable none of capabilities
|
||||
DisableNoneCaps = ""
|
||||
// ManualScalerTraitControllerName is the controller name of manual scaler trait
|
||||
ManualScalerTraitControllerName = "manualscalertrait"
|
||||
// ContainerizedWorkloadControllerName is the controller name of containerized workload
|
||||
ContainerizedWorkloadControllerName = "containerizedwokrload"
|
||||
// HealthScopeControllerName is the controller name of healthScope controller
|
||||
|
||||
@@ -33,7 +33,26 @@ import (
|
||||
|
||||
// Setup workload controllers.
|
||||
func Setup(mgr ctrl.Manager, args controller.Args) error {
|
||||
if args.OAMSpecVer == "v0.3" || args.OAMSpecVer == "all" {
|
||||
switch args.OAMSpecVer {
|
||||
case "all":
|
||||
for _, setup := range []func(ctrl.Manager, controller.Args) error{
|
||||
application.Setup, applicationrollout.Setup, appdeployment.Setup,
|
||||
traitdefinition.Setup, componentdefinition.Setup, policydefinition.Setup, workflowstepdefinition.Setup,
|
||||
initializer.Setup, applicationconfiguration.Setup,
|
||||
} {
|
||||
if err := setup(mgr, args); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
case "minimal":
|
||||
for _, setup := range []func(ctrl.Manager, controller.Args) error{
|
||||
application.Setup, traitdefinition.Setup, componentdefinition.Setup, policydefinition.Setup, workflowstepdefinition.Setup,
|
||||
} {
|
||||
if err := setup(mgr, args); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
case "v0.3":
|
||||
for _, setup := range []func(ctrl.Manager, controller.Args) error{
|
||||
application.Setup, applicationrollout.Setup, appdeployment.Setup,
|
||||
traitdefinition.Setup, componentdefinition.Setup, policydefinition.Setup, workflowstepdefinition.Setup,
|
||||
@@ -43,10 +62,13 @@ func Setup(mgr ctrl.Manager, args controller.Args) error {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
if args.OAMSpecVer == "v0.2" || args.OAMSpecVer == "all" {
|
||||
if err := applicationconfiguration.Setup(mgr, args); err != nil {
|
||||
return err
|
||||
case "v0.2":
|
||||
for _, setup := range []func(ctrl.Manager, controller.Args) error{
|
||||
applicationconfiguration.Setup,
|
||||
} {
|
||||
if err := setup(mgr, args); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -44,6 +44,9 @@ func Setup(mgr ctrl.Manager, disableCaps string, args controller.Args) error {
|
||||
case common.DisableAllCaps:
|
||||
default:
|
||||
disableCapsSet := utils.StoreInSet(disableCaps)
|
||||
if !disableCapsSet.Contains(common.ManualScalerTraitControllerName) {
|
||||
functions = append(functions, manualscalertrait.Setup)
|
||||
}
|
||||
if !disableCapsSet.Contains(common.ContainerizedWorkloadControllerName) {
|
||||
functions = append(functions, containerizedworkload.Setup)
|
||||
}
|
||||
|
||||
@@ -70,7 +70,13 @@ const LabelPodSpecable = "workload.oam.dev/podspecable"
|
||||
|
||||
// allBuiltinCapabilities includes all builtin controllers
|
||||
// TODO(zzxwill) needs to automatically discovery all controllers
|
||||
var allBuiltinCapabilities = mapset.NewSet(common.RolloutControllerName, common.ContainerizedWorkloadControllerName, common.HealthScopeControllerName)
|
||||
var allBuiltinCapabilities = mapset.NewSet(
|
||||
common.ManualScalerTraitControllerName,
|
||||
common.RolloutControllerName,
|
||||
common.ContainerizedWorkloadControllerName,
|
||||
common.HealthScopeControllerName,
|
||||
common.EnvBindingControllerName,
|
||||
)
|
||||
|
||||
// GetPodSpecPath get podSpec field and label
|
||||
func GetPodSpecPath(workloadDef *v1alpha2.WorkloadDefinition) (string, bool) {
|
||||
|
||||
Reference in New Issue
Block a user