Documentation
¶
Index ¶
- Variables
- func DefaultsConfig() models.Config
- func EnvConfig() models.Config
- func Get() models.Config
- func Init()
- func Initialize(path string) error
- func IsProxyEnabled() bool
- func OverrideAlloyConfig(overrides models.AlloyConfig)
- func OverrideBlockNodeConfig(overrides models.BlockNodeConfig)
- func OverrideTeleportConfig(overrides models.TeleportConfig)
- func ServiceAccount() security.ServiceAccount
- func Set(c *models.Config) error
- func SetProfile(profile string)
- func SetProxy(cfg models.ProxyConfig)
Constants ¶
This section is empty.
Variables ¶
var ( ErrNamespace = errorx.NewNamespace("config") NotFoundError = ErrNamespace.NewType("not_found", errorx.NotFound()) )
Functions ¶
func DefaultsConfig ¶ added in v0.16.0
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
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 Initialize ¶
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 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.