sidecarmounter

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

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

	TokenFileName = "token.sock" // #nosec G101

)

Variables

This section is empty.

Functions

func NewErrorWriter

func NewErrorWriter(errorFile string) stderrWriterInterface

func StartTokenServer added in v1.11.0

func StartTokenServer(ctx context.Context, tokenURLSocketPath string)

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:"-"`
	TempDir                 string                `json:"-"`
	ConfigFile              string                `json:"-"`
	Options                 []string              `json:"options,omitempty"`
	ErrWriter               stderrWriterInterface `json:"-"`
	FlagMap                 map[string]string     `json:"-"`
	ConfigFileFlagMap       map[string]string     `json:"-"`
	PodShouldUseTokenServer bool                  `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