Documentation
¶
Overview ¶
Package config provides utilities for reading configfiles
Index ¶
- func Load(files []string, scheme *runtime.Scheme) (*v2alpha2.ProjectConfig, error)
- func MatchesIgnorePattern(ignorePatterns []string, id string) (bool, error)
- func OptionsFromConfig(cfg *v2alpha2.ProjectConfig, scheme *runtime.Scheme) manager.Options
- func TokenFromConfig(cfg *v2alpha2.ProjectConfig) (string, error)
- type StringSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
Load loads controller configuration from the given files using the types registered in the scheme. When multiple files are provided, they are deep-merged in order: the first file is the base and each subsequent file is an overlay whose values take precedence. Fields not present in an overlay file are preserved from the base.
func MatchesIgnorePattern ¶ added in v0.23.0
MatchesIgnorePattern matches a specified ignore pattern, and excludes matches from being deleted
func OptionsFromConfig ¶ added in v0.8.0
OptionsFromConfig creates a manager.Options based on a configuration file
func TokenFromConfig ¶ added in v0.12.5
func TokenFromConfig(cfg *v2alpha2.ProjectConfig) (string, error)
TokenFromConfig returns the Styra DAS api token directly from "styra.token" in the config or using the "styra.tokenSecretPath" to retrieve it fra a secret
Types ¶
type StringSlice ¶ added in v0.40.0
type StringSlice []string
StringSlice implements flag.Value for a repeatable string flag. Each call to Set appends a value, allowing --flag=a --flag=b syntax.
func (*StringSlice) Set ¶ added in v0.40.0
func (s *StringSlice) Set(val string) error
Set appends a value to the slice. Called once per flag occurrence.
func (*StringSlice) String ¶ added in v0.40.0
func (s *StringSlice) String() string
String returns the flag value as a comma-separated string.