service

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KeyStoragePool is the key used to get the storagepool name from the
	// volume create parameters map
	KeyStoragePool = "storagepool"

	// KeySystemID is the key used to get the array ID from the volume
	// create parameters map
	KeySystemID = "systemID"

	// KeyMkfsFormatOption is the key used to get the file system option from the
	// volume create parameters map
	KeyMkfsFormatOption = "mkfsFormatOption"

	// DefaultVolumeSizeKiB is default volume sgolang/protobuf/blob/master/ptypesize
	// to create on a scaleIO cluster when no size is given, expressed in KiB
	DefaultVolumeSizeKiB = 16 * kiBytesInGiB

	// VolSizeMultipleGiB is the volume size that VxFlexOS creates volumes as
	// a multiple of, meaning that all volume sizes are a multiple of this
	// number
	VolSizeMultipleGiB = 8

	//VolumeIDList is the list of volume IDs
	VolumeIDList = "VolumeIDList"

	//TRUE means "true" (comment put in for lint check)
	TRUE = "TRUE"
	//FALSE means "false" (comment put in for lint check)
	FALSE = "FALSE"
)
View Source
const (
	// These are available when enabling --extra-create-metadata for the external-provisioner.
	CSIPersistentVolumeName           = "csi.storage.k8s.io/pv/name"
	CSIPersistentVolumeClaimName      = "csi.storage.k8s.io/pvc/name"
	CSIPersistentVolumeClaimNamespace = "csi.storage.k8s.io/pvc/namespace"
	// These map to the above fields in the form of HTTP header names.
	HeaderPersistentVolumeName           = "x-csi-pv-name"
	HeaderPersistentVolumeClaimName      = "x-csi-pv-claimname"
	HeaderPersistentVolumeClaimNamespace = "x-csi-pv-namespace"
	// These help identify the system used as part of a request.
	HeaderSystemIdentifier    = "x-csi-system-id"
	HeaderCSIPluginIdentifier = "x-csi-plugin-id"
)

Extra metadata field names for propagating to goscaleio and beyond.

View Source
const (
	// EnvSDCGUID is the name of the environment variable used to set the
	// GUID of the SDC. This is only used by the Node Service, and removes
	// a need for calling an external binary to retrieve the GUID
	EnvSDCGUID = "X_CSI_VXFLEXOS_SDCGUID"

	// EnvThick is the name of the environment variable used to specify
	// that thick provisioning should be used when creating volumes
	EnvThick = "X_CSI_VXFLEXOS_THICKPROVISIONING"

	// EnvAutoProbe is the name of the environment variable used to specify
	// that the controller service should automatically probe itself if it
	// receives incoming requests before having been probed, in direct
	// violation of the CSI spec
	EnvAutoProbe = "X_CSI_VXFLEXOS_AUTOPROBE"

	// EnvAllowRWOMultiPodAccess is the name of the environment variable that specifes
	// within a single node multiple pods should be able to access the same Filesystem volume with access mode ReadWriteOnce.
	// Multi-node access is still not allowed for ReadWriteOnce Filesystem volumes.
	// Enabling this option techincally violates the CSI 1.3 spec in the NodePublishVolume stating the required error returns.
	EnvAllowRWOMultiPodAccess = "X_CSI_ALLOW_RWO_MULTI_POD_ACCESS"
)
View Source
const (
	// Name is the name of the CSI plug-in.
	Name = "csi-vxflexos.dellemc.com"

	// KeyThickProvisioning is the key used to get a flag indicating that
	// a volume should be thick provisioned from the volume create params
	KeyThickProvisioning = "thickprovisioning"

	// SystemTopologySystemValue is the supported topology key
	SystemTopologySystemValue string = "csi-vxflexos.dellemc.com"

	//DefaultLogLevel for csi logs
	DefaultLogLevel = logrus.DebugLevel

	//ParamCSILogLevel csi driver log level
	ParamCSILogLevel = "CSI_LOG_LEVEL"
)

Variables

View Source
var ArrayConfigFile string

ArrayConfigFile is file name with array connection data

View Source
var DriverConfigParamsFile string

DriverConfigParamsFile is the name of the input driver config params file

View Source
var K8sClientset kubernetes.Interface

K8sClientset is the client to query k8s

View Source
var KubeConfig string

KubeConfig is the kube config

View Source
var Log = logrus.New()

Log controlls the logger give default value, will be overwritten by configmap

View Source
var Manifest = map[string]string{
	"url":    "http://github.com/dell/csi-vxflexos",
	"semver": core.SemVer,
	"commit": core.CommitSha32,
	"formed": core.CommitTime.Format(time.RFC1123),
}

Manifest is the SP's manifest.

Functions

This section is empty.

Types

type ArrayConnectionData added in v1.4.0

type ArrayConnectionData struct {
	SystemID                  string `json:"systemID"`
	Username                  string `json:"username"`
	Password                  string `json:"password"`
	Endpoint                  string `json:"endpoint"`
	SkipCertificateValidation bool   `json:"skipCertificateValidation,omitempty"`
	Insecure                  bool   `json:"insecure,omitempty"`
	IsDefault                 bool   `json:"isDefault,omitempty"`
	AllSystemNames            string `json:"allSystemNames"`
}

ArrayConnectionData contains data required to connect to array

type Device

type Device struct {
	FullPath string
	Name     string
	RealDev  string
}

Device is a struct for holding details about a block device

func GetDevice

func GetDevice(path string) (*Device, error)

GetDevice returns a Device struct with info about the given device, or an error if it doesn't exist or is not a block device

type Opts

type Opts struct {
	SdcGUID      string
	Thick        bool
	AutoProbe    bool
	DisableCerts bool   // used for unit testing only
	Lsmod        string // used for unit testing only

	EnableSnapshotCGDelete     bool // when snapshot deleted, enable deleting of all snaps in the CG of the snapshot
	EnableListVolumesSnapshots bool // when listing volumes, include snapshots and volumes
	AllowRWOMultiPodAccess     bool // allow multiple pods to access a RWO volume on the same node
	// contains filtered or unexported fields
}

Opts defines service configuration options.

type Service

type Service interface {
	csi.ControllerServer
	csi.IdentityServer
	csi.NodeServer
	BeforeServe(context.Context, *gocsi.StoragePlugin, net.Listener) error
	RegisterAdditionalServers(server *grpc.Server)
	ProcessMapSecretChange() error
}

Service is the CSI Mock service provider.

func New

func New() Service

New returns a handle to service

Jump to

Keyboard shortcuts

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