sharebackends

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildSourceArgs

type BuildSourceArgs struct {
	Share       *shares.Share
	Options     *shareoptions.ShareOptions
	Location    *shares.ExportLocation
	Clientset   clientset.Interface
	AccessRight *shares.AccessRight
}

BuildSourceArgs contains arguments for ShareBackend.BuildSource()

type CSICephFS

type CSICephFS struct {
	ShareBackend
}

CSICephFS struct, implements ShareBackend interface for CSI CephFS

func (CSICephFS) BuildSource

func (CSICephFS) BuildSource(args *BuildSourceArgs) (*v1.PersistentVolumeSource, error)

BuildSource builds PersistentVolumeSource for CSI CephFS driver

func (CSICephFS) GrantAccess

func (CSICephFS) GrantAccess(args *GrantAccessArgs) (*shares.AccessRight, error)

GrantAccess to Ceph share and creates a k8s Secret

func (CSICephFS) Name

func (CSICephFS) Name() string

Name of the backend

func (CSICephFS) RevokeAccess

func (CSICephFS) RevokeAccess(args *RevokeAccessArgs) error

RevokeAccess to k8s secret created by GrantAccess()

type CephFS

type CephFS struct {
	ShareBackend
}

CephFS struct, implements ShareBackend interface for k8s CephFS

func (CephFS) BuildSource

func (CephFS) BuildSource(args *BuildSourceArgs) (*v1.PersistentVolumeSource, error)

BuildSource builds PersistentVolumeSource for k8s CephFS

func (CephFS) GrantAccess

func (CephFS) GrantAccess(args *GrantAccessArgs) (*shares.AccessRight, error)

GrantAccess to Ceph share

func (CephFS) Name

func (CephFS) Name() string

Name of the backend

func (CephFS) RevokeAccess

func (CephFS) RevokeAccess(args *RevokeAccessArgs) error

RevokeAccess to k8s secret created by GrantAccess()

type GrantAccessArgs

type GrantAccessArgs struct {
	Share     *shares.Share
	Options   *shareoptions.ShareOptions
	Clientset clientset.Interface
	Client    *gophercloud.ServiceClient
}

GrantAccessArgs contains arguments for ShareBackend.GrantAccess()

type NFS

type NFS struct {
	ShareBackend
}

NFS struct, implements ShareBackend interface for k8s NFS

func (NFS) BuildSource

func (NFS) BuildSource(args *BuildSourceArgs) (*v1.PersistentVolumeSource, error)

BuildSource builds PersistentVolumeSource for k8s NFS

func (NFS) GrantAccess

func (NFS) GrantAccess(args *GrantAccessArgs) (*shares.AccessRight, error)

GrantAccess to NFS share. Allows read-write access to everyone!

func (NFS) Name

func (NFS) Name() string

Name of the backend

func (NFS) RevokeAccess

func (NFS) RevokeAccess(*RevokeAccessArgs) error

RevokeAccess does nothing - nothing to release

type RevokeAccessArgs

type RevokeAccessArgs struct {
	ShareID        string
	ShareSecretRef *v1.SecretReference
	Clientset      clientset.Interface
	Client         *gophercloud.ServiceClient
}

RevokeAccessArgs contains arguments for ShareBaceknd.RevokeAccess()

type ShareBackend

type ShareBackend interface {
	// Name of the share backend
	Name() string

	// Called during share provision, the result is used in the final PersistentVolume object.
	BuildSource(*BuildSourceArgs) (*v1.PersistentVolumeSource, error)

	// Called once the share is created. Should grant share-specific access rules.
	GrantAccess(*GrantAccessArgs) (*shares.AccessRight, error)

	// Called during share deletion. Should release any resources acquired by GrantAccess.
	RevokeAccess(*RevokeAccessArgs) error
}

ShareBackend takes care of granting access to the share and building PersistentVolumeSource used in the final PersistentVolume object.

Jump to

Keyboard shortcuts

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