config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	K8s                     = "k8s_secrets"
	File                    = "file"
	ConjurMapKey            = "conjur-map"
	DefaultRetryCountLimit  = 5
	DefaultRetryIntervalSec = 1
	MinRetryValue           = 0
)

Constants for Secrets Provider operation modes, and Defaults for some SP settings

View Source
const (
	TYPESTRING annotationType = iota
	TYPEINT
	TYPEBOOL
)

Represents each annotation input value type, used during input value validation

Variables

This section is empty.

Functions

func GatherSecretsProviderSettings

func GatherSecretsProviderSettings(annotations map[string]string) map[string]string

GatherSecretsProviderSettings returns a string-to-string map of all provided environment variables and parsed, valid annotations that are concerned with Secrets Provider Config.

func ValidateAnnotations

func ValidateAnnotations(annotations map[string]string) ([]error, []error)

ValidateAnnotations confirms that the provided annotations are properly formated, have the proper value type, and if the annotation in question had a defined set of accepted values, the provided value is confirmed. Function returns a list of Error logs, and a list of Info logs.

func ValidateSecretsProviderSettings

func ValidateSecretsProviderSettings(envAndAnnots map[string]string) ([]error, []error)

ValidateSecretsProviderSettings confirms that the provided environment variable and annotation settings yield a valid Secrets Provider configuration. Returns a list of Error logs, and a list of Info logs.

Types

type Config

type Config struct {
	PodNamespace       string
	RequiredK8sSecrets []string
	RetryCountLimit    int
	RetryIntervalSec   int
	StoreType          string
}

Config defines the configuration parameters for the authentication requests

func NewConfig

func NewConfig(settings map[string]string) *Config

NewConfig creates a new Secrets Provider configuration for a validated map of environment variable and annotation settings.

Jump to

Keyboard shortcuts

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