kube_config_manager

package
v1.21.12 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 13 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

This section is empty.

Functions

This section is empty.

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) Add added in v1.0.6

func (c *Checksums) Add(name string, checksum string)

func (*Checksums) Copy added in v1.0.6

func (c *Checksums) Copy(name string, src *Checksums)

Copy copies all checksums for name from src.

func (*Checksums) Dump added in v1.4.0

func (c *Checksums) Dump(moduleName string) map[string]struct{}

func (*Checksums) HasChecksum added in v1.0.6

func (c *Checksums) HasChecksum(name string) bool

HasChecksum returns true if there is at least one checksum for name.

func (*Checksums) HasEqualChecksum added in v1.0.6

func (c *Checksums) HasEqualChecksum(name string, checksum string) bool

HasEqualChecksum returns true if there is a checksum for name equal to the input checksum.

func (*Checksums) Names added in v1.0.6

func (c *Checksums) Names() map[string]struct{}

func (*Checksums) Remove added in v1.0.6

func (c *Checksums) Remove(name string, checksum string)

func (*Checksums) RemoveAll added in v1.0.6

func (c *Checksums) RemoveAll(name string)

RemoveAll clears all checksums for the name.

func (*Checksums) Set added in v1.0.6

func (c *Checksums) Set(name string, checksum string)

Set saves only one checksum for the name.

type KubeConfigManager

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

KubeConfigManager watches for changes in ConfigMap/addon-operator and provides methods to change its content. It stores values parsed from ConfigMap data. OpenAPI validation of these config values is not a responsibility of this component.

func NewKubeConfigManager

func NewKubeConfigManager(ctx context.Context, bk backend.ConfigHandler, runtimeConfig *runtimeConfig.Config, logger *log.Logger) *KubeConfigManager

func (*KubeConfigManager) Init

func (kcm *KubeConfigManager) Init() error

func (*KubeConfigManager) IsModuleEnabled added in v1.3.7

func (kcm *KubeConfigManager) IsModuleEnabled(moduleName string) *bool

func (*KubeConfigManager) KubeConfigEventCh added in v1.0.6

func (kcm *KubeConfigManager) KubeConfigEventCh() chan config.KubeConfigEvent

KubeConfigEventCh return a channel that emits new KubeConfig on ConfigMap changes in global section or enabled modules.

func (*KubeConfigManager) SafeReadConfig added in v1.0.6

func (kcm *KubeConfigManager) SafeReadConfig(handler func(config *config.KubeConfig))

SafeReadConfig locks currentConfig to safely read from it in external services.

func (*KubeConfigManager) SaveConfigValues added in v1.3.0

func (kcm *KubeConfigManager) SaveConfigValues(key string, values utils.Values) error

SaveConfigValues updates `global` or `module` section in ConfigMap. It uses knownChecksums to prevent KubeConfigChanged event on self-update.

func (*KubeConfigManager) Start

func (kcm *KubeConfigManager) Start()

func (*KubeConfigManager) Stop

func (kcm *KubeConfigManager) Stop()

func (*KubeConfigManager) UpdateModuleConfig added in v1.3.7

func (kcm *KubeConfigManager) UpdateModuleConfig(moduleName string) error

UpdateModuleConfig updates a single module config

Directories

Path Synopsis
Package context provides context helpers for kube-config-manager.
Package context provides context helpers for kube-config-manager.

Jump to

Keyboard shortcuts

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