sidecarmounter

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GCSFuseAppName = "gke-gcs-fuse-csi"
	TempDir        = "/temp-dir"
)

Variables

This section is empty.

Functions

func NewErrorWriter

func NewErrorWriter(errorFile string) stderrWriterInterface

Types

type MountConfig

type MountConfig struct {
	FileDescriptor    int                   `json:"-"`
	VolumeName        string                `json:"volumeName,omitempty"`
	BucketName        string                `json:"bucketName,omitempty"`
	BufferDir         string                `json:"-"`
	CacheDir          string                `json:"-"`
	ConfigFile        string                `json:"-"`
	Options           []string              `json:"options,omitempty"`
	ErrWriter         stderrWriterInterface `json:"-"`
	FlagMap           map[string]string     `json:"-"`
	ConfigFileFlagMap map[string]string     `json:"-"`
}

MountConfig contains the information gcsfuse needs.

func NewMountConfig added in v0.1.14

func NewMountConfig(sp string) *MountConfig

Fetch the following information from a given socket path: 1. Pod volume name 2. The file descriptor 3. GCS bucket name 4. Mount options passing to gcsfuse (passed by the csi mounter).

type Mounter

type Mounter struct {
	WaitGroup sync.WaitGroup
	// contains filtered or unexported fields
}

Mounter will be used in the sidecar container to invoke gcsfuse.

func New

func New(mounterPath string) *Mounter

New returns a Mounter for the current system. It provides an option to specify the path to gcsfuse binary.

func (*Mounter) Mount

func (m *Mounter) Mount(ctx context.Context, mc *MountConfig) error

Jump to

Keyboard shortcuts

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