consts

package
v1.7.3-dev-20241020 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Binary names
	CmdLonghornctlLocal  = "longhornctl-local"
	CmdLonghornctlRemote = "longhornctl"
)
View Source
const (
	// The first layer of subcommands (verb)
	SubCmdCheck   = "check"
	SubCmdExport  = "export"
	SubCmdGet     = "get"
	SubCmdInstall = "install"
	SubCmdTrim    = "trim"

	// The second layer of subcommands (noun)
	SubCmdPreflight = "preflight"
	SubCmdReplica   = "replica"
	SubCmdVolume    = "volume"

	// The third layer of subcommands (action to the previous layers)
	SubCmdStop = "stop"

	// Other subcommands
	SubCmdVersion = "version"
)
View Source
const (
	// Global options
	CmdOptKubeConfigPath = "kube-config"
	CmdOptLogLevel       = "log-level"
	CmdOptImage          = "image"

	// General options
	CmdOptName            = "name"
	CmdOptNodeId          = "node-id"
	CmdOptOperatingSystem = "operating-system"
	CmdOptOutputFile      = "output-file"
	CmdOptTargetDirectory = "target-dir"
	CmdOptUpdatePackages  = "update-packages"

	// SPDK options
	CmdOptAllowPci        = "allow-pci"
	CmdOptDriverOverride  = "driver-override"
	CmdOptEnableSpdk      = "enable-spdk"
	CmdOptHugePageSize    = "huge-page-size"
	CmdOptSpdkOptions     = "spdk-options"
	CmdOptUserspaceDriver = "userspace-driver"

	// Longhorn options
	CmdOptLonghornDataDirectory = "data-dir"
	CmdOptLonghornEngineImage   = "engine-image"
	CmdOptLonghornNamespace     = "longhorn-namespace"
	CmdOptLonghornVolumeName    = "volume-name"
)
View Source
const (
	EnvCurrentNodeID  = "CURRENT_NODE_ID"
	EnvKubeConfigPath = "KUBECONFIG"
	EnvLogLevel       = "LOG_LEVEL"
	EnvOutputFilePath = "OUTPUT_FILE_PATH"

	EnvLonghornDataDirectory = "LONGHORN_DATA_DIRECTORY"
	EnvLonghornNamespace     = "LONGHORN_NAMESPACE"
	EnvLonghornReplicaName   = "REPLICA_NAME"
	EnvLonghornVolumeName    = "VOLUME_NAME"
)
View Source
const (
	EnvDriverOverride    = "DRIVER_OVERRIDE"
	EnvEnableSpdk        = "ENABLE_SPDK"
	EnvHugePageSize      = "HUGEMEM"
	EnvPciAllowed        = "PCI_ALLOWED"
	EnvUserspaceDriver   = "USERSPACE_DRIVER"
	EnvUpdatePackageList = "UPDATE_PACKAGE_LIST"
	EnvSpdkOptions       = "SPDK_OPTIONS"
)

SPDK related environment variables

View Source
const (
	ImageBciBase = "registry.suse.com/bci/bci-base:15.5"
	ImagePause   = "registry.k8s.io/pause:3.1"
)
View Source
const (
	ContainerName       = "longhornctl"
	ContainerNameEngine = "engine"
	ContainerNameInit   = "init-longhornctl"
	ContainerNameOutput = "output-longhornctl"
	ContainerNamePause  = "pause"
)
View Source
const (
	ContainerConditionMaxTolerationLong   = 60 * 10 // 10 minutes: for container responsible for long running tasks. For example: package installation.
	ContainerConditionMaxTolerationMedium = 60 * 5  // 5 minutes: for container responsible for medium running tasks. For example: export replica.
	ContainerConditionMaxTolerationShort  = 60      // 1 minute: for container responsible for short running tasks. For example: print file contents.
)
View Source
const (
	VolumeMountHostName      = "host"
	VolumeMountHostDirectory = "/host"

	VolumeMountSharedName      = "shared"
	VolumeMountSharedDirectory = "/shared"

	VolumeMountHostExporterName      = "host-exporter"
	VolumeMountHostExporterDirectory = "/host-exporter"

	VolumeMountEntrypointName      = "entrypoint"
	VolumeMountEntrypointDirectory = "/scripts"

	VolumeMountVolumeName      = "volume"
	VolumeMountVolumeDirectory = "/volume"
)
View Source
const (
	FileNamePreStopScript = "pre-stop.sh"
	FileNameOutputJSON    = "output.json"
)
View Source
const (
	LogPrefixError = "ERROR: "
	LogPrefixWarn  = "WARN: "
)
View Source
const (
	AppNamePreflightChecker              = "longhorn-preflight-checker"
	AppNamePreflightContainerOptimizedOS = "longhorn-gke-cos-node-agent"
	AppNamePreflightInstaller            = "longhorn-preflight-installer"
)
View Source
const (
	AppNameReplicaExporter = "longhorn-replica-exporter"
	AppNameReplicaGetter   = "longhorn-replica-getter"
)
View Source
const (
	AppNameVolumeTrimmer = "longhorn-volume-trimmer"
)
View Source
const CmdOptSeperator = ","
View Source
const LonghornDiskConfigFile = "longhorn-disk.cfg"
View Source
const LonghornServiceAccountName = "longhorn-service-account"
View Source
const SpdkPath = "/tmp/longhorn-spdk"

Variables

View Source
var (
	ImageEngine      = fmt.Sprintf("longhornio/longhorn-engine:%s", meta.Version)
	ImageLonghornCli = fmt.Sprintf("longhornio/longhorn-cli:%s", meta.Version)
)

Functions

This section is empty.

Types

type DependencyModuleType

type DependencyModuleType int
const (
	DependencyModuleDefault DependencyModuleType = iota
	DependencyModuleSpdk
)

type OperatingSystem

type OperatingSystem string
const (
	OperatingSystemContainerOptimizedOS OperatingSystem = "cos"
)

Jump to

Keyboard shortcuts

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