Documentation
¶
Index ¶
- type Config
- type Module
- func (m *Module) ApplySettings(settings addonutils.Values) error
- func (m *Module) GetName() string
- func (m *Module) GetPath() string
- func (m *Module) GetSettingsChecksum() string
- func (m *Module) GetValues() addonutils.Values
- func (m *Module) GetValuesChecksum() string
- func (m *Module) GetVersion() string
- func (m *Module) InitializeHooks()
- func (m *Module) RunHookByName(ctx context.Context, name string, bctx []bctx.BindingContext) error
- func (m *Module) RunHooksByBinding(ctx context.Context, binding shtypes.BindingType) error
- func (m *Module) UnlockKubernetesMonitors(hook string, monitors ...string)
- func (m *Module) ValidateSettings(_ context.Context, settings addonutils.Values) (settingscheck.Result, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Path string // Path to package dir
StaticValues addonutils.Values // Static values from values.yaml files
ConfigSchema []byte // OpenAPI config schema (YAML)
ValuesSchema []byte // OpenAPI values schema (YAML)
Hooks []hooks.GlobalHook // Discovered hooks
Patcher *objectpatch.ObjectPatcher
ScheduleManager schedulemanager.ScheduleManager
KubeEventsManager kubeeventsmanager.KubeEventsManager
}
Config holds configuration for creating a new Module instance.
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func NewModuleByConfig ¶
NewModuleByConfig creates a new Module instance with the specified configuration. It initializes hook storage, adds all discovered hooks, and creates values storage.
Returns error if hook initialization or values storage creation fails.
func (*Module) ApplySettings ¶
func (m *Module) ApplySettings(settings addonutils.Values) error
ApplySettings apply settings values
func (*Module) GetSettingsChecksum ¶
GetSettingsChecksum returns a checksum of the current config values. Used to detect if settings changed.
func (*Module) GetValues ¶
func (m *Module) GetValues() addonutils.Values
GetValues returns values for rendering
func (*Module) GetValuesChecksum ¶
GetValuesChecksum returns a checksum of the current values. Used to detect if values changed after hook execution.
func (*Module) GetVersion ¶
GetVersion return the package version
func (*Module) InitializeHooks ¶
func (m *Module) InitializeHooks()
InitializeHooks initializes hook controllers and bind them to Kubernetes events and schedules
func (*Module) RunHookByName ¶
RunHookByName runs some specified hook by its name
func (*Module) RunHooksByBinding ¶
RunHooksByBinding executes all hooks for a specific binding type in order. It creates a binding context with snapshots for BeforeAll hooks.
func (*Module) UnlockKubernetesMonitors ¶
UnlockKubernetesMonitors called after sync task is completed to unlock getting events
func (*Module) ValidateSettings ¶
func (m *Module) ValidateSettings(_ context.Context, settings addonutils.Values) (settingscheck.Result, error)
ValidateSettings validates settings against openAPI