fio

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// DefaultNS describes the default namespace
	DefaultNS = "default"
	// PodNamespaceEnvKey describes the pod namespace env variable
	PodNamespaceEnvKey = "POD_NAMESPACE"
	// DefaultFIOJob describes the default FIO job
	DefaultFIOJob = "default-fio"
	// KubestrFIOJob describes the default FIO job
	KubestrFIOJobGenName = "kubestr-fio"
	// ConfigMapSCKey describes the storage class key in a config map
	ConfigMapSCKey = "storageclass"
	// ConfigMapSizeKey describes the size key in a config map
	ConfigMapSizeKey = "pvcsize"
	// ConfigMapJobKey is the default fio job key
	ConfigMapJobKey = "fiojob"
	// DefaultPVCSize is the default PVC size
	DefaultPVCSize = "100Gi"
	// PVCGenerateName is the name to generate for the PVC
	PVCGenerateName = "kubestr-fio-pvc-"
	// PodGenerateName is the name to generate for the POD
	PodGenerateName = "kubestr-fio-pod-"
	// ContainerName is the name of the container that runs the job
	ContainerName = "kubestr-fio"
	// PodNameEnvKey is the name of the variable used to get the current pod name
	PodNameEnvKey = "HOSTNAME"
	// ConfigMapMountPath is the path where we mount the configmap
	ConfigMapMountPath = "/etc/fio-config"
	// VolumeMountPath is the path where we mount the volume
	VolumeMountPath = "/dataset"
	// CreatedByFIOLabel is the key that desrcibes the label used to mark configmaps
	CreatedByFIOLabel = "createdbyfio"
)

Variables

This section is empty.

Functions

func GetPodNamespace

func GetPodNamespace() string

GetPodNamespace gets the pods namespace or returns default

Types

type FIO

type FIO interface {
	RunFio(ctx context.Context, args *RunFIOArgs) (string, error) // , test config
}

FIO is an interface that represents FIO related commands

type FIOrunner

type FIOrunner struct {
	Cli kubernetes.Interface
	// contains filtered or unexported fields
}

FIOrunner implments FIO

func (*FIOrunner) RunFio

func (f *FIOrunner) RunFio(ctx context.Context, args *RunFIOArgs) (string, error)

func (*FIOrunner) RunFioHelper

func (f *FIOrunner) RunFioHelper(ctx context.Context, args *RunFIOArgs) (string, error)

type RunFIOArgs

type RunFIOArgs struct {
	StorageClass  string
	ConfigMapName string
	JobName       string
}

Jump to

Keyboard shortcuts

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