image

package
v0.0.0-...-8468296 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncTagGenerator

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

func (FuncTagGenerator) Generate

func (f FuncTagGenerator) Generate(spec *Volume) (string, error)

type Phase

type Phase string
const (
	DockerConfigJsonKey = ".dockerconfigjson"

	// publish states
	PhaseInitState         Phase = "InitState"
	PhaseContainerCreated  Phase = "ContainerCreated"
	PhaseContainerMounted  Phase = "ContainerMounted"
	PhaseTargetPathMounted Phase = "TargetPathMounted"
	PhasePublished         Phase = "Published"

	// unpublish states
	PhaseTargetPathUnMounted  Phase = "TargetPathUnMounted"
	PhaseContainerCommitted   Phase = "ContainerCommitted"
	PhaseContainerUnMounted   Phase = "ContainerUnMounted"
	PhaseContainerImagePushed Phase = "ContainerImagePushed"
	PhaseContainerDeleted     Phase = "ContainerDeleted"
	PhaseUnPublished          Phase = "UnPublished"
)

type Stager

type Stager struct {
	Buildah  *buildah.Client
	GcPeriod time.Duration
	Recorder record.EventRecorder
}

func (*Stager) RollBackStageIn

func (stager *Stager) RollBackStageIn(vol *Volume) error

func (*Stager) StageIn

func (stager *Stager) StageIn(vol *Volume) error

func (*Stager) StageOut

func (stager *Stager) StageOut(vol *Volume) error

func (*Stager) StartGarbageCollection

func (stager *Stager) StartGarbageCollection(stop chan struct{})

type Volume

type Volume struct {
	Clock clock.Clock

	// User defined spec
	Spec         api.StagerSpec
	TagGenerator tagGenerator

	// values from PublishVolumeRequest
	ReadOnly         bool
	VolumeID         string
	TargetPath       string
	DockerConfigJson string
	PodInfo          util.PodInfo

	// Status
	Phase           Phase
	ProvisionedRoot string
	ImageToPush     string
	// contains filtered or unexported fields
}

func NewVolume

func NewVolume(req *csi.NodePublishVolumeRequest, clock clock.Clock, defaultStageInImage string) (*Volume, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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