Documentation ¶
Index ¶
Constants ¶
View Source
const ( // OssfsCredentialFile is the path of oss ak credential file OssfsCredentialFile = "/host/etc/passwd-ossfs" // AkID is Ak ID AkID = "akId" // AkSecret is Ak Secret AkSecret = "akSecret" // OssFsType is the oss filesystem type OssFsType = "ossfs" )
View Source
const ( EncryptedTypeKms = "kms" EncryptedTypeAes256 = "aes256" )
Variables ¶
View Source
var AuthError = errors.New("OSS authorization error")
View Source
var EncryptError = errors.New("OSS encrypted error")
View Source
var ParamError = errors.New("OSS parameters error")
View Source
var PathError = errors.New("OSS path error")
View Source
var UrlError = errors.New("OSS url error")
Functions ¶
func WrapOssError ¶ added in v1.6.0
Types ¶
type CSIAgent ¶ added in v1.6.0
type CSIAgent struct { csi.UnimplementedNodeServer // contains filtered or unexported fields }
func NewCSIAgent ¶ added in v1.6.0
func NewCSIAgent(m metadata.MetadataProvider, socketPath string) *CSIAgent
func (*CSIAgent) NodePublishVolume ¶ added in v1.6.0
func (a *CSIAgent) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
type OSS ¶ added in v1.0.1
type OSS struct {
// contains filtered or unexported fields
}
OSS the OSS object
func NewDriver ¶
func NewDriver(endpoint string, m metadata.MetadataProvider, serviceType utils.ServiceType) *OSS
NewDriver init oss type of csi driver
type Options ¶ added in v1.0.1
type Options struct { CNFSName string // oss options Bucket string `json:"bucket"` URL string `json:"url"` Path string `json:"path"` // authorization options // accesskey AkID string `json:"akId"` AkSecret string `json:"akSecret"` SecretRef string `json:"secretRef"` // RRSA RoleName string `json:"roleName"` // also for STS RoleArn string `json:"roleArn"` OidcProviderArn string `json:"oidcProviderArn"` ServiceAccountName string `json:"serviceAccountName"` // assume role AssumeRoleArn string `json:"assumeRoleArn"` ExternalId string `json:"externalId"` // csi secret store SecretProviderClass string `json:"secretProviderClass"` // ossfs options OtherOpts string `json:"otherOpts"` MetricsTop string `json:"metricsTop"` Encrypted string `json:"encrypted"` KmsKeyId string `json:"kmsKeyId"` SigVersion SigVersion `json:"sigVersion"` // mount options AuthType string `json:"authType"` FuseType string `json:"fuseType"` ReadOnly bool `json:"readOnly"` // contains filtered or unexported fields }
Options contains options for target oss
func (*Options) MakeMountOptionsAndAuthConfig ¶ added in v1.6.0
func (o *Options) MakeMountOptionsAndAuthConfig(m metadata.MetadataProvider, volumeCapability *csi.VolumeCapability) ([]string, *mounter.AuthConfig, error)
type SigVersion ¶ added in v1.6.0
type SigVersion string
SigVersion is the version of signature for ossfs
const ( // default version for ossfs SigV1 SigVersion = "v1" // need set region SigV4 SigVersion = "v4" )
type VolumeAsType ¶ added in v1.6.0
type VolumeAsType string
VolumeAs determines the mounting tagret path in OSS
const ( // VolumeAsDirect means mount on the `path` directly VolumeAsDirect VolumeAsType = "direct" VolumeAsSharePath VolumeAsType = "sharepath" // VolumeAsSubpath means mount on the subpath of `path` which is automatically generated VolumeAsSubpath VolumeAsType = "subpath" )
Click to show internal directories.
Click to hide internal directories.