Documentation
¶
Index ¶
- func CloneWithSerialization[T NumaflowControllerDefinitionConfig | GlobalConfig](orig *T) (*T, error)
- type ConfigManager
- func (cm *ConfigManager) GetConfig() (GlobalConfig, error)
- func (*ConfigManager) GetControllerDefinitionsMgr() *NumaflowControllerDefinitionsManager
- func (cm *ConfigManager) GetNamespaceConfig(namespace string) *NamespaceConfig
- func (cm *ConfigManager) GetUSDEConfig() USDEConfig
- func (cm *ConfigManager) LoadAllConfigs(onErrorReloading func(error), options ...Option) error
- func (cm *ConfigManager) RegisterCallback(f func(config GlobalConfig))
- func (cm *ConfigManager) UnsetNamespaceConfig(namespace string)
- func (cm *ConfigManager) UnsetUSDEConfig()
- func (cm *ConfigManager) UpdateNamespaceConfig(namespace string, config NamespaceConfig)
- func (cm *ConfigManager) UpdateUSDEConfig(config USDEConfig)
- type GlobalConfig
- type NamespaceConfig
- type NumaflowControllerDefinitionConfig
- type NumaflowControllerDefinitionsManager
- func (cm *NumaflowControllerDefinitionsManager) GetNumaflowControllerDefinitionsConfig(namespace, version string) (string, error)
- func (cm *NumaflowControllerDefinitionsManager) GetRolloutConfig() map[string]string
- func (cm *NumaflowControllerDefinitionsManager) RemoveNumaflowControllerDefinitionConfig(config NumaflowControllerDefinitionConfig, namespace string)
- func (cm *NumaflowControllerDefinitionsManager) UpdateNumaflowControllerDefinitionConfig(config NumaflowControllerDefinitionConfig, namespace string)
- type Option
- type SpecField
- type USDEConfig
- type USDEResourceConfig
- type USDEUserStrategy
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 string `json:"logLevel" mapstructure:"logLevel"`
IncludedResources string `json:"includedResources" mapstructure:"includedResources"`
// List of Numaflow Controller image names to look for
NumaflowControllerImageNames []string `json:"numaflowControllerImageNames" mapstructure:"numaflowControllerImageNames"`
// If user's config doesn't exist or doesn't specify strategy, this is the default
DefaultUpgradeStrategy USDEUserStrategy `json:"defaultUpgradeStrategy" mapstructure:"defaultUpgradeStrategy"`
// ChildStatusAssessmentSchedule defines time information used when assessing a child health status.
// It is a string with 3 comma-separated integer values representing the following:
// 1. AssessmentDelay: indicates the amount of seconds to delay before assessing the status of the child resource to determine healthiness
// 2. AssessmentPeriod: indicates the amount of seconds to perform assessments for after the first assessment has been performed
// 3. AssessmentInterval: indicates how often to assess the child status once the first assessment has been performed and before the end
// of the assessments window defined by adding the AssessmentDelay seconds to the AssessmentPeriod seconds
// NOTE: the order of the values is important since each value represents a specific amount of time
// Example: ChildStatusAssessmentSchedule = "120,60,10" => delay assessment by 120s, assess for 60s, assess every 10s
ChildStatusAssessmentSchedule string `json:"childStatusAssessmentSchedule" mapstructure:"childStatusAssessmentSchedule"`
}
GlobalConfig is the configuration for the controllers, it is supposed to be populated from the configmap attached to the controller manager.
func (*GlobalConfig) GetChildStatusAssessmentSchedule ¶ added in v0.13.0
func (gc *GlobalConfig) GetChildStatusAssessmentSchedule() (assessmentDelay, assessmentPeriod, assessmentInterval time.Duration, err error)
GetChildStatusAssessmentSchedule parses the GlobalConfig ChildStatusAssessmentSchedule string and returns the assessmentDelay, assessmentPeriod, and assessmentInterval durations.
type NamespaceConfig ¶ added in v0.5.0
type NamespaceConfig struct {
UpgradeStrategy USDEUserStrategy `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(namespace, version string) (string, error)
GetNumaflowControllerDefinitionsConfig looks up the controller definition from user namespace, if not found then use from global namespace.
func (*NumaflowControllerDefinitionsManager) GetRolloutConfig ¶ added in v0.13.0
func (cm *NumaflowControllerDefinitionsManager) GetRolloutConfig() map[string]string
func (*NumaflowControllerDefinitionsManager) RemoveNumaflowControllerDefinitionConfig ¶ added in v0.4.0
func (cm *NumaflowControllerDefinitionsManager) RemoveNumaflowControllerDefinitionConfig(config NumaflowControllerDefinitionConfig, namespace string)
func (*NumaflowControllerDefinitionsManager) UpdateNumaflowControllerDefinitionConfig ¶ added in v0.4.0
func (cm *NumaflowControllerDefinitionsManager) UpdateNumaflowControllerDefinitionConfig(config NumaflowControllerDefinitionConfig, namespace string)
type USDEConfig ¶ added in v0.4.0
type USDEConfig map[string]USDEResourceConfig
type USDEResourceConfig ¶ added in v0.13.0
type USDEResourceConfig struct {
// Recreate indicates fields that require the resource to be recreated upon modification.
// For PPND strategy, this list is checked before the other two lists.
Recreate []SpecField `json:"recreate,omitempty" yaml:"recreate,omitempty"`
// DataLoss represents fields that, when changed, may result in data loss.
// For PPND strategy, this list is checked after the 'recreate' list.
DataLoss []SpecField `json:"dataLoss,omitempty" yaml:"dataLoss,omitempty"`
// Progressive contains fields that can be updated without requiring a full resource recreation and by performing an in-place update.
// For PPND strategy, this list is checked after the other two lists.
Progressive []SpecField `json:"progressive,omitempty" yaml:"progressive,omitempty"`
}
type USDEUserStrategy ¶ added in v0.6.0
type USDEUserStrategy string
const ( ProgressiveStrategyID USDEUserStrategy = "progressive" PPNDStrategyID USDEUserStrategy = "pause-and-drain" NoStrategyID USDEUserStrategy = "no-strategy" )
func (USDEUserStrategy) IsValid ¶ added in v0.7.0
func (s USDEUserStrategy) IsValid() bool
func (*USDEUserStrategy) UnmarshalJSON ¶ added in v0.6.0
func (s *USDEUserStrategy) UnmarshalJSON(data []byte) (err error)
Click to show internal directories.
Click to hide internal directories.