component

package
v0.0.0-...-b6eeb3d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllComponents = []Component{
	{
		UserFacingName:     BaseComponentName,
		SpecName:           "base",
		ResourceType:       "Base",
		Default:            true,
		HelmSubDir:         "base",
		HelmValuesTreeRoot: "global",
	},
	{
		UserFacingName:     AdminComponentName,
		SpecName:           "admin",
		ResourceType:       "Deployment",
		ContainerName:      "dashboard",
		Default:            true,
		HelmSubDir:         "admin",
		HelmValuesTreeRoot: "admin",
	},
	{
		UserFacingName:     NacosRegisterComponentName,
		SpecName:           "nacos",
		ResourceType:       "StatefulSet",
		ResourceName:       "register",
		ContainerName:      "register-discovery",
		Default:            true,
		HelmSubDir:         "dubbo-control/register-discovery/nacos",
		HelmValuesTreeRoot: "nacos",
	},
	{
		UserFacingName:     ZookeeperRegisterComponentName,
		SpecName:           "zookeeper",
		ResourceType:       "StatefulSet",
		ResourceName:       "register",
		ContainerName:      "register-discovery",
		Default:            true,
		HelmSubDir:         "dubbo-control/register-discovery/zookeeper",
		HelmValuesTreeRoot: "zookeeper",
	},
}

Functions

func UserFacingCompName

func UserFacingCompName(name Name) string

UserFacingCompName returns the name of the given component that should be displayed to the user in high level CLIs (like progress log).

Types

type Component

type Component struct {
	// UserFacingName is the component name in user-facing cases.
	UserFacingName Name
	// ContainerName maps a Name to the name of the container in a Deployment.
	ContainerName string
	// SpecName is the yaml key in the DubboOperator spec.
	SpecName string
	// ResourceType maps a Name to the type of the rendered k8s resource.
	ResourceType string
	// ResourceName maps a Name to the name of the rendered k8s resource.
	ResourceName string
	// Default defines whether the component is enabled by default.
	Default bool
	// HelmSubDir is a mapping between a component name and the subdirectory of the component Chart.
	HelmSubDir string
	// HelmValuesTreeRoot is the tree root in values YAML files for the component.
	HelmValuesTreeRoot string
}

func (Component) Get

func (c Component) Get(merged values.Map) ([]apis.DefaultCompSpec, error)

type Name

type Name string
const (
	BaseComponentName              Name = "Base"
	NacosRegisterComponentName     Name = "Nacos"
	ZookeeperRegisterComponentName Name = "Zookeeper"
	AdminComponentName             Name = "Admin"
)

DubboComponent names corresponding to the IstioOperator proto component names. These must be the same since they are used for struct traversal.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL