Documentation
¶
Overview ¶
Copyright © 2021 Alibaba Group Holding Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021 Alibaba Group Holding Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
const ( // VolumeTypeKey volume type key words VolumeTypeKey = "volumeType" // LvmVolumeType lvm volume type LvmVolumeType = "LVM" // MountPointType type MountPointType = "MountPoint" // DeviceVolumeType type DeviceVolumeType = "Device" // PvcNameTag in annotations PvcNameTag = "csi.storage.k8s.io/pvc/name" // PvcNsTag in annotations PvcNsTag = "csi.storage.k8s.io/pvc/namespace" // NodeSchedueTag in annotations NodeSchedueTag = "volume.kubernetes.io/selected-node" // LastAppliyAnnotationTag tag LastAppliyAnnotationTag = "kubectl.kubernetes.io/last-applied-configuration" // CsiProvisionerIdentity tag CsiProvisionerIdentity = "storage.kubernetes.io/csiProvisionerIdentity" // CsiProvisionerTag tag CsiProvisionerTag = "volume.beta.kubernetes.io/storage-provisioner" // StripingType striping type StripingType = "striping" // connection timeout DefaultConnectTimeout = 3 // TopologyNodeKey define host name of node TopologyNodeKey = "kubernetes.io/hostname" )
const ( // VgNameTag is the vg name tag VgNameTag = "vgName" // VolumeTypeTag is the pv type tag VolumeTypeTag = "volumeType" // PvTypeTag is the pv type tag PvTypeTag = "pvType" // FsTypeTag is the fs type tag FsTypeTag = "fsType" // LvmTypeTag is the lvm type tag LvmTypeTag = "lvmType" // NodeAffinity is the pv node schedule tag NodeAffinity = "nodeAffinity" // DefaultFs default fs DefaultFs = "ext4" // DefaultNodeAffinity default NodeAffinity DefaultNodeAffinity = "true" // LinearType linear type LinearType = "linear" )
const ( DefaultEndpoint string = "unix://tmp/csi.sock" DefaultDriverName string = "local.csi.aliyun.com" DefaultEphemeralVolumeDataFilePath string = "/var/lib/kubelet/open-local-volumes.json" // VolumeOperationAlreadyExists is message fmt returned to CO when there is another in-flight call on the given volumeID VolumeOperationAlreadyExists = "An operation with the given volume=%q is already in progress" )
const (
VolumeOperationAlreadyExistsErrorMsg = "An operation with the given Volume %s already exists"
)
Variables ¶
This section is empty.
Functions ¶
func IsBlockDevice ¶ added in v0.3.0
IsBlockDevice checks if the given path is a block device
Types ¶
type CSIPlugin ¶
type CSIPlugin struct {
// contains filtered or unexported fields
}
type Idempotent ¶ added in v0.5.5
type Idempotent interface { // The CSI data types are generated using a protobuf. // The generated structures are guaranteed to implement the Stringer interface. // Example: https://github.com/container-storage-interface/spec/blob/master/lib/go/csi/csi.pb.go#L3508 // We can use the generated string as the key of our internal inflight database of requests. String() string }
Idempotent is the interface required to manage in flight requests.
type InFlight ¶ added in v0.5.5
type InFlight struct {
// contains filtered or unexported fields
}
InFlight is a struct used to manage in flight requests per volumeId.
func NewInFlight ¶ added in v0.5.5
func NewInFlight() *InFlight
NewInFlight instanciates a InFlight structures.