driver

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIdentityServer

func NewIdentityServer(name, version string) *identityServer

Types

type Driver

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

A Driver is a gRPC server that implements the CSI spec.

func New

func New(endpoint string, log logr.Logger, opts *Options) (*Driver, error)

func NewWithListener

func NewWithListener(lis net.Listener, log logr.Logger, opts *Options) *Driver

NewWithListener will construct a new CSI driver using the given net.Listener. This is useful when more control over the listening parameters is required.

func (*Driver) Run

func (d *Driver) Run() error

func (*Driver) Stop

func (d *Driver) Stop()

type GRPCServer

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

func NewGRPCServer

func NewGRPCServer(
	endpoint string,
	log logr.Logger,
	ids csi.IdentityServer,
	cs csi.ControllerServer,
	ns csi.NodeServer,
) (*GRPCServer, error)

func NewGRPCServerWithListener

func NewGRPCServerWithListener(
	lis net.Listener,
	log logr.Logger,
	ids csi.IdentityServer,
	cs csi.ControllerServer,
	ns csi.NodeServer,
) *GRPCServer

func (*GRPCServer) ForceStop

func (s *GRPCServer) ForceStop()

func (*GRPCServer) Run

func (s *GRPCServer) Run() error

func (*GRPCServer) Stop

func (s *GRPCServer) Stop()

type Options

type Options struct {
	// DriverName should match the driver name as configured in the Kubernetes
	// CSIDriver object (e.g. 'trusted-ca.csi.labs.d2iq.com')
	DriverName string
	// DriverVersion is the version of the driver to be returned during
	// IdentityServer calls
	DriverVersion string
	// NodeID is the name/ID of the node this driver is running on (typically
	// the Kubernetes node name)
	NodeID string
	// Store is a reference to a storage backend for writing files
	Store storage.Interface
	// Manager is used to fetch & renew certificate data
	Manager *manager.Manager
	// Mounter will be used to invoke operating system mount operations.
	// If not specified, the current operating system's default implementation
	// will be used (i.e. 'mount.New("")')
	Mounter mount.Interface
	// ContinueOnNotReady will cause the driver's nodeserver to continue
	// mounting the volume even if the driver is not ready to create a request yet.
	// This is useful if you need to defer requesting a certificate until after
	// initialization of the Pod (e.g. IPAM so a pod IP is allocated).
	// Enabling this option WILL cause a period of time during pod startup whereby
	// certificate data is not available in the volume whilst the process is running.
	// An `initContainer` or other special logic in the user application must be
	// added to avoid running into CrashLoopBackOff situations which can delay pod
	// start time.
	ContinueOnNotReady bool
}

Jump to

Keyboard shortcuts

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