updateconfig

package
v1.9.8 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

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