config

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNamespace  = errorx.NewNamespace("config")
	NotFoundError = ErrNamespace.NewType("not_found", errorx.NotFound())
)

Functions

func DefaultsConfig added in v0.16.0

func DefaultsConfig() models.Config

DefaultsConfig returns a models.Config populated with hardcoded compile-time defaults from the deps package. This is passed to Resolver.WithDefaults so that the RSL layer has correct StrategyDefault values — always the deps constants, never the config file values.

func EnvConfig added in v0.16.0

func EnvConfig() models.Config

EnvConfig returns a models.Config populated exclusively from SOLO_PROVISIONER_* environment variables. Fields with no matching env var are left at their zero value.

This is intended to be passed to Resolver.WithEnv so that the RSL layer can register env vars as StrategyEnv — above StrategyConfig (config file) but below StrategyUserInput (CLI flags).

The env key naming follows the same convention previously used by Viper: prefix "SOLO_PROVISIONER" + uppercase field path with dots replaced by underscores. Note: ChartVersion uses the yaml tag "version", so its env key is SOLO_PROVISIONER_BLOCKNODE_VERSION (not BLOCKNODE_CHARTVERSION).

func Get

func Get() models.Config

Get returns the loaded configuration.

Returns:

  • The global configuration.

func Init

func Init()

func Initialize

func Initialize(path string) error

Initialize loads the configuration from the specified file. Environment variable overrides (SOLO_PROVISIONER_*) are intentionally NOT applied here. They are handled by the RSL layer via WithEnv(EnvConfig()) so that precedence is tracked correctly per-field (env > config file, but not > CLI flags).

Parameters:

  • path: The path to the configuration file.

Returns:

  • An error if the configuration cannot be loaded.

func IsProxyEnabled added in v0.16.0

func IsProxyEnabled() bool

IsProxyEnabled returns whether proxy mode is currently active.

func OverrideAlloyConfig

func OverrideAlloyConfig(overrides models.AlloyConfig)

OverrideAlloyConfig updates the Alloy configuration with provided overrides. Empty string values are ignored (not applied). Remote arrays are always replaced (declarative semantics) - pass empty arrays to clear remotes. Note: Passwords are managed via Vault and External Secrets Operator.

func OverrideBlockNodeConfig

func OverrideBlockNodeConfig(overrides models.BlockNodeConfig)

OverrideBlockNodeConfig updates the block node configuration with provided overrides. Empty string values are ignored (not applied).

func OverrideTeleportConfig

func OverrideTeleportConfig(overrides models.TeleportConfig)

OverrideTeleportConfig updates the Teleport configuration with provided overrides. Empty string values are ignored (not applied).

func ServiceAccount

func ServiceAccount() security.ServiceAccount

func Set

func Set(c *models.Config) error

func SetProfile

func SetProfile(profile string)

SetProfile sets the active profile in the global configuration.

func SetProxy added in v0.16.0

func SetProxy(cfg models.ProxyConfig)

SetProxy updates the global proxy configuration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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