controller

package
v0.10.7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 17 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

View Source
var ErrHookIndexIsNotExists = errors.New("hook index does not exist")

TODO: fix typo, didn't fix now to not break public API

View Source
var ErrNoHooksRegistered = errors.New("no hooks registered")
View Source
var ErrReadinessHookDoesNotExists = errors.New("readiness hook does not exists")

Functions

This section is empty.

Types

type Config

type Config struct {
	ModuleName      string
	HookConfig      *HookConfig
	ReadinessConfig *ReadinessConfig
	SettingsCheck   settingscheck.Check

	LogLevelRaw string
	LogLevel    log.Level
}

func (*Config) GetFileConfig

func (cfg *Config) GetFileConfig() *file.Config

type HookConfig

type HookConfig struct {
	BindingContextPath string
	ValuesPath         string
	ConfigValuesPath   string

	// send to addon operator when config requested
	HookConfigPath string

	MetricsPath          string
	KubernetesPath       string
	ValuesJSONPath       string
	ConfigValuesJSONPath string

	CreateFilesByYourself bool
}

type HookController

type HookController struct {
	// contains filtered or unexported fields
}

func NewHookController

func NewHookController(cfg *Config, logger *log.Logger) *HookController

func (*HookController) CheckSettings added in v0.6.0

func (c *HookController) CheckSettings(ctx context.Context) error

func (*HookController) ListHooksMeta

func (c *HookController) ListHooksMeta() []pkg.HookMetadata

func (*HookController) PrintHookConfigs

func (c *HookController) PrintHookConfigs() error

func (*HookController) RunHook

func (c *HookController) RunHook(ctx context.Context, idx int) error

func (*HookController) RunReadiness

func (c *HookController) RunReadiness(ctx context.Context) error

func (*HookController) WriteHookConfigsInFile

func (c *HookController) WriteHookConfigsInFile() error

type HookSender

type HookSender interface {
	SendMetrics() error
	SendPatches() error
	SendValues() error
	SendConfigValues() error
}

type ReadinessConfig

type ReadinessConfig struct {
	ModuleName        string
	IntervalInSeconds uint8
	ProbeFunc         func(ctx context.Context, input *pkg.HookInput) error
}

Jump to

Keyboard shortcuts

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