storage

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(Client *kclient.Client, name, size, componentName, pvcName string) (*corev1.PersistentVolumeClaim, error)

Create creates the pvc for the given pvc name, volume name, volume size and component name

func CreateComponentStorage

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

CreateComponentStorage creates PVCs with the given list of storages if it does not exist, else it uses the existing PVC

func GeneratePVCNameFromDevfileVol

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

GeneratePVCNameFromDevfileVol generates a PVC name from the Devfile volume name and component name

func GetExistingPVC

func GetExistingPVC(Client *kclient.Client, volumeName, componentName string) (string, error)

GetExistingPVC checks if a PVC is present and return the name if it exists

func New

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

New instantiantes a storage adapter

Types

type Adapter

type Adapter struct {
	Client kclient.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