storage

package
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: 9 Imported by: 4

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 DeleteOldPVCs added in v1.2.6

func DeleteOldPVCs(Client *kclient.Client, componentName string, processedVolumes map[string]bool) error

DeleteOldPVCs deletes all the old PVCs which are not in the processedVolumes map

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