global

package
v1.76.3 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: Apache-2.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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