component

package
v0.0.0-...-6c4e8d0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENV_DEFAULT_CLIMC_USER          = "CLIMC_DEFAULT_USER"
	ENV_DEFAULT_CLIMC_USER_PASSWORD = "CLIMC_DEFAULT_USER_PASSWORD"
)
View Source
const (
	CEConfig = `` /* 264-byte string literal not displayed */

	EEConfig = `` /* 812-byte string literal not displayed */

	WebNginxConfigTemplate = `` /* 5838-byte string literal not displayed */

)
View Source
const (
	InfluxDBConfigTemplate = `` /* 815-byte string literal not displayed */

)
View Source
const (
	YUNION_ETC_CONFIG_DIR = "/etc/yunion"
)

Variables

This section is empty.

Functions

func CompileTemplateFromMap

func CompileTemplateFromMap(tmplt string, configMap interface{}) (string, error)

func ConstructCluster

func ConstructCluster(cfgDir string, cluster *v1alpha1.OnecloudCluster) error

func ConstructClusterConfig

func ConstructClusterConfig(cfgDir string, cfg *v1alpha1.OnecloudClusterConfig) error

func ConstructClusterResource

func ConstructClusterResource(cfgDir string, ef func(cpnt Component, cpntOpt interface{}) error) error

func EnsureClusterClickhouseUser

func EnsureClusterClickhouseUser(oc *v1alpha1.OnecloudCluster, dbConfig v1alpha1.DBConfig) error

func EnsureClusterDBUser

func EnsureClusterDBUser(oc *v1alpha1.OnecloudCluster, dbConfig v1alpha1.DBConfig) error

func EnsureDBUser

func EnsureDBUser(conn dbutil.IConnection, dbName string, username string, password string) error

func EnsureServiceAccount

func EnsureServiceAccount(s *mcclient.ClientSession, account v1alpha1.CloudUser) error

func GetComponentCloudUser

func GetComponentCloudUser(cmpt Component, cfg *v1alpha1.OnecloudClusterConfig, existOpt jsonutils.JSONObject) (*v1alpha1.CloudUser, error)

func GetComponentDBConfig

func GetComponentDBConfig(cmpt Component, cfg *v1alpha1.OnecloudClusterConfig, existOpt jsonutils.JSONObject) (*v1alpha1.DBConfig, error)

func GetComponents

func GetComponents() map[v1alpha1.ComponentType]Component

func GetRCAdminEnv

func GetRCAdminEnv(oc *v1alpha1.OnecloudCluster) []corev1.EnvVar

func GetRCAdminFilePath

func GetRCAdminFilePath(cfgDir string) string

func ParseSQLAchemyURL

func ParseSQLAchemyURL(pySQLSrc string) (*v1alpha1.DBConfig, error)

func RegisterComponent

func RegisterComponent(comp Component)

Types

type ApiOptions

type ApiOptions struct {
	options.CommonOptions
	WsPort      int  `default:"10443"`
	ShowCaptcha bool `default:"true"`
	EnableTotp  bool `default:"true"`
}

type Component

type Component interface {
	GetConfigFilePath(targetDir string) string
	GetCertsDirPath(targetDir string) string

	GetType() v1alpha1.ComponentType

	BuildCluster(oc *v1alpha1.OnecloudCluster, opts interface{}) error
	BuildClusterConfigDB(clsCfg *v1alpha1.OnecloudClusterConfig, dbCfg v1alpha1.DBConfig) error
	BuildClusterConfigCloudUser(clsCfg *v1alpha1.OnecloudClusterConfig, user v1alpha1.CloudUser) error

	GetConfig(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.OnecloudClusterConfig) (interface{}, error)
	GetOptions() interface{}
	GetDefaultDBConfig(cfg *v1alpha1.OnecloudClusterConfig) *v1alpha1.DBConfig
	GetDefaultClickhouseConfig(cfg *v1alpha1.OnecloudClusterConfig) *v1alpha1.DBConfig
	GetDefaultCloudUser(cfg *v1alpha1.OnecloudClusterConfig) *v1alpha1.CloudUser

	GetPhaseControl(man controller.ComponentManager) controller.PhaseControl
	BeforeStart(oc *v1alpha1.OnecloudCluster, targetCfgDir string) error
}

func GetComponent

func GetComponent(cType v1alpha1.ComponentType) Component

func NewAPIMap

func NewAPIMap() Component

func NewAnsibleServer

func NewAnsibleServer() Component

func NewApiGateway

func NewApiGateway() Component

func NewClimc

func NewClimc() Component

func NewCloudId

func NewCloudId() Component

func NewCloudmon

func NewCloudmon() Component

func NewEtcd

func NewEtcd() Component

func NewGlance

func NewGlance() Component

func NewInfluxdb

func NewInfluxdb() Component

func NewKeystone

func NewKeystone() Component

func NewKubeserver

func NewKubeserver() Component

func NewLogger

func NewLogger() Component

func NewMonitor

func NewMonitor() Component

func NewNotify

func NewNotify() Component

func NewRegion

func NewRegion() Component

func NewScheduledTask

func NewScheduledTask() Component

func NewScheduler

func NewScheduler() Component

func NewVictoriaMetrics

func NewVictoriaMetrics() Component

func NewWeb

func NewWeb() Component

func NewWebconsole

func NewWebconsole() Component

func NewYunionconf

func NewYunionconf() Component

type GlobalSettingsValue

type GlobalSettingsValue struct {
	SetupKeys                []string `json:"setupKeys"`
	SetupKeysVersion         string   `json:"setupKeysVersion"`
	SetupOneStackInitialized bool     `json:"setupOneStackInitialized"`
	ProductVersion           string   `json:"productVersion"`
}

func (GlobalSettingsValue) Equal

type InfluxdbConfig

type InfluxdbConfig struct {
	Port     int
	CertPath string
	KeyPath  string
}

func (InfluxdbConfig) GetContent

func (c InfluxdbConfig) GetContent() (string, error)

type KubeOptions

type KubeOptions struct {
	options.CommonOptions
	options.DBOptions

	HttpsPort         int
	TlsCertFile       string
	TlsPrivateKeyFile string
}

type PrepareManager

type PrepareManager interface {
	ConstructCluster(config v1alpha1.Mysql, cfgDir string) (*v1alpha1.OnecloudCluster, error)
	ConstructClusterConfig(cfgDir string) (*v1alpha1.OnecloudClusterConfig, error)
	Init(cpnt Component, oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.OnecloudClusterConfig, targetCfgDir string) error
	PostInit(cpnt Component, oc *v1alpha1.OnecloudCluster, targetCfgDir string) error
}

func NewPrepareManager

func NewPrepareManager() PrepareManager

type WebNginxConfig

type WebNginxConfig struct {
	EditionConfig   string
	WebconsoleURL   string
	APIGatewayWsURL string
	APIGatewayURL   string
	UseHTTP         bool
}

func (WebNginxConfig) GetContent

func (c WebNginxConfig) GetContent() (string, error)

Jump to

Keyboard shortcuts

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