translate

package module
v0.0.0-...-6e91e84 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

README

kubernetes-csi-migration-library

Library of functions to be consumed by various Kubernetes and CSI components in order to support In-tree plugin to CSI Migration.

To use, import this library into the component that requires source translation and use the TranslateToCSI and TranslateToInTree functions.

This library has a couple requirements:

  1. The driver must have a stable (well-known) driver name
  2. The translation library must not assume its running location
    1. This mean's no access to Kubernetes API Server
    2. Assume no network connectivity (no cloud APIs)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCSINameFromIntreeName

func GetCSINameFromIntreeName(pluginName string) (string, error)

func IsInlineMigratable

func IsInlineMigratable(vol *v1.Volume) bool

IsInlineMigratable tests whether there is Migration logic for the given Inline Volume

func IsMigratableByName

func IsMigratableByName(pluginName string) bool

IsMigratableByName tests whether there is Migration logic for the in-tree plugin for the given `pluginName`

func IsPVMigratable

func IsPVMigratable(pv *v1.PersistentVolume) bool

IsPVMigratable tests whether there is Migration logic for the given Persistent Volume

func TranslateCSIPVToInTree

func TranslateCSIPVToInTree(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)

TranslateToIntree takes a PV with a CSI PersistentVolume Source and will translate it to a in-tree Persistent Volume Source for the specific in-tree volume specified by the `Driver` field in the CSI Source. The input PV object will not be modified.

func TranslateInTreePVToCSI

func TranslateInTreePVToCSI(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)

TranslateToCSI takes a persistent volume and will translate the in-tree source to a CSI Source if the translation logic has been implemented. The input persistent volume will not be modified

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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