Documentation
¶
Index ¶
- Constants
- Variables
- func GetValidProtocolNames() []string
- func IsValidProtocol(p Protocol) bool
- func PlatformAtLeast(platformName, version string) bool
- func ValidateKubernetesVersion(k8sMinVersion string, k8sVersion *utils.Version) error
- func ValidateKubernetesVersionFromInfo(k8sMinVersion string, versionInfo *k8sversion.Info) error
- type AccessMode
- type DriverContext
- type PersistentStateVersion
- type Platform
- type Protocol
- type Telemetry
- type VolumeMode
- type VolumeType
Constants ¶
View Source
const ( /* Misc. orchestrator constants */ OrchestratorName = "trident" OrchestratorClientName = OrchestratorName + "ctl" OrchestratorAPIVersion = "1" DefaultOrchestratorVersion = "22.10.0" PersistentStoreBootstrapAttempts = 30 PersistentStoreBootstrapTimeout = PersistentStoreBootstrapAttempts * time.Second PersistentStoreTimeout = 10 * time.Second DockerCreateTimeout = 115 * time.Second DockerDefaultTimeout = 55 * time.Second /* REST/HTTP constants */ HTTPTimeout = 90 * time.Second HTTPTimeoutString = "90s" CACertName = "trident-ca" ServerCertName = "trident-csi" // Must match CSI service name ClientCertName = "trident-node" CAKeyFile = "caKey" CACertFile = "caCert" ServerKeyFile = "serverKey" ServerCertFile = "serverCert" ClientKeyFile = "clientKey" ClientCertFile = "clientCert" AESKeyFile = "aesKey" CAKeyPath = certsPath + CAKeyFile CACertPath = certsPath + CACertFile ServerKeyPath = certsPath + ServerKeyFile ServerCertPath = certsPath + ServerCertFile ClientKeyPath = certsPath + ClientKeyFile ClientCertPath = certsPath + ClientCertFile AESKeyPath = certsPath + AESKeyFile /* Protocol constants. This value denotes a volume's backing storage protocol. For example, a Trident volume with 'file' protocol is most likely NFS, while a 'block' protocol volume is probably iSCSI. */ File Protocol = "file" Block Protocol = "block" BlockOnFile Protocol = "blockOnFile" ProtocolAny Protocol = "" /* Access mode constants */ ReadWriteOnce AccessMode = "ReadWriteOnce" ReadOnlyMany AccessMode = "ReadOnlyMany" ReadWriteMany AccessMode = "ReadWriteMany" ModeAny AccessMode = "" /* Volume mode constants. This value describes how a volume will be consumed by application containers. Most Trident volumes (regardless of protocol) probably use the 'Filesystem' mode, where the volume contains a filesystem and is mounted into a container. By contrast, volumes with 'Block' mode always use 'block' protocol and are attached to a container as raw block devices. */ RawBlock VolumeMode = "Block" Filesystem VolumeMode = "Filesystem" // Filesystem types FsXfs = "xfs" FsExt3 = "ext3" FsExt4 = "ext4" FsRaw = "raw" // Block-On-File Filesystem types FsNFSXfs = "nfs/xfs" FsNFSExt3 = "nfs/ext3" FsNFSExt4 = "nfs/ext4" FsNFSRaw = "nfs/raw" /* Volume type constants */ OntapNFS VolumeType = "ONTAP_NFS" OntapISCSI VolumeType = "ONTAP_iSCSI" SolidFireISCSI VolumeType = "SolidFire_iSCSI" UnknownVolumeType VolumeType = "" /* Driver-related constants */ DefaultSolidFireVAG = OrchestratorName UnknownDriver = "UnknownDriver" StorageAPITimeoutSeconds = 90 SANResizeDelta = 50000000 // 50mb /* REST frontend constants */ MaxRESTRequestSize = 40960 MinServerTLSVersion = tls.VersionTLS13 MinClientTLSVersion = tls.VersionTLS12 /* Docker constants */ DockerPluginModeEnvVariable = "DOCKER_PLUGIN_MODE" // set via contrib/docker/plugin/plugin.json DockerPluginConfigLocation = "/etc/netappdvp" /* Kubernetes deployment constants */ ContainerTrident = "trident-main" ContextDocker DriverContext = "docker" ContextCSI DriverContext = "csi" PlatformDocker Platform = "docker" PlatformKubernetes Platform = "kubernetes" PlatformCSI Platform = "csi" // plain CSI, no other CO present // Minimum and maximum supported Kubernetes versions KubernetesVersionMin = "v1.20" KubernetesVersionMax = "v1.25" // KubernetesCSISidecarRegistry is where the CSI sidecar images are hosted KubernetesCSISidecarRegistry = "registry.k8s.io/sig-storage" NamespaceFile = "/var/run/secrets/kubernetes.io/serviceaccount/namespace" // Pod Security Standards PodSecurityStandardsEnforceLabel = "pod-security.kubernetes.io/enforce" PodSecurityStandardsEnforceProfile = "privileged" PodSecurityPoliciesRemovedKubernetesVersion = "1.25" /* Kubernetes operator constants */ OperatorContainerName = "trident-operator" DefaultAutosupportImage = "docker.io/netapp/trident-autosupport:22.07" )
Variables ¶
View Source
var ( ValidProtocols = map[Protocol]bool{ File: true, Block: true, BlockOnFile: true, ProtocolAny: true, } MultiNodeAccessModes = [...]AccessMode{ReadOnlyMany, ReadWriteMany} // BuildHash is the git hash the binary was built from BuildHash = "unknown" // BuildType is the type of build: custom, beta or stable BuildType = "custom" // BuildTypeRev is the revision of the build BuildTypeRev = "0" // BuildTime is the time the binary was built BuildTime = "unknown" // BuildImage is the Trident image that was built BuildImage = "docker.io/netapp/trident:" + DefaultOrchestratorVersion + "-custom.0" OrchestratorVersion = utils.MustParseDate(version()) /* API Server and persistent store variables */ BaseURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion VersionURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/version" BackendURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/backend" BackendUUIDURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/backendUUID" VolumeURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/volume" TransactionURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/txn" StorageClassURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/storageclass" NodeURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/node" SnapshotURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/snapshot" ChapURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/chap" StoreURL = "/" + OrchestratorName + "/store" UsingPassthroughStore bool CurrentDriverContext DriverContext OrchestratorTelemetry = Telemetry{TridentVersion: OrchestratorVersion.String()} )
Functions ¶
func GetValidProtocolNames ¶
func GetValidProtocolNames() []string
func IsValidProtocol ¶
func PlatformAtLeast ¶
func ValidateKubernetesVersionFromInfo ¶
func ValidateKubernetesVersionFromInfo(k8sMinVersion string, versionInfo *k8sversion.Info) error
Types ¶
type AccessMode ¶
type AccessMode string
type DriverContext ¶
type DriverContext string
type PersistentStateVersion ¶
type VolumeMode ¶
type VolumeMode string
type VolumeType ¶
type VolumeType string
Click to show internal directories.
Click to hide internal directories.