base

package
v0.3.0-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Overview

Package base is for basic methods which can be used by all CSI components

Index

Constants

View Source
const (
	// RequestUUID is the constant for context request
	RequestUUID CtxKey = "RequestUUID"
	// PluginName is a name of current CSI plugin
	PluginName = "csi-baremetal"
	// PluginVersion is a version of current CSI plugin
	// TODO: get rid of hardcoded value https://github.com/dell/csi-baremetal/issues/79
	PluginVersion = "0.3.0"
	// DefaultDriveMgrEndpoint is the default gRPC endpoint for drivemgr
	DefaultDriveMgrEndpoint = "tcp://:8888"
	// DefaultHealthIP is the default gRPC IP for Health server
	DefaultHealthIP = ""
	// DefaultHealthPort is the default gRPC port for Health Server
	DefaultHealthPort = 9999
	// DefaultExtenderPort is the default http port for scheduler extender
	DefaultExtenderPort = 8889

	// KubeletRootPath is the pods' path on the node
	KubeletRootPath = "/var/lib/kubelet/pods"

	// HostRootPath is root mount
	HostRootPath = "/hostroot"

	// DefaultTimeoutForVolumeOperations is the timeout in which we expect that any operation with volume should be finished
	DefaultTimeoutForVolumeOperations = 10 * time.Minute

	// DefaultRequeueForVolume is the interval for volume reconcile
	DefaultRequeueForVolume = 5 * time.Second

	// DefaultFsType FS type that used by default
	DefaultFsType = "xfs"

	// StorageTypeKey key from volume_context in CreateVolumeRequest of NodePublishVolumeRequest
	StorageTypeKey = "storageType"
	// SizeKey key from volume_context in CreateVolumeRequest of NodePublishVolumeRequest
	SizeKey = "size"
	// DefaultNamespace represents default namespace in Kubernetes
	DefaultNamespace = "default"
)
View Source
const (
	// LogFormatText represents human readable log format
	LogFormatText = "text"

	// DebugLevel represents debug level for logger
	DebugLevel = "debug"
	// TraceLevel represents trace level for logger
	TraceLevel = "trace"
	// InfoLevel represents info level for logger
	InfoLevel = "info"
)

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(logPath string, logLevel string) (*logrus.Logger, error)

InitLogger attempts to init logrus logger with output path passed in the parameter If path is incorrect or "" then init logger with stdout Receives logPath which is the file to write logs and logrus.Level which is level of logging (For example DEBUG, INFO) Returns created logrus.Logger or error if something went wrong

Types

type CtxKey

type CtxKey string

CtxKey variable type uses for keys in context WithValue

Directories

Path Synopsis
Package cache contains common interface for caches with Get, Delete and Set methods and in memory cache implementation
Package cache contains common interface for caches with Get, Delete and Set methods and in memory cache implementation
linuxutils
datadiscover
Package datadiscover contains code for discovering filesystems, partitions, partition table and LVM PV on drive
Package datadiscover contains code for discovering filesystems, partitions, partition table and LVM PV on drive
datadiscover/types
Package types contains interface and structure for discovering of logic entries on drive
Package types contains interface and structure for discovering of logic entries on drive
fs
Package fs contains code for communicating with system file system utils such as mkdri/mkfs and so on
Package fs contains code for communicating with system file system utils such as mkdri/mkfs and so on
ipmi
Package ipmi contains code for running and interpreting output of system ipmitool util
Package ipmi contains code for running and interpreting output of system ipmitool util
lsblk
Package lsblk contains code for running and interpreting output of system util lsblk
Package lsblk contains code for running and interpreting output of system util lsblk
lvm
Package lvm contains code for running and interpreting output of system logical volume manager utils such as: pvcreate/pvremove, vgcreate/vgremove, lvcreate/lvremove
Package lvm contains code for running and interpreting output of system logical volume manager utils such as: pvcreate/pvremove, vgcreate/vgremove, lvcreate/lvremove
partitionhelper
Package partitionhelper contains code for manipulating with block device partitions and run such system utilites as parted, partprobe, sgdisk
Package partitionhelper contains code for manipulating with block device partitions and run such system utilites as parted, partprobe, sgdisk
Package util contains common utilities
Package util contains common utilities

Jump to

Keyboard shortcuts

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