oss

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//CredentialFile is the path of oss ak credential file
	CredentialFile = "/host/etc/passwd-ossfs"
	// NsenterCmd is nsenter mount command
	NsenterCmd = "/nsenter --mount=/proc/1/ns/mnt"
	// SocketPath is path of connector sock
	SocketPath = "/host/etc/csi-tool/connector.sock"
	// AkID is Ak ID
	AkID = "akId"
	// AkSecret is Ak Secret
	AkSecret = "akSecret"
	// SharedPath is the shared mountpoint when UseSharedPath is "true"
	SharedPath = "/var/lib/kubelet/plugins/kubernetes.io/csi/pv/%s/globalmount"
	// OssFsType is the oss filesystem type
	OssFsType = "fuse.ossfs"
)
View Source
const (
	// MetadataURL is metadata url
	MetadataURL = "http://100.100.100.200/latest/meta-data/"
	// InstanceID is instance ID
	InstanceID = "instance-id"
	// RAMRoleResource is ram-role url subpath
	RAMRoleResource = "ram/security-credentials/"
)

Variables

This section is empty.

Functions

func GetMetaData added in v1.0.1

func GetMetaData(resource string) string

GetMetaData get host regionid, zoneid

func GetRAMRoleOption added in v1.0.5

func GetRAMRoleOption(mntCmd string) string

GetRAMRoleOption get command line's ram_role option

func IsHostMounted added in v1.0.1

func IsHostMounted(mountPath string) bool

IsHostMounted return status of host mounted or not

func IsLastSharedVol added in v1.0.3

func IsLastSharedVol(pvName string) (string, error)

IsLastSharedVol return code status to help check if this oss volume uses UseSharedPath and is the last one

func IsOssfsMounted added in v1.0.3

func IsOssfsMounted(mountPath string) bool

IsOssfsMounted return if oss mountPath is mounted

Types

type OSS added in v1.0.1

type OSS struct {
	// contains filtered or unexported fields
}

OSS the OSS object

func NewDriver

func NewDriver(nodeID, endpoint string) *OSS

NewDriver init oss type of csi driver

func (*OSS) Run added in v1.0.1

func (d *OSS) Run()

Run start a newNodeServer

type Options added in v1.0.1

type Options struct {
	Bucket        string `json:"bucket"`
	URL           string `json:"url"`
	OtherOpts     string `json:"otherOpts"`
	AkID          string `json:"akId"`
	AkSecret      string `json:"akSecret"`
	Path          string `json:"path"`
	UseSharedPath bool   `json:"useSharedPath"`
	AuthType      string `json:"authType"`
}

Options contains options for target oss

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL