consts

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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  = "kubeconfig"
	CmdOptLogLevel        = "log-level"
	CmdOptImage           = "image"
	CmdOptImageRegistry   = "image-registry"
	CmdOptImagePullSecret = "image-pull-secret"

	// General options
	CmdOptName            = "name"
	CmdOptNamespace       = "namespace"
	CmdOptNodeId          = "node-id"
	CmdOptOperatingSystem = "operating-system"
	CmdOptOutputFile      = "output-file"
	CmdOptTargetDirectory = "target-dir"
	CmdOptUpdatePackages  = "update-packages"
	CmdOptNodeSelector    = "node-selector"
	CmdOptTolerations     = "tolerations"
	CmdOptAll             = "all"

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

	// 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"
	EnvRestartKubelet       = "RESTART_KUBELET"
	EnvRestartKubeletWindow = "RESTART_KUBELET_WINDOW"
)

SPDK related environment variables

View Source
const (
	ImageBciBase = "registry.suse.com/bci/bci-base:15.7"
	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 (
	PreflightCheckTopicContainerOptimizedOS = "ContainerOptimizedOS"
	PreflightCheckTopicMultipathService     = "MultipathService"
	PreflightCheckTopicIscsidService        = "IscsidService"
	PreflightCheckTopicIOMMU                = "IOMMU"
	PreflightCheckTopicHugePages            = "HugePages"
	PreflightCheckTopicCpuInstructionSet    = "CPUInstructionSet"
	PreflightCheckTopicPackages             = "Packages"
	PreflightCheckTopicKernelModules        = "KernelModules"
	PreflightCheckTopicKubeDNS              = "KubeDNS"
	PreflightCheckTopicNFS                  = "NFSv4"
	PreflightCheckTopicSPDK                 = "SPDK"
	PreflightCheckTopicInternalError        = "InternalError"
)
View Source
const (
	KubeAppLabel    = "k8s-app"
	KubeAppValueDNS = "kube-dns"
)
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 (
	NamespaceLonghorn = "longhorn-system"
)
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