kube_config_manager

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: Apache-2.0 Imports: 14 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	VerboseDebug bool
	// ConfigUpdated chan receives a new Config when global values are changed
	ConfigUpdated chan Config
	// ModuleConfigsUpdated chan receives a list of all ModuleConfig in configData. Updated items marked as IsUpdated.
	ModuleConfigsUpdated chan ModuleConfigs
)

Functions

func GetModulesNamesFromConfigData

func GetModulesNamesFromConfigData(configData map[string]string) map[string]bool

TODO make a method of KubeConfig TODO LOG: multierror? GetModulesNamesFromConfigData returns all keys in kube config except global modNameEnabled keys are also handled

Types

type Config

type Config struct {
	Values        utils.Values
	ModuleConfigs ModuleConfigs
}

func NewConfig

func NewConfig() *Config

type GlobalKubeConfig

type GlobalKubeConfig struct {
	Values     utils.Values
	Checksum   string
	ConfigData map[string]string
}

func GetGlobalKubeConfigFromConfigData

func GetGlobalKubeConfigFromConfigData(configData map[string]string) (*GlobalKubeConfig, error)

func GetGlobalKubeConfigFromValues

func GetGlobalKubeConfigFromValues(values utils.Values) (*GlobalKubeConfig, error)

type KubeConfigManager

type KubeConfigManager interface {
	WithContext(ctx context.Context)
	WithKubeClient(client klient.Client)
	WithNamespace(namespace string)
	WithConfigMapName(configMap string)
	WithValuesChecksumsAnnotation(annotation string)
	SetKubeGlobalValues(values utils.Values) error
	SetKubeModuleValues(moduleName string, values utils.Values) error
	Init() error
	Start()
	Stop()
	InitialConfig() *Config
	CurrentConfig() *Config
}

func NewKubeConfigManager

func NewKubeConfigManager() KubeConfigManager

type ModuleConfigs

type ModuleConfigs map[string]utils.ModuleConfig

func (ModuleConfigs) Names

func (m ModuleConfigs) Names() []string

type ModuleKubeConfig

type ModuleKubeConfig struct {
	utils.ModuleConfig
	Checksum   string
	ConfigData map[string]string
}

func ExtractModuleKubeConfig

func ExtractModuleKubeConfig(moduleName string, configData map[string]string) (*ModuleKubeConfig, error)

TODO make a method of KubeConfig ExtractModuleKubeConfig returns ModuleKubeConfig with values loaded from ConfigMap

func GetModuleKubeConfigFromValues

func GetModuleKubeConfigFromValues(moduleName string, values utils.Values) (*ModuleKubeConfig, error)

TODO make a method of KubeConfig

Jump to

Keyboard shortcuts

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