chop

package
v0.0.0-...-9d21e6f Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 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 GetRuntimeParam

func GetRuntimeParam(name string) (string, bool)

GetRuntimeParam returns operator runtime parameter by name

func New

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

New creates new 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 (*CHOp) Config

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

Config returns operator config

func (*CHOp) GetRuntimeParam

func (c *CHOp) GetRuntimeParam(name string) (string, bool)

GetRuntimeParam returns operator runtime parameter by name

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 (*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