kube_config_manager

package
v1.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigMapName             = "addon-operator"
	ValuesChecksumsAnnotation = "addon-operator/values-checksums"
)

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

GetModulesNamesFromConfigData returns all keys in kube config except global

func NewGlobalValues

func NewGlobalValues(yamlData string) (utils.Values, error)

func NewModuleConfig

func NewModuleConfig(moduleName string, moduleYamlData string) (*utils.ModuleConfig, error)

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

type KubeConfigManager

type KubeConfigManager interface {
	SetKubeGlobalValues(values utils.Values) error
	SetKubeModuleValues(moduleName string, values utils.Values) error
	Run()
	InitialConfig() *Config
}

func Init

func Init() (KubeConfigManager, error)

type MainKubeConfigManager

type MainKubeConfigManager struct {
	GlobalValuesChecksum  string
	ModulesValuesChecksum map[string]string
	// contains filtered or unexported fields
}

func NewMainKubeConfigManager

func NewMainKubeConfigManager() *MainKubeConfigManager

func (*MainKubeConfigManager) InitialConfig

func (kcm *MainKubeConfigManager) InitialConfig() *Config

func (*MainKubeConfigManager) Run

func (kcm *MainKubeConfigManager) Run()

func (*MainKubeConfigManager) SetKubeGlobalValues

func (kcm *MainKubeConfigManager) SetKubeGlobalValues(values utils.Values) error

func (*MainKubeConfigManager) SetKubeModuleValues

func (kcm *MainKubeConfigManager) SetKubeModuleValues(moduleName string, values utils.Values) error

type ModuleConfigs

type ModuleConfigs map[string]utils.ModuleConfig

type ModuleKubeConfig

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

func GetModuleKubeConfigFromConfigData

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

func GetModuleKubeConfigFromValues

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

func ModuleKubeConfigMustExist

func ModuleKubeConfigMustExist(res *ModuleKubeConfig, err error) (*ModuleKubeConfig, error)

Jump to

Keyboard shortcuts

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