crypto

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMustUseVTPMOrEncryptedStorageClass is returned by the Reconcile
	// function if an EncryptionClass is specified without using an encrypted
	// StorageClass or vTPM.
	ErrMustUseVTPMOrEncryptedStorageClass = errors.New(
		"must use encrypted StorageClass or have vTPM")

	// ErrMustNotUseVTPMOrEncryptedStorageClass is returned by the Reconcile
	// function is an encrypted StorageClass or vTPM are used without specifying
	// an EncryptionClass or if there is no default key provider.
	ErrMustNotUseVTPMOrEncryptedStorageClass = errors.New(
		"vTPM and/or encrypted StorageClass require encryption")

	// ErrNoDefaultKeyProvider is returned by the Reconcile function if an
	// existing VM is encrypted, no EncryptionClass is specified, and there is
	// no default key provider.
	ErrNoDefaultKeyProvider = errors.New("no default key provider")

	// ErrInvalidKeyProvider is returned if the key provider specified by an
	// EncryptionClass is invalid.
	ErrInvalidKeyProvider = errors.New("invalid key provider")

	// ErrInvalidKeyID is returned if the key id specified by an
	// EncryptionClass is invalid.
	ErrInvalidKeyID = errors.New("invalid key id")
)

Functions

func New

New returns a new Reconciler for a VM's crypto state.

func SprintfStateNotSynced

func SprintfStateNotSynced(op string, msgs ...string) string

SprintfStateNotSynced formats and returns the message for when the encryption state cannot be synced.

Types

type Reason

type Reason uint8

Reason is the type used by reasons given to the condition vmopv1.VirtualMachineEncryptionSynced.

const (
	ReasonInternalError Reason = 1 << iota
	ReasonEncryptionClassNotFound
	ReasonEncryptionClassInvalid
	ReasonNoDefaultKeyProvider
	ReasonInvalidState
	ReasonInvalidChanges
	ReasonReconfigureError
)

func (Reason) MaxValue

func (r Reason) MaxValue() Reason

func (Reason) String

func (r Reason) String() string

func (Reason) StringValue

func (r Reason) StringValue() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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