updateconfig

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: Apache-2.0 Imports: 21 Imported by: ? modules, 0 packages

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

func FilterChanges

func FilterChanges(cfg plugins.ConfigUpdater, changes []*scm.Change, log *logrus.Entry) map[ConfigMapID][]ConfigMapUpdate

FilterChanges determines which of the changes are relevant for config updating, returning mapping of config map to key to cmName to update that key from.

func Update

func Update(fg FileGetter, kc corev1.ConfigMapInterface, name, namespace string, updates []ConfigMapUpdate, logger *logrus.Entry) error

Update updates the configmap with the data from the identified files

Types

type ConfigMapID

type ConfigMapID struct {
	Name, Namespace string
}

ConfigMapID is a name/namespace combination that identifies a config map

type ConfigMapUpdate

type ConfigMapUpdate struct {
	Key, Filename string
	GZIP          bool
}

ConfigMapUpdate is populated with information about a config map that should be updated.

type FileGetter

type FileGetter interface {
	GetFile(filename string) ([]byte, error)
}

FileGetter knows how to get the contents of a file by name

Jump to

Keyboard shortcuts

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