secrets

package
v0.0.18 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ResolverMap = map[string]SecretResolver{
		"exec": &ExecResolver{},
	}
)

Functions

func InjectSecrets

func InjectSecrets(ctx context.Context, k8sC client.Client, conf SecretConfig) error

Types

type ExecResolver

type ExecResolver struct{}

func (*ExecResolver) Resolve

func (r *ExecResolver) Resolve(ctx context.Context, args []string) (string, error)

type Secret

type Secret struct {
	Type            string   `yaml:"Type,omitempty"`
	Args            []string `yaml:"Args,omitempty"`
	SecretName      string   `yaml:"SecretName,omitempty"`
	SecretKey       string   `yaml:"SecretKey,omitempty"`
	SecretNamespace string   `yaml:"SecretNamespace,omitempty"`
}

func NewSecret

func NewSecret(defaultCapacity int) Secret

type SecretConfig

type SecretConfig struct {
	DefaultName      string   `yaml:"DefaultSecret,omitempty"`
	DefaultNamespace string   `yaml:"DefaultNamespace,omitempty"`
	Secrets          []Secret `yaml:"Secrets,omitempty"`
}

func LoadConfigFile

func LoadConfigFile(r io.Reader) (SecretConfig, error)

func NewSecretConfig

func NewSecretConfig(defaultCapacity int, defaultSecretCapacity int) SecretConfig

type SecretResolver

type SecretResolver interface {
	Resolve(ctx context.Context, args []string) (string, error)
}

Jump to

Keyboard shortcuts

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