helpers

package
v19.10.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 2 Imported by: 57

Documentation

Index

Constants

View Source
const (
	KubernetesHelper = "k8s_csi_helper"
	PlainCSIHelper   = "plain_csi_helper"

	EventTypeNormal  = "Normal"
	EventTypeWarning = "Warning"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature string

type HybridPlugin

type HybridPlugin interface {

	// GetVolumeConfig accepts the attributes of a volume being requested by the CSI
	// provisioner, adds in any CO-specific details about the new volume, and returns
	// a VolumeConfig structure as needed by Trident to create a new volume.
	GetVolumeConfig(
		name string, sizeBytes int64, parameters map[string]string,
		protocol config.Protocol, accessModes []config.AccessMode, volumeMode config.VolumeMode, fsType string,
	) (*storage.VolumeConfig, error)

	// GetSnapshotConfig accepts the attributes of a snapshot being requested byt the CSI
	// provisioner, adds in any CO-specific details about the new volume, and returns
	// a SnapshotConfig structure as needed by Trident to create a new snapshot.
	GetSnapshotConfig(volumeName, snapshotName string) (*storage.SnapshotConfig, error)

	// RecordVolumeEvent accepts the name of a CSI volume and writes the specified
	// event message in a manner appropriate to the container orchestrator.
	RecordVolumeEvent(name, eventType, reason, message string)

	//SupportsFeature accepts a CSI feature and returns true if the feature is supported.
	SupportsFeature(feature Feature) bool

	// Version returns the version of the CO this helper is managing, or the supported
	// CSI version in the plain-CSI case.  This value is reported in Trident's telemetry.
	Version() string
}

HybridPlugin is the common interface used by the "helper" objects used by the CSI controller. The helpers supply CO-specific details at certain points of CSI workflows.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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