Documentation ¶
Overview ¶
Copyright @ 2021 fushaosong <fushaosong@beyondlet.com>.
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 fushaosong <fushaosong@beyondlet.com>.
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
- func ContainsString(slice []string, s string) bool
- func FileExists(path string) bool
- func MapEqualMap(src, dst map[string]string) bool
- func SliceEqualSlice(src, dst []string) bool
- func SliceMergeSlice(src []string, dst []string) []string
- func SliceRemoveString(slice []string, s string) (result []string)
- func SliceSubSlice(src []string, dst []string) []string
- func UntilMaxRetry(f func() error, maxRetry int, interval time.Duration) error
Constants ¶
const ( // project Version = "beta" // PluginName is the name of the CSI plugin. CSIPluginName = "carina.storage.io" // DefaultCSISocket is the default path of the CSI socket file. DefaultCSISocket = "/tmp/csi/csi-provisioner.sock" // Default disk space hold DefaultReservedSpace = 10 << 30 // logicVolume LogicVolumeNamespace = "default" // LogicalVolumeFinalizer is the name of LogicalVolume finalizer LogicVolumeFinalizer = "carina.storage.io/logicvolume" // ResizeRequestedAtKey is the key of LogicalVolume that represents the timestamp of the resize request. ResizeRequestedAtKey = "carina.storage.io/resize-requested-at" // storage class // DeviceDiskKey is the key used in CSI volume create requests to specify a DeviceDiskKey support carina-vg-ssd carina-vg-hdd DeviceDiskKey = "carina.storage.io/disk-type" // k8s default key Device FileSystem eg. xfs ext4 DeviceFileSystem = "csi.storage.k8s.io/fstype" // pvc // default size in GiB for volumes (PVC or inline ephemeral volumes) w/o capacity requests. MinRequestSizeGb = 1 // This annotation is added to a PVC that has been triggered by scheduler to // be dynamically provisioned. Its value is the name of the selected node. AnnSelectedNode = "volume.kubernetes.io/selected-node" // pv csi VolumeAttributes VolumeDevicePath = "carina.storage.io/path" VolumeDeviceNode = "carina.storage.io/node" VolumeDeviceMajor = "carina.storage.io/major" VolumeDeviceMinor = "carina.storage.io/minor" // topology // TopologyZoneKey is the key of topology that represents zone name. TopologyNodeKey = "topology.carina.storage.io/node" // device plugin DeviceCapacityKeyPrefix = "carina.storage.io/" // support disk type DeviceVGSSD = "carina-vg-ssd" DeviceVGHDD = "carina-vg-hdd" // custom schedule CarinaSchedule = "carina-scheduler" )
Variables ¶
This section is empty.
Functions ¶
func ContainsString ¶
func FileExists ¶
func MapEqualMap ¶
func SliceEqualSlice ¶
func SliceMergeSlice ¶
func SliceRemoveString ¶
func SliceSubSlice ¶
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Copyright @ 2021 fushaosong <fushaosong@beyondlet.com>.
|
Copyright @ 2021 fushaosong <fushaosong@beyondlet.com>. |
Copyright @ 2021 fushaosong <fushaosong@beyondlet.com>.
|
Copyright @ 2021 fushaosong <fushaosong@beyondlet.com>. |
Copyright @ 2021 fushaosong <fushaosong@beyondlet.com>.
|
Copyright @ 2021 fushaosong <fushaosong@beyondlet.com>. |