Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoKeyInSecret is returned when a secret was expected to contain an // encryption key, but didn't. ErrNoKeyInSecret = errors.New("secret does not contain encryption key") )
Functions ¶
This section is empty.
Types ¶
type KeyManager ¶
type KeyManager struct {
// contains filtered or unexported fields
}
KeyManager generates, stores and removes encryption keys.
func New ¶
func New(client client.Client) *KeyManager
New creates a new KeyManager that is responsible for generationg and storing volume encryption keys. The client should be uncached so that created secrets can be read back immediately.
func (*KeyManager) Ensure ¶
func (m *KeyManager) Ensure(ctx context.Context, nsKeyRef client.ObjectKey, volKeyRef client.ObjectKey, nsSecretLabels map[string]string, volSecretLabels map[string]string) error
Ensure that a secret exists at volKeyRef, creating it with valid keys if needed. If a secret already exists, it does not verify validity.
Click to show internal directories.
Click to hide internal directories.