Documentation ¶
Index ¶
Constants ¶
const ( // UPGRADECONFIG_CR_NAME is the name of the Custom Resource that the provider will manage UPGRADECONFIG_CR_NAME = "managed-upgrade-config" // JITTER_FACTOR is a jitter factor (percentage / 100) used to alter watch interval JITTER_FACTOR = 0.1 // INITIAL_SYNC_DURATION is an initial sync duration INITIAL_SYNC_DURATION = 1 * time.Minute // ERROR_RETRY_DURATION is an error retryn duration ERROR_RETRY_DURATION = 5 * time.Minute )
Variables ¶
var ( ErrClusterIsUpgrading = fmt.Errorf("cluster is upgrading") ErrRetrievingUpgradeConfigs = fmt.Errorf("unable to retrieve upgradeconfigs") ErrMissingOperatorNamespace = fmt.Errorf("can't determine operator namespace, missing env OPERATOR_NAMESPACE") ErrProviderSpecPull = fmt.Errorf("unable to retrieve upgrade spec") ErrRemovingUpgradeConfig = fmt.Errorf("unable to remove existing UpgradeConfig") ErrCreatingUpgradeConfig = fmt.Errorf("unable to create new UpgradeConfig") ErrUpgradeConfigNotFound = fmt.Errorf("upgrade config not found") ErrNotConfigured = fmt.Errorf("no upgrade config manager configured") )
Errors
var ErrNoConfigManagerDefined = fmt.Errorf("no configManager defined in configuration")
ErrNoConfigManagerDefined is an error that describes no configmanager has been configured
Functions ¶
This section is empty.
Types ¶
type ConfigManager ¶
type ConfigManager struct {
WatchIntervalMinutes int `yaml:"watchInterval" default:"1"`
}
ConfigManager holds fileds that describe a ConfigManager
type ConfigManagerSource ¶
type ConfigManagerSource string
ConfigManagerSource is a type illustrating a config manager source
type UpgradeConfigManager ¶
type UpgradeConfigManager interface { Get() (*upgradev1alpha1.UpgradeConfig, error) StartSync(stopCh context.Context) Refresh() (bool, error) }
UpgradeConfigManager enables an implementation of an UpgradeConfigManager
type UpgradeConfigManagerBuilder ¶
type UpgradeConfigManagerBuilder interface {
NewManager(client.Client) (UpgradeConfigManager, error)
}
UpgradeConfigManagerBuilder enables an implementation of an UpgradeConfigManagerBuilder
func NewBuilder ¶
func NewBuilder() UpgradeConfigManagerBuilder
NewBuilder returns an upgradeConfigManagerBuilder
type UpgradeConfigManagerConfig ¶
type UpgradeConfigManagerConfig struct {
ConfigManager ConfigManager `yaml:"configManager"`
}
UpgradeConfigManagerConfig holds fields that describe an UpgradeConfigManagerConfig
func (*UpgradeConfigManagerConfig) GetWatchInterval ¶
func (cfg *UpgradeConfigManagerConfig) GetWatchInterval() time.Duration
GetWatchInterval returns the WatchIntervalMinutes field from an UpgradeConfigManagerConfig
func (*UpgradeConfigManagerConfig) IsValid ¶
func (cfg *UpgradeConfigManagerConfig) IsValid() error
IsValid returns a nil error when the UpgradeConfigManagerConfig is valid