storage

package
Version: v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(Client *lclient.Client, name, componentName, dockerVolName string) (*types.Volume, error)

Create creates the Docker volume for the given volume name and component name

func CreateComponentStorage

func CreateComponentStorage(Client *lclient.Client, storages []common.Storage, componentName string) (err error)

CreateComponentStorage creates a Docker volume with the given list of storages if it does not exist, else it uses the existing volume

func GenerateVolName added in v1.2.1

func GenerateVolName(volName, componentName string) (string, error)

GenerateVolName generates a Docker volume name from the Devfile volume name and component name

func GetExistingVolume

func GetExistingVolume(Client *lclient.Client, volumeName, componentName string) (string, error)

GetExistingVolume checks if a Docker volume is present and return the name if it exists

func New

func New(adapterContext common.AdapterContext, client lclient.Client) common.StorageAdapter

New instantiantes a storage adapter

func ProcessVolumes

func ProcessVolumes(client *lclient.Client, componentName string, containerNameToVolumes map[string][]common.DevfileVolume) ([]common.Storage, map[string]string, error)

ProcessVolumes takes in a list of component volumes and for each unique volume in the devfile, creates a Docker volume name for it It returns a list of unique volumes, a mapping of devfile volume names to docker volume names, and an error if applicable

Types

type Adapter

type Adapter struct {
	Client lclient.Client
	common.AdapterContext
}

Adapter is a storage adapter implementation for Kubernetes

func (*Adapter) Create

func (a *Adapter) Create(storages []common.Storage) (err error)

Create creates the component pvc storage if it does not exist

Jump to

Keyboard shortcuts

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