config

package
v0.40.0 Latest Latest
Warning

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

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

Documentation

Overview

Package config provides utilities for reading configfiles

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(files []string, scheme *runtime.Scheme) (*v2alpha2.ProjectConfig, error)

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

func MatchesIgnorePattern(ignorePatterns []string, id string) (bool, error)

MatchesIgnorePattern matches a specified ignore pattern, and excludes matches from being deleted

func OptionsFromConfig added in v0.8.0

func OptionsFromConfig(cfg *v2alpha2.ProjectConfig, scheme *runtime.Scheme) manager.Options

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.

Jump to

Keyboard shortcuts

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