generator

package
v0.0.2-0...-b1fb284 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchProviderSecrets

func FetchProviderSecrets(p providers.SecretsProvider, spec SecretsSpec) (map[string]string, error)

func ProviderRegistry

func ProviderRegistry(params map[string]string) map[string]func() (providers.SecretsProvider, error)

Types

type Literal

type Literal struct {
	Key   string
	Value string
}

func (*Literal) UnmarshalYAML

func (l *Literal) UnmarshalYAML(unmarshal func(interface{}) error) error

type RegistryFunc

type RegistryFunc func(params map[string]string) map[string]func() (providers.SecretsProvider, error)

type SecretGenerator

type SecretGenerator struct {
	Meta     types.ObjectMeta `yaml:"metadata"`
	Type     string           `yaml:"type"`
	Sources  []SecretSource   `yaml:"sources"`
	Literals []Literal        `yaml:"literals"`
}

func ParseConfig

func ParseConfig(data []byte) (*SecretGenerator, error)

func (*SecretGenerator) FetchSecrets

func (sg *SecretGenerator) FetchSecrets(registry RegistryFunc) (map[string]string, error)

func (*SecretGenerator) Generate

func (sg *SecretGenerator) Generate(secrets map[string]string) *k8s.Secret

type SecretSource

type SecretSource struct {
	Provider    string `yaml:"provider"`
	SecretsSpec `yaml:",inline"`
	Params      map[string]string `yaml:"params"`
}

type SecretsSpec

type SecretsSpec struct {
	KVLiterals []string  `yaml:"kv"`
	Literals   []Literal `yaml:"literals"`
}

Jump to

Keyboard shortcuts

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