Documentation
¶
Overview ¶
Package config provides configuration loading for the krci CLI. It uses Viper for layered config: flags > env vars > config file > defaults.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
IssuerURL string `mapstructure:"issuer-url"`
ClientID string `mapstructure:"client-id"`
Scopes string `mapstructure:"scopes"`
PortalURL string `mapstructure:"portal-url"`
ClusterName string `mapstructure:"cluster-name"`
Namespace string `mapstructure:"namespace"`
TokenPath string
KeyringService string
ConfigDir string
}
Config holds all resolved configuration values.
type Loader ¶ added in v0.20.0
type Loader struct {
// contains filtered or unexported fields
}
Loader resolves a Config from flags, env vars, the config file, and defaults.
func New ¶ added in v0.20.0
New builds a Loader over fs: flags > env > file > defaults. Register the flags on fs before calling New; flags added later are not bound. New reads the config file once; a file that exists but cannot be read or parsed is reported on w and ignored. Flag values are read when Resolve runs. w must be non-nil.