resolver

package
v1.15.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package resolver provides the logic for merging in the various sources of configuration, overrides, and drop-ins.

Index

Constants

View Source
const (
	KindConfigMap  = "config-map"
	KindNode       = "node"
	KindNodeConfig = "cilium-node-config"
)

Variables

This section is empty.

Functions

func ReadConfigSource

func ReadConfigSource(ctx context.Context, client client.Clientset, nodeName string, source ConfigSource) (config map[string]string, descriptions []string, err error)

func ResolveConfigurations

func ResolveConfigurations(ctx context.Context, client client.Clientset, nodeName string, sources []ConfigSource, allowConfigKeys, denyConfigKeys []string) (map[string]string, error)

func WriteConfigurations

func WriteConfigurations(ctx context.Context, destDir string, data map[string]string) error

WriteConfigurations writes the key-value pairs in data to destDir. It writes it like a Kubernetes config-map: It uses a double-layer symlink to allow for atomic updates: destDir/key -> ..data/key ..data -> ..data_$time

Types

type ConfigSource

type ConfigSource struct {
	Kind      string // one of config-map, overrides, node
	Namespace string // The namespace for the ConfigMap or CiliumNodeConfigs
	Name      string // The name of the ConfigMap or Node, unused for Overrides
}

func (*ConfigSource) String

func (cs *ConfigSource) String() string

Jump to

Keyboard shortcuts

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