secrets

package
v2.19.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 13 Imported by: 194

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SelectSecrets added in v2.11.0

func SelectSecrets(requested set.Set[string], retrieved map[string]string) map[string]string

func SliceToClientObjectSlice

func SliceToClientObjectSlice(s []*v1.Secret) []client.Object

func ValidateDestinations added in v2.9.0

func ValidateDestinations(
	self any,
	destinations []*genruntime.SecretDestination,
	destinationExpressions []*core.DestinationExpression,
) (admission.Warnings, error)

ValidateDestinations checks that no two destinations are writing to the same secret/key, as that could cause those secrets to overwrite one another.

func ValidateOptionalReferences added in v2.19.0

func ValidateOptionalReferences(pairs []*OptionalReferencePair) (admission.Warnings, error)

ValidateOptionalReferences checks that only one of Foo and FooFromSecret are set

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector collects secret values and their associated genruntime.SecretDestination's and produces a merged set of v1.Secret's that can be written.

func NewCollector

func NewCollector(namespace string) *Collector

NewCollector creates a new Collector

func (*Collector) AddBinaryValue

func (c *Collector) AddBinaryValue(dest *genruntime.SecretDestination, value []byte)

AddBinaryValue adds the dest and secretValue pair to the collector. If another value has already been added going to the same secret (but with a different key) the new key is merged into the existing secret.

func (*Collector) AddValue

func (c *Collector) AddValue(dest *genruntime.SecretDestination, value string)

AddValue adds the dest and secretValue pair to the collector. If another value has already been added going to the same secret (but with a different key) the new key is merged into the existing secret.

func (*Collector) Values

func (c *Collector) Values() ([]*v1.Secret, error)

Values returns the set of secrets that have been collected.

type Exporter added in v2.10.0

type Exporter interface {
	SecretDestinationExpressions() []*core.DestinationExpression
}

Exporter defines an interface for exporting Secrets based on CEL expressions.

type OptionalReferencePair added in v2.19.0

type OptionalReferencePair struct {
	Value   *string
	Ref     *genruntime.SecretReference
	Name    string
	RefName string
}

OptionalReferencePair represents an optional secret pair. Each pair has two optional fields, a string and a SecretReference. This type is used purely for validation. The actual user supplied types are inline on the objects themselves as two properties: Foo and FooFromSecret

Jump to

Keyboard shortcuts

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