Documentation ¶
Index ¶
- func ConfigMapGet(kubeClient klient.Client, namespace string, name string) (*v1.ConfigMap, error)
- func ConfigMapMergeValues(kubeClient klient.Client, namespace string, name string, values utils.Values) error
- func ConfigMapUpdate(kubeClient klient.Client, namespace string, name string, ...) error
- func GetModulesNamesFromConfigData(configData map[string]string) (map[string]bool, error)
- type Checksums
- func (c *Checksums) Add(name string, checksum string)
- func (c *Checksums) Copy(name string, src *Checksums)
- func (c *Checksums) HasChecksum(name string) bool
- func (c *Checksums) HasEqualChecksum(name string, checksum string) bool
- func (c *Checksums) Names() map[string]struct{}
- func (c *Checksums) Remove(name string, checksum string)
- func (c *Checksums) RemoveAll(name string)
- func (c *Checksums) Set(name string, checksum string)
- type GlobalKubeConfig
- type KubeConfig
- type KubeConfigEvent
- type KubeConfigManager
- type ModuleKubeConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigMapGet ¶ added in v1.0.6
ConfigMapGet gets the ConfigMap object from the cluster.
func ConfigMapMergeValues ¶ added in v1.0.6
func ConfigMapMergeValues(kubeClient klient.Client, namespace string, name string, values utils.Values) error
ConfigMapMergeValues is a helper to use ConfigMapUpdate to save Values object in the ConfigMap.
Types ¶
type Checksums ¶ added in v1.0.6
type Checksums struct {
// contains filtered or unexported fields
}
Checksums is a non thread-safe storage for KubeConfig sections checksums.
func NewChecksums ¶ added in v1.0.6
func NewChecksums() *Checksums
func (*Checksums) HasChecksum ¶ added in v1.0.6
HasChecksum returns true if there is at least one checksum for name.
func (*Checksums) HasEqualChecksum ¶ added in v1.0.6
HasEqualChecksum returns true if there is a checksum for name equal to the input checksum.
type GlobalKubeConfig ¶
func GetGlobalKubeConfigFromConfigData ¶
func GetGlobalKubeConfigFromConfigData(configData map[string]string) (*GlobalKubeConfig, error)
func GetGlobalKubeConfigFromValues ¶
func GetGlobalKubeConfigFromValues(values utils.Values) (*GlobalKubeConfig, error)
type KubeConfig ¶ added in v1.0.6
type KubeConfig struct { Global *GlobalKubeConfig Modules map[string]*ModuleKubeConfig }
func NewConfig ¶
func NewConfig() *KubeConfig
func ParseConfigMapData ¶ added in v1.0.6
func ParseConfigMapData(data map[string]string) (cfg *KubeConfig, err error)
type KubeConfigEvent ¶ added in v1.0.6
type KubeConfigEvent string
const ( KubeConfigChanged KubeConfigEvent = "Changed" KubeConfigInvalid KubeConfigEvent = "Invalid" )
type KubeConfigManager ¶
type KubeConfigManager interface { WithContext(ctx context.Context) WithKubeClient(client klient.Client) WithNamespace(namespace string) WithConfigMapName(configMap string) WithRuntimeConfig(config *config.Config) SaveGlobalConfigValues(values utils.Values) error SaveModuleConfigValues(moduleName string, values utils.Values) error Init() error Start() Stop() KubeConfigEventCh() chan KubeConfigEvent SafeReadConfig(handler func(config *KubeConfig)) }
func NewKubeConfigManager ¶
func NewKubeConfigManager() KubeConfigManager
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)
ExtractModuleKubeConfig returns ModuleKubeConfig with values loaded from ConfigMap
func GetModuleKubeConfigFromValues ¶
func GetModuleKubeConfigFromValues(moduleName string, values utils.Values) (*ModuleKubeConfig, error)
func (*ModuleKubeConfig) GetEnabled ¶ added in v1.0.6
func (m *ModuleKubeConfig) GetEnabled() string
Click to show internal directories.
Click to hide internal directories.