plugin

package
v0.6.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	VeleroDeploymentName   = "velero"
	NodeAgentDaemonsetName = "node-agent"
	ResticDaemonsetName    = "restic"
)
View Source
const VolumeProviderKey = "app"
View Source
const VolumeProviderLabel = "velero"

Variables

This section is empty.

Functions

func CheckMAC

func CheckMAC(message, messageMAC, key []byte) bool

CheckMAC verifies hash checksum

func IsSignedURLValid

func IsSignedURLValid(requestURL, namespace string) (bool, error)

IsSignedURL validates the expiration and signature of a signed url. Namespace is used to get the signing key from a k8s secret.

func SignURL

func SignURL(signedUrl *url.URL, namespace string, ttl time.Duration) error

SignURL takes in a URL and adds a sha1 signature and expiration to it. Namespace is used to create or get the signing key from a k8s secret.

func StringToIntPointer

func StringToIntPointer(x string) (*int64, error)

StringToIntPointer converts a string to a pointer to an int.

Types

type EnsureResourcesOpts added in v0.4.0

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

type LocalVolumeObjectStore

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

func NewLocalVolumeObjectStore

func NewLocalVolumeObjectStore(log logrus.FieldLogger, v VolumeType) *LocalVolumeObjectStore

NewLocalVolumeObjectStore instantiates a LocalVolumeObjectStore with a particular target volume type.

func (*LocalVolumeObjectStore) CreateSignedURL

func (o *LocalVolumeObjectStore) CreateSignedURL(bucket, key string, ttl time.Duration) (string, error)

CreateSignedURL creates a signed URL to the pod ID for anonymous external access to LocalVolumeObjectStore files. It is part of the Velero plugin interface.

func (*LocalVolumeObjectStore) DeleteObject

func (o *LocalVolumeObjectStore) DeleteObject(bucket, key string) error

DeleteObject removes a files from the LocalVolumeObjectStore. It is part of the Velero plugin interface.

func (*LocalVolumeObjectStore) GetObject

func (o *LocalVolumeObjectStore) GetObject(bucket, key string) (io.ReadCloser, error)

GetObject returns truthy if an object is in the LocalVolumeObjectStore. It is part of the Velero plugin interface.

func (*LocalVolumeObjectStore) Init

func (o *LocalVolumeObjectStore) Init(config map[string]string) error

Init initializes the plugin. It can be called multiple times. It is part of the Velero plugin interface.

func (*LocalVolumeObjectStore) ListCommonPrefixes

func (o *LocalVolumeObjectStore) ListCommonPrefixes(bucket, prefix, delimiter string) ([]string, error)

ListCommonPrefixes returns a list of subdirectories in the root of the LocalVolumeObjectStore. It is part of the Velero plugin interface.

func (*LocalVolumeObjectStore) ListObjects

func (o *LocalVolumeObjectStore) ListObjects(bucket, prefix string) ([]string, error)

ListObjects returns a list of files in the LocalVolumeObjectStore. It is part of the Velero plugin interface.

func (*LocalVolumeObjectStore) ObjectExists

func (o *LocalVolumeObjectStore) ObjectExists(bucket, key string) (bool, error)

ObjectExists returns truthy if an object is in the LocalVolumeObjectStore. It is part of the Velero plugin interface.

func (*LocalVolumeObjectStore) PutObject

func (o *LocalVolumeObjectStore) PutObject(bucket string, key string, body io.Reader) error

PutObject puts an object into the LocalVolumeObjectStore. It is part of the Velero plugin interface.

type VolumeType

type VolumeType string
const (
	Hostpath VolumeType = "hostpath"
	NFS      VolumeType = "nfs"
	PVC      VolumeType = "pvc"
)

Jump to

Keyboard shortcuts

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