global

package
v1.76.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

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

func NewModuleByConfig(cfg *Config, logger *log.Logger) (*Module, error)

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) GetName

func (m *Module) GetName() string

GetName returns the full module identifier.

func (*Module) GetPath

func (m *Module) GetPath() string

GetPath returns path to the package dir

func (*Module) GetSettingsChecksum

func (m *Module) GetSettingsChecksum() string

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

func (m *Module) GetValuesChecksum() string

GetValuesChecksum returns a checksum of the current values. Used to detect if values changed after hook execution.

func (*Module) GetVersion

func (m *Module) GetVersion() string

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

func (m *Module) RunHookByName(ctx context.Context, name string, bctx []bctx.BindingContext) error

RunHookByName runs some specified hook by its name

func (*Module) RunHooksByBinding

func (m *Module) RunHooksByBinding(ctx context.Context, binding shtypes.BindingType) error

RunHooksByBinding executes all hooks for a specific binding type in order. It creates a binding context with snapshots for BeforeAll hooks.

func (*Module) UnlockKubernetesMonitors

func (m *Module) UnlockKubernetesMonitors(hook string, monitors ...string)

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

Jump to

Keyboard shortcuts

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