csivolumes

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PodNameContextKey = "csi.storage.k8s.io/pod.name"

	// CSIVolumeAttributeModeField used for identifying the origin of the NodePublishVolume request
	CSIVolumeAttributeModeField     = "mode"
	CSIVolumeAttributeDynakubeField = "dynakube"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BindConfig

type BindConfig struct {
	TenantUUID       string
	Version          string
	ImageDigest      string
	DynakubeName     string
	MaxMountAttempts int
}

func NewBindConfig

func NewBindConfig(ctx context.Context, access metadata.Access, volumeCfg *VolumeConfig) (*BindConfig, error)

func (BindConfig) IsArchiveAvailable

func (cfg BindConfig) IsArchiveAvailable() bool

func (BindConfig) MetricVersionLabel

func (cfg BindConfig) MetricVersionLabel() string

type Publisher

type Publisher interface {
	PublishVolume(ctx context.Context, volumeCfg *VolumeConfig) (*csi.NodePublishVolumeResponse, error)
	UnpublishVolume(ctx context.Context, volumeInfo *VolumeInfo) (*csi.NodeUnpublishVolumeResponse, error)
	CanUnpublishVolume(ctx context.Context, volumeInfo *VolumeInfo) (bool, error)
}

type VolumeConfig

type VolumeConfig struct {
	VolumeInfo
	PodName      string
	Mode         string
	DynakubeName string
}

Represents the config needed to mount a volume

func ParseNodePublishVolumeRequest

func ParseNodePublishVolumeRequest(req *csi.NodePublishVolumeRequest) (*VolumeConfig, error)

Transforms the NodePublishVolumeRequest into a VolumeConfig

type VolumeInfo

type VolumeInfo struct {
	VolumeID   string
	TargetPath string
}

Represents the basic information about a volume

func ParseNodeUnpublishVolumeRequest

func ParseNodeUnpublishVolumeRequest(req *csi.NodeUnpublishVolumeRequest) (*VolumeInfo, error)

Transforms the NodeUnpublishVolumeRequest into a VolumeInfo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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