Help us shape the future of Go! Take the 2026 Go Developer Survey

configmap

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: Apache-2.0 Imports: 14 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureConfigMaps

func EnsureConfigMaps(
	ctx context.Context,
	h *helper.Helper,
	obj client.Object,
	cms []util.Template,
	envVars *map[string]env.Setter,
) error

EnsureConfigMaps - get all configmaps required, verify they exist and add the hash to env and status

func GetConfigMap

func GetConfigMap(
	ctx context.Context,
	h *helper.Helper,
	object client.Object,
	configMapName string,
	requeueTimeout time.Duration,
) (*corev1.ConfigMap, ctrl.Result, error)

GetConfigMap - Get config map

if the config map is not found, requeue after requeueTimeout

func GetConfigMapAndHashWithName

func GetConfigMapAndHashWithName(
	ctx context.Context,
	h *helper.Helper,
	configMapName string,
	namespace string,
) (*corev1.ConfigMap, string, error)

GetConfigMapAndHashWithName -

func GetConfigMaps

func GetConfigMaps(
	ctx context.Context,
	h *helper.Helper,
	obj client.Object,
	configMaps []string,
	namespace string,
	envVars *map[string]env.Setter,
) ([]util.Hash, error)

GetConfigMaps - get all configmaps required, verify they exist and add the hash to env and status

func Hash

func Hash(configMap *corev1.ConfigMap) (string, error)

Hash function creates a hash of a ConfigMap's Data and BinaryData fields and returns it as a safe encoded string.

func VerifyConfigMap

func VerifyConfigMap(
	ctx context.Context,
	configMapName types.NamespacedName,
	expectedFields []string,
	reader client.Reader,
	requeueTimeout time.Duration,
) (string, ctrl.Result, error)

VerifyConfigMap - verifies if the ConfigMap object exists and the expected fields are in the ConfigMap. It returns a hash of the values of the expected fields.

Types

This section is empty.

Jump to

Keyboard shortcuts

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