config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneWithSerialization

func CloneWithSerialization[T NumaflowControllerDefinitionConfig | GlobalConfig](orig *T) (*T, error)

Types

type ConfigManager

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

func GetConfigManagerInstance

func GetConfigManagerInstance() *ConfigManager

GetConfigManagerInstance returns a singleton config manager throughout the application

func (*ConfigManager) GetConfig

func (cm *ConfigManager) GetConfig() (GlobalConfig, error)

func (*ConfigManager) GetControllerDefinitionsMgr added in v0.2.0

func (*ConfigManager) GetControllerDefinitionsMgr() *NumaflowControllerDefinitionsManager

func (*ConfigManager) GetNamespaceConfig added in v0.5.0

func (cm *ConfigManager) GetNamespaceConfig(namespace string) NamespaceConfig

func (*ConfigManager) GetUSDEConfig added in v0.4.0

func (cm *ConfigManager) GetUSDEConfig() USDEConfig

func (*ConfigManager) LoadAllConfigs

func (cm *ConfigManager) LoadAllConfigs(
	onErrorReloading func(error),
	options ...Option,
) error

func (*ConfigManager) RegisterCallback added in v0.2.0

func (cm *ConfigManager) RegisterCallback(f func(config GlobalConfig))

RegisterCallback adds a callback to be called when the config changes

func (*ConfigManager) UnsetNamespaceConfig added in v0.5.0

func (cm *ConfigManager) UnsetNamespaceConfig(namespace string)

func (*ConfigManager) UnsetUSDEConfig added in v0.4.0

func (cm *ConfigManager) UnsetUSDEConfig()

func (*ConfigManager) UpdateNamespaceConfig added in v0.5.0

func (cm *ConfigManager) UpdateNamespaceConfig(namespace string, config NamespaceConfig)

func (*ConfigManager) UpdateUSDEConfig added in v0.4.0

func (cm *ConfigManager) UpdateUSDEConfig(config USDEConfig)

type GlobalConfig

type GlobalConfig struct {
	LogLevel          int    `json:"logLevel" mapstructure:"logLevel"`
	IncludedResources string `json:"includedResources" mapstructure:"includedResources"`
	// Feature flag - if enabled causes pipeline(s) to be paused when pipeline, numaflow controller, or ISB Service gets updated
	DataLossPrevention bool `json:"dataLossPrevention" mapstructure:"dataLossPrevention"`
	// List of Numaflow Controller image names to look for
	NumaflowControllerImageNames []string `json:"numaflowControllerImageNames" mapstructure:"numaflowControllerImageNames"`
}

GlobalConfig is the configuration for the controllers, it is supposed to be populated from the configmap attached to the controller manager.

type NamespaceConfig added in v0.5.0

type NamespaceConfig struct {
	UpgradeStrategy usde.USDEStrategy `json:"upgradeStrategy,omitempty" yaml:"upgradeStrategy,omitempty"`
}

type NumaflowControllerDefinitionConfig

type NumaflowControllerDefinitionConfig struct {
	ControllerDefinitions []apiv1.ControllerDefinitions `json:"controllerDefinitions" yaml:"controllerDefinitions"`
}

type NumaflowControllerDefinitionsManager added in v0.4.0

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

func (*NumaflowControllerDefinitionsManager) GetNumaflowControllerDefinitionsConfig added in v0.4.0

func (cm *NumaflowControllerDefinitionsManager) GetNumaflowControllerDefinitionsConfig() map[string]string

func (*NumaflowControllerDefinitionsManager) RemoveNumaflowControllerDefinitionConfig added in v0.4.0

func (cm *NumaflowControllerDefinitionsManager) RemoveNumaflowControllerDefinitionConfig(config NumaflowControllerDefinitionConfig)

func (*NumaflowControllerDefinitionsManager) UpdateNumaflowControllerDefinitionConfig added in v0.4.0

func (cm *NumaflowControllerDefinitionsManager) UpdateNumaflowControllerDefinitionConfig(config NumaflowControllerDefinitionConfig)

type Option

type Option func(*options)

func WithConfigFileName

func WithConfigFileName(configFileName string) Option

func WithConfigsPath

func WithConfigsPath(configsPath string) Option

type USDEConfig added in v0.4.0

type USDEConfig struct {
	PipelineSpecExcludedPaths   []string `json:"pipelineSpecExcludedPaths,omitempty" yaml:"pipelineSpecExcludedPaths,omitempty"`
	ISBServiceSpecExcludedPaths []string `json:"isbServiceSpecExcludedPaths,omitempty" yaml:"isbServiceSpecExcludedPaths,omitempty"`
}

Jump to

Keyboard shortcuts

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