mirror of
https://github.com/cristicalin/synology-csi.git
synced 2026-05-15 22:12:05 +00:00
Update to version 1.1.0
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
const (
|
||||
K8sCsiName = "Kubernetes CSI"
|
||||
|
||||
@@ -15,8 +19,30 @@ const (
|
||||
LunTypeBlunThick = "BLUN_THICK" // thick provision, mapped to type 259
|
||||
MaxIqnLen = 128
|
||||
|
||||
// Share definitions
|
||||
MaxShareLen = 32
|
||||
MaxShareDescLen = 64
|
||||
UserGroupTypeLocalUser = "local_user"
|
||||
UserGroupTypeLocalGroup = "local_group"
|
||||
UserGroupTypeSystem = "system"
|
||||
|
||||
|
||||
// CSI definitions
|
||||
TargetPrefix = "k8s-csi"
|
||||
LunPrefix = "k8s-csi"
|
||||
IqnPrefix = "iqn.2000-01.com.synology:"
|
||||
)
|
||||
TargetPrefix = "k8s-csi"
|
||||
LunPrefix = "k8s-csi"
|
||||
IqnPrefix = "iqn.2000-01.com.synology:"
|
||||
SharePrefix = "k8s-csi"
|
||||
ShareSnapshotDescPrefix = "(Do not change)"
|
||||
)
|
||||
|
||||
func GenLunName(volName string) string {
|
||||
return fmt.Sprintf("%s-%s", LunPrefix, volName)
|
||||
}
|
||||
|
||||
func GenShareName(volName string) string {
|
||||
shareName := fmt.Sprintf("%s-%s", SharePrefix, volName)
|
||||
if len(shareName) > MaxShareLen {
|
||||
return shareName[:MaxShareLen]
|
||||
}
|
||||
return shareName
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user