chop

package
v0.0.0-...-bbbf66a Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 20 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Config

func Config() *v1.OperatorConfig

Config gets global CHOp config

func GetClientset

func GetClientset(kubeConfigFile, masterURL string) (
	*kube.Clientset,
	*apiextensions.Clientset,
	*chopclientset.Clientset,
)

GetClientset gets k8s API clients - both kube native client and our custom client

func New

func New(kubeClient *kube.Clientset, chopClient *chopclientset.Clientset, initCHOpConfigFilePath string)

New creates chop instance chopClient can be nil, in this case CHOp will not be able to use any ConfigMap(s) with configuration

Types

type CHOp

type CHOp struct {
	// Version specifies version of the operator
	Version string
	// Commit specifies git commit of the operator
	Commit string
	// Date specified date when operator was built
	Date string
	// ConfigManager specifies configuration manager in charge of operator's configuration
	ConfigManager *ConfigManager
}

CHOp defines ClickHouse Operator

func Get

func Get() *CHOp

Get gets global CHOp

func NewCHOp

func NewCHOp(
	version string,
	commit string,
	date string,
	kubeClient *kube.Clientset,
	chopClient *chopclientset.Clientset,
	initConfigFilePath string,
) *CHOp

NewCHOp creates new CHOp

func (*CHOp) Config

func (c *CHOp) Config() *v1.OperatorConfig

Config returns operator config

func (*CHOp) Init

func (c *CHOp) Init() error

Init initializes CHOp

func (*CHOp) SetupLog

func (c *CHOp) SetupLog()

SetupLog sets up logging options

type ConfigManager

type ConfigManager struct {
	// contains filtered or unexported fields
}

ConfigManager specifies configuration manager in charge of operator's configuration

func NewConfigManager

func NewConfigManager(
	kubeClient *kube.Clientset,
	chopClient *chopClientSet.Clientset,
	initConfigFilePath string,
) *ConfigManager

NewConfigManager creates new ConfigManager

func (*ConfigManager) Config

func (cm *ConfigManager) Config() *api.OperatorConfig

Config is an access wrapper

func (*ConfigManager) GetRuntimeParam

func (cm *ConfigManager) GetRuntimeParam(name string) (string, bool)

GetRuntimeParam gets specified runtime param

func (*ConfigManager) HasRuntimeParam

func (cm *ConfigManager) HasRuntimeParam(name string) bool

HasRuntimeParam checks whether specified runtime param exists

func (*ConfigManager) Init

func (cm *ConfigManager) Init() error

Init reads config from all sources

func (*ConfigManager) IsConfigListed

func (cm *ConfigManager) IsConfigListed(config *api.ClickHouseOperatorConfiguration) bool

IsConfigListed checks whether specified ClickHouseOperatorConfiguration is listed in list of ClickHouseOperatorConfiguration(s)

func (*ConfigManager) Postprocess

func (cm *ConfigManager) Postprocess()

Postprocess performs postprocessing of the configuration

Jump to

Keyboard shortcuts

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