v1

package
v0.0.0-...-174afc0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2017 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

// This is extracted from k8s.io/apimachinery/pkg/api/resource/amount.go

// This is extracted from k8s.io/apimachinery/pkg/api/resource/math.go

This is extracted from k8s.io/apimachinery/pkg/apis/meta/v1/types.go

This is extracted from k8s.io/apimachinery/pkg/api/resource/quantity.go

This is extracted from k8s.io/apimachinery/pkg/api/resource/scale_int.go

This is extracted from k8s.io/apimachinery/pkg/api/resource/suffix.go

This is extracted from k8s.io/apimachinery/pkg/apis/meta/v1/time.go

Description provided at doc.go

NOTE:

There are references to Kubernetes (K8s) types & links. This reflects the

similarity of OpenEBS design principles with K8s. These may not be a one-to-one mapping though.

We have not imported the K8s namespaces as-is, as OpenEBS will change

these to suit its requirements.

NOTE:

A volume in OpenEBS has the same design as a pod in K8s. Alternatively,

a volume in OpenEBS can be considered as a StoragePod.

Index

Constants

View Source
const (
	DecimalExponent = Format("DecimalExponent") // e.g., 12e6
	BinarySI        = Format("BinarySI")        // e.g., 12Mi (12 * 2^20)
	DecimalSI       = Format("DecimalSI")       // e.g., 12M  (12 * 10^6)
)

Variables

View Source
var (
	// JivaCtrlCmd is the command used to start jiva controller
	JivaCtrlCmd = []string{"launch"}

	// JivaCtrlArgs is the set of arguments provided to JivaCtrlCmd
	//JivaCtrlArgs = []string{"controller", "--frontend", string(JivaControllerFrontendDef), string(JivaVolumeNameDef)}
	JivaCtrlArgs = []string{"controller", "--frontend", string(JivaControllerFrontendDef), "--clusterIP", string(JivaClusterIPHolder), string(JivaVolumeNameHolder)}

	// JivaReplicaCmd is the command used to start jiva replica
	JivaReplicaCmd = []string{"launch"}

	// JivaReplicaArgs is the set of arguments provided to JivaReplicaCmd
	JivaReplicaArgs = []string{"replica", "--frontendIP", string(JivaClusterIPHolder), "--size", string(JivaStorageSizeHolder), string(JivaPersistentMountPathDef)}
)

These will be used to provide array based constants that are related to jiva volume provisioner

View Source
var (

	// Errors that could happen while parsing a string.
	ErrFormatWrong = errors.New("quantities must match the regular expression '" + splitREString + "'")
	ErrNumeric     = errors.New("unable to parse numeric part of quantity")
	ErrSuffix      = errors.New("unable to parse quantity's suffix")
)
View Source
var (

	// The maximum value we can represent milli-units for.
	// Compare with the return value of Quantity.Value() to
	// see if it's safe to use Quantity.MilliValue().
	MaxMilliValue = int64(((1 << 63) - 1) / 1000)
)
View Source
var (
	Zero = int64Amount{}
)

Functions

func ControllerIPs

func ControllerIPs(profileMap map[string]string) string

ControllerIPs will fetch the value specified against PVP's VSM controller IPs if available otherwise will return blank.

func ControllerImage

func ControllerImage(profileMap map[string]string) string

ControllerImage will fetch the value specified against PVP's VSM controller image if available otherwise will return blank.

NOTE:

This utility function does not validate & just returns if not capable of

performing

func ControllerNodeTaintTolerations

func ControllerNodeTaintTolerations(profileMap map[string]string) (string, error)

ControllerNodeTaintTolerations extracts the node taint tolerations

func DefaultControllerImage

func DefaultControllerImage() string

DefaultControllerImage will fetch the default value for PVP's VSM controller image

func DefaultControllerNodeTaintTolerations

func DefaultControllerNodeTaintTolerations() (string, error)

DefaultControllerNodeTaintTolerations will fetch the default value for node taint tolerations

func DefaultJivaAPIPort

func DefaultJivaAPIPort() int32

DefaultJivaAPIPort will provide the port required for management of persistent volume

func DefaultJivaISCSIPort

func DefaultJivaISCSIPort() int32

DefaultJivaISCSIPort will provide the port required to make ISCSI based connections

func DefaultJivaMountName

func DefaultJivaMountName() string

DefaultJivaMountName provides the default mount path name for jiva based persistent volumes

func DefaultJivaMountPath

func DefaultJivaMountPath() string

DefaultJivaMountPath provides the default mount path for jiva based persistent volumes

func DefaultJivaReplicaPort1

func DefaultJivaReplicaPort1() int32

DefaultJivaReplicaPort1 provides the default port for jiva based persistent volume replicas

func DefaultJivaReplicaPort2

func DefaultJivaReplicaPort2() int32

DefaultJivaReplicaPort2 provides the default port for jiva based persistent volume replicas

func DefaultJivaReplicaPort3

func DefaultJivaReplicaPort3() int32

DefaultJivaReplicaPort3 provides the default port for jiva based persistent volume replicas

func DefaultOrchestratorAddress

func DefaultOrchestratorAddress() string

func DefaultOrchestratorDC

func DefaultOrchestratorDC() string

DefaultOrchestratorDC gets the coded default datacenter of orchestration provider.

func DefaultOrchestratorInCluster

func DefaultOrchestratorInCluster() string

DefaultOrchestratorInCluster will fetch the coded default value of orchestration provider in-cluster flag.

func DefaultOrchestratorNS

func DefaultOrchestratorNS() string

DefaultOrchestratorNS will fetch the default value of orchestration provider namespace.

func DefaultOrchestratorName

func DefaultOrchestratorName() string

DefaultOrchestratorName gets the default name of orchestration provider

NOTE:

This utility function does not validate & just returns if not capable of

performing

func DefaultOrchestratorNetworkAddr

func DefaultOrchestratorNetworkAddr() string

DefaultOrchestratorNetworkAddr will fetch the coded default value of orchestration provider network address.

func DefaultOrchestratorNetworkInterface

func DefaultOrchestratorNetworkInterface() string

DefaultOrchestratorNetworkInterface will fetch the coded default value for orchestration provider's network interface

func DefaultOrchestratorNetworkType

func DefaultOrchestratorNetworkType() string

DefaultOrchestratorNetworkType will fetch the coded default value for orchestration provider's network type

func DefaultOrchestratorRegion

func DefaultOrchestratorRegion() string

DefaultOrchestratorRegion gets the coded default region of orchestration provider.

func DefaultPVPControllerCount

func DefaultPVPControllerCount() string

DefaultPVPControllerCount will fetch the default value for PVP's VSM Controller count

func DefaultPVPPersistentPath

func DefaultPVPPersistentPath(vsmName string, mountPath string) string

DefaultPVPPersistentPath provides the coded default PVP's VSM replica persistent path

func DefaultPVPPersistentPathOnly

func DefaultPVPPersistentPathOnly() string

DefaultPVPPersistentPathOnly provides the coded default PVP's VSM replica persistent path

func DefaultPVPReplicaCount

func DefaultPVPReplicaCount() string

DefaultPVPReplicaCount will fetch the coded default value of PVP's VSM replica count

func DefaultPVPReplicaImage

func DefaultPVPReplicaImage() string

DefaultPVPReplicaImage will fetch the coded default value for PVP's VSM replica image

func DefaultPVPReplicaTopologyKey

func DefaultPVPReplicaTopologyKey() string

DefaultPVPReplicaTopologyKey will fetch the default value for PVP's VSM Replica topology key

func DefaultPVPStorageSize

func DefaultPVPStorageSize() string

DefaultPVPStorageSize provides the coded default PVP's VSM replica size

func DefaultPVPVSMIPs

func DefaultPVPVSMIPs(profileMap map[string]string, requestCtrlIPs bool, requestRepIPs bool) (string, string, error)

DefaultPVPVSMIPs will fetch the PVP's VSM Controller IPs & Replica IPs based on the network address

NOTE:

This is a very naive approach to get un-used IPs. It is

advised to make use of external networking utilities or orchestrators who come up with their own networking plugin to get the un-used IPs.

func DefaultReplicaNodeTaintTolerations

func DefaultReplicaNodeTaintTolerations() (string, error)

DefaultReplicaNodeTaintTolerations will fetch the default value for node taint tolerations

func GetControllerImage

func GetControllerImage(profileMap map[string]string) string

GetControllerImage gets the not nil PVP's VSM controller image

func GetControllerNodeTaintTolerations

func GetControllerNodeTaintTolerations(profileMap map[string]string) (string, error)

GetControllerNodeTaintTolerations gets the node taint tolerations if available

func GetOrchestratorAddress

func GetOrchestratorAddress(profileMap map[string]string) string

GetOrchestratorAddress fetches the not nil orchestrator address

func GetOrchestratorDC

func GetOrchestratorDC(profileMap map[string]string) string

GetOrchestratorDC gets the not nil datacenter name of orchestrator

func GetOrchestratorInCluster

func GetOrchestratorInCluster(profileMap map[string]string) string

GetOrchestratorInCluster gets the not nil value of orchestration provider's in-cluster flag

func GetOrchestratorNS

func GetOrchestratorNS(profileMap map[string]string) string

GetOrchestratorNS gets the not nil orchestrator namespace

func GetOrchestratorNetworkAddr

func GetOrchestratorNetworkAddr(profileMap map[string]string) string

GetOrchestratorNetworkAddr gets the not nil orchestration provider's network address in CIDR notation

func GetOrchestratorNetworkInterface

func GetOrchestratorNetworkInterface(profileMap map[string]string) string

GetOrchestratorNetworkInterface gets the not nil orchestration provider's network interface

func GetOrchestratorNetworkSubnet

func GetOrchestratorNetworkSubnet(profileMap map[string]string) (string, error)

GetOrchestratorNetworkSubnet gets the not nil orchestration provider's network subnet

func GetOrchestratorNetworkType

func GetOrchestratorNetworkType(profileMap map[string]string) string

GetOrchestratorNetworkType gets the not nil orchestration provider's network type

func GetOrchestratorRegion

func GetOrchestratorRegion(profileMap map[string]string) string

GetOrchestratorRegion gets the not nil region name of orchestrator

func GetPVPControllerCount

func GetPVPControllerCount(profileMap map[string]string) string

GetPVPControllerCount gets the not nil value of PVP's VSM Controller count

func GetPVPControllerCountInt

func GetPVPControllerCountInt(profileMap map[string]string) (int, error)

GetPVPControllerCountInt gets the not nil value of PVP's VSM Controller count in int

func GetPVPPersistentPath

func GetPVPPersistentPath(profileMap map[string]string, vsmName string, mountPath string) string

GetPVPPersistentPath gets the not nil PVP's VSM replica persistent path

func GetPVPPersistentPathOnly

func GetPVPPersistentPathOnly(profileMap map[string]string) string

GetPVPPersistentPathOnly gets the not nil PVP's VSM replica persistent path minus the VSM name

func GetPVPReplicaCount

func GetPVPReplicaCount(profileMap map[string]string) string

GetPVPReplicaCount gets the not nil PVP's VSM replica count

func GetPVPReplicaCountInt

func GetPVPReplicaCountInt(profileMap map[string]string) (int, error)

GetPVPReplicaCountInt gets the not nil PVP's VSM replica count

func GetPVPReplicaImage

func GetPVPReplicaImage(profileMap map[string]string) string

GetPVPReplicaImage gets the not nil value of PVP's VSM replica image

func GetPVPReplicaTopologyKey

func GetPVPReplicaTopologyKey(profileMap map[string]string) string

GetPVPReplicaTopologyKey gets the not nil value of PVP's VSM Replica topology key

func GetPVPStorageSize

func GetPVPStorageSize(profileMap map[string]string) string

GetPVPStorageSize gets the not nil PVP's VSM replica size

func GetPVPVSMIPs

func GetPVPVSMIPs(profileMap map[string]string) (string, string, error)

GetPVPVSMIPs gets not nil values of PVP's VSM Controller IPs & Replica IPs

NOTE:

The logic caters to get the VSM IPs i.e. both Controller & Replica IPs.

It will be error prone to get these IPs separately in cases where maya api service gets un-used IPs.

NOTE:

Maya api service uses a very naive approach to get un-used IPs. It is

advised to make use of external networking utilities or orchestrators who come up with their own networking tools to get the un-used IPs.

func GetReplicaNodeTaintTolerations

func GetReplicaNodeTaintTolerations(profileMap map[string]string) (string, error)

GetReplicaNodeTaintTolerations gets the node taint tolerations if available

func GetUnusedIPs

func GetUnusedIPs(count int, nAddr string) ([]string, error)

GetUnusedIPs gets un-used IPs based on the provided network address.

NOTE:

It is advised to make use of external networking utilities or

orchestrators who come up with their own networking plugin to get the un-used IPs.

func MakeOrDefJivaControllerArgs

func MakeOrDefJivaControllerArgs(vsm string, clusterIP string) []string

func MakeOrDefJivaReplicaArgs

func MakeOrDefJivaReplicaArgs(profileMap map[string]string, clusterIP string) []string

MakeOrDefJivaReplicaArgs will set the placeholders in jiva replica args with their appropriate runtime values.

NOTE:

The defaults will be set if the replica args are not available

NOTE:

This utility function does not validate & just returns if not capable of

performing

func NewQuantityFlagValue

func NewQuantityFlagValue(q *Quantity) flag.Value

NewQuantityFlagValue returns an object that can be used to back a flag, pointing at the given Quantity variable.

func OSGetEnv

func OSGetEnv(envKey string, profileMap map[string]string) string

OSGetEnv fetches the environment variable value from the machine's environment using contextual information TODO:

Introduce some debug logging for the derived keys & values. Do not log

the values if they reflect some sensitive info.

func OrchProfileName

func OrchProfileName(profileMap map[string]string) string

OrchProfileName will fetch the value specified against persistent volume's orchestrator profile name if available otherwise will return blank.

NOTE:

This utility function does not validate & just returns if not capable of

performing

func OrchestratorAddress

func OrchestratorAddress(profileMap map[string]string) string

OrchestratorAddress fetches the value specified against persistent volume's orchestrator address if available otherwise will return blank.

NOTE:

A region is composed of one or more [datacenter : address]

func OrchestratorDC

func OrchestratorDC(profileMap map[string]string) string

OrchestratorDC will fetch the value specified against the orchestrator datacenter if available otherwise will return blank.

func OrchestratorInCluster

func OrchestratorInCluster(profileMap map[string]string) string

OrchestratorInCluster will fetch the value specified against orchestration provider in-cluster flag if available otherwise will return blank.

func OrchestratorNS

func OrchestratorNS(profileMap map[string]string) string

OrchestratorNS will fetch the value specified against orchestration provider namespace if available otherwise will return blank.

func OrchestratorName

func OrchestratorName(profileMap map[string]string) string

OrchestratorName will fetch the value specified against persistent volume's orchestrator name if available otherwise will return blank.

NOTE:

This utility function does not validate & just returns if not capable of

performing

func OrchestratorNetworkAddr

func OrchestratorNetworkAddr(profileMap map[string]string) string

OrchestratorNetworkAddr will fetch the value specified against orchestration provider network address if available otherwise will return blank.

func OrchestratorNetworkInterface

func OrchestratorNetworkInterface(profileMap map[string]string) string

OrchestratorNetworkInterface will fetch the value specified orchestration provider's network interface if available otherwise will return blank.

func OrchestratorNetworkType

func OrchestratorNetworkType(profileMap map[string]string) string

OrchestratorNetworkType will fetch the value specified orchestration provider's network type if available otherwise will return blank.

func OrchestratorRegion

func OrchestratorRegion(profileMap map[string]string) string

OrchestratorRegion will fetch the value specified against the orchestrator region if available otherwise will return blank.

func PVPControllerCount

func PVPControllerCount(profileMap map[string]string) string

PVPControllerCount will fetch the value specified against PVP's VSM Controller count if available otherwise will return blank.

func PVPPersistentPath

func PVPPersistentPath(profileMap map[string]string, vsmName string, mountPath string) string

PVPPersistentPath will fetch the value specified against PVP's VSM replica persistent path if available otherwise will return blank.

func PVPPersistentPathOnly

func PVPPersistentPathOnly(profileMap map[string]string) string

PVPPersistentPathOnly will fetch the value specified against PVP's VSM replica persistent path if available otherwise will return blank.

func PVPReplicaCount

func PVPReplicaCount(profileMap map[string]string) string

PVPReplicaCount will fetch the value specified against PVP's VSM replica count if available otherwise will return blank.

func PVPReplicaImage

func PVPReplicaImage(profileMap map[string]string) string

PVPReplicaImage will fetch the value specified against PVP's VSM replica image if available otherwise will return blank.

func PVPReplicaTopologyKey

func PVPReplicaTopologyKey(profileMap map[string]string) string

PVPReplicaTopologyKey will fetch the value specified against PVP's VSM Replica topology key if available otherwise will return blank.

func PVPStorageSize

func PVPStorageSize(profileMap map[string]string) string

PVPStorageSize will fetch the value specified against PVP's VSM replica size if available otherwise will return blank.

func PVPVSMIPs

func PVPVSMIPs(profileMap map[string]string) (string, string)

PVPVSMIPs will fetch the value specified against PVP's VSM Controller IPs & Replica IPs if available otherwise will return blank.

func ReplicaIPs

func ReplicaIPs(profileMap map[string]string) string

ReplicaIPs will fetch the value specified against PVP's VSM replica IPs if available otherwise will return blank.

func ReplicaNodeTaintTolerations

func ReplicaNodeTaintTolerations(profileMap map[string]string) (string, error)

ReplicaNodeTaintTolerations extracts the node taint tolerations for replica

func Replicas

func Replicas(rcount int) *int32

Replicas returns a pointer to an int32 of a int value

func SanitiseVSMName

func SanitiseVSMName(vsm string) string

func VSMName

func VSMName(pvcName string) string

VSMName will fetch the value specified against persistent volume VSM name if available otherwise will return blank.

NOTE:

This utility function does not validate & just returns if not capable of

performing

func VolumeProvisionerName

func VolumeProvisionerName(profileMap map[string]string) string

VolumeProvisionerName will fetch the name of volume provisioner if available otherwise will return blank.

NOTE:

This utility function makes the best attempt to get the value from

provided profileMap or from the machine's environment variable

func VolumeProvisionerProfileName

func VolumeProvisionerProfileName(profileMap map[string]string) string

VolumeProvisionerProfileName will fetch the name of volume provisioner profile if available otherwise will return blank.

NOTE:

This utility function makes the best attempt to get the value from

provided profileMap or from the machine's environment variable

Types

type CanonicalValue

type CanonicalValue interface {
	// AsCanonicalBytes returns a byte array representing the string representation
	// of the value mantissa and an int32 representing its exponent in base-10. Callers may
	// pass a byte slice to the method to avoid allocations.
	AsCanonicalBytes(out []byte) ([]byte, int32)
	// AsCanonicalBase1024Bytes returns a byte array representing the string representation
	// of the value mantissa and an int32 representing its exponent in base-1024. Callers
	// may pass a byte slice to the method to avoid allocations.
	AsCanonicalBase1024Bytes(out []byte) ([]byte, int32)
}

CanonicalValue allows a quantity amount to be converted to a string.

type CauseType

type CauseType string

CauseType is a machine readable value providing more detail about what occurred in a status response. An operation may have multiple causes for a status (whether Failure or Success).

const (
	// CauseTypeFieldValueNotFound is used to report failure to find a requested value
	// (e.g. looking up an ID).
	CauseTypeFieldValueNotFound CauseType = "FieldValueNotFound"
	// CauseTypeFieldValueRequired is used to report required values that are not
	// provided (e.g. empty strings, null values, or empty arrays).
	CauseTypeFieldValueRequired CauseType = "FieldValueRequired"
	// CauseTypeFieldValueDuplicate is used to report collisions of values that must be
	// unique (e.g. unique IDs).
	CauseTypeFieldValueDuplicate CauseType = "FieldValueDuplicate"
	// CauseTypeFieldValueInvalid is used to report malformed values (e.g. failed regex
	// match).
	CauseTypeFieldValueInvalid CauseType = "FieldValueInvalid"
	// CauseTypeFieldValueNotSupported is used to report valid (as per formatting rules)
	// values that can not be handled (e.g. an enumerated string).
	CauseTypeFieldValueNotSupported CauseType = "FieldValueNotSupported"
	// CauseTypeUnexpectedServerResponse is used to report when the server responded to the client
	// without the expected return type. The presence of this cause indicates the error may be
	// due to an intervening proxy or the server software malfunctioning.
	CauseTypeUnexpectedServerResponse CauseType = "UnexpectedServerResponse"
)

type EnvironmentVariableDefaults

type EnvironmentVariableDefaults string

EnvironmentVariableDefaults is a typed label that defines the environment variable defaults

const (
	// Default value for environment variable context
	EnvVariableContextDef EnvironmentVariableDefaults = "DEFAULT"
)

type EnvironmentVariableKey

type EnvironmentVariableKey string

EnvironmentVariableKey is a typed label that define the environment variables

const (
	// PVPProfileNameEnvVarKey is the environment variable key for persistent
	// volume provisioner's profile name
	//
	// Usage:
	// <CTX>_PVP_PROFILE_NAME = <some value>
	PVPProfileNameEnvVarKey EnvironmentVariableKey = "_PVP_PROFILE_NAME"
	// PVPNameEnvVarKey is the environment variable key for persistent volume
	// provisioner's name
	//
	// Usage:
	// <CTX>_PVP_NAME = <some value>
	PVPNameEnvVarKey EnvironmentVariableKey = "_PVP_NAME"
	// PVPControllerImageEnvVarKey is the environment variable key for persistent
	// volume provisioner's controller image
	//
	// Usage:
	// <CTX>_CONTROLLER_IMAGE = <some value>
	PVPControllerImageEnvVarKey EnvironmentVariableKey = "_CONTROLLER_IMAGE"
	// PVPPersistentPathEnvVarKey is the environment variable key for persistent
	// volume provisioner's replica persistent path
	//
	// Usage:
	// <CTX>_PERSISTENT_PATH = <some value>
	PVPPersistentPathEnvVarKey EnvironmentVariableKey = "_PERSISTENT_PATH"
	// PVPStorageSizeEnvVarKey is the environment variable key for persistent
	// volume provisioner's replica size
	//
	// Usage:
	// <CTX>_STORAGE_SIZE = <some value>
	PVPStorageSizeEnvVarKey EnvironmentVariableKey = "_STORAGE_SIZE"
	// PVPReplicaCountEnvVarKey is the environment variable key for persistent
	// volume provisioner's replica count
	//
	// Usage:
	// <CTX>_REPLICA_COUNT = <some value>
	PVPReplicaCountEnvVarKey EnvironmentVariableKey = "_REPLICA_COUNT"
	// PVPReplicaImageEnvVarKey is the environment variable key for persistent
	// volume provisioner's replica image
	//
	// Usage:
	// <CTX>_REPLICA_IMAGE = <some value>
	PVPReplicaImageEnvVarKey EnvironmentVariableKey = "_REPLICA_IMAGE"
	// PVPControllerCountEnvVarKey is the environment variable key for persistent
	// volume provisioner's controller count
	//
	// Usage:
	// <CTX>_CONTROLLER_COUNT = <some value>
	PVPControllerCountEnvVarKey EnvironmentVariableKey = "_CONTROLLER_COUNT"
	// PVPReplicaTopologyKeyEnvVarKey is the environment variable key for persistent
	// volume provisioner's replica topology key
	//
	// Usage:
	// <CTX>_REPLICA_TOPOLOGY_KEY = <some value>
	PVPReplicaTopologyKeyEnvVarKey EnvironmentVariableKey = "_REPLICA_TOPOLOGY_KEY"

	// PVPControllerNodeTaintTolerationEnvVarKey is the environment variable key
	// for persistent volume provisioner's node taint toleration
	//
	// Usage:
	// <CTX>_CONTROLLER_NODE_TAINT_TOLERATION = <some value>
	PVPControllerNodeTaintTolerationEnvVarKey EnvironmentVariableKey = "_CONTROLLER_NODE_TAINT_TOLERATION"

	// PVPReplicaNodeTaintTolerationEnvVarKey is the environment variable key for
	// persistent volume provisioner's node taint toleration
	//
	// Usage:
	// <CTX>__REPLICA_NODE_TAINT_TOLERATION = <some value>
	PVPReplicaNodeTaintTolerationEnvVarKey EnvironmentVariableKey = "_REPLICA_NODE_TAINT_TOLERATION"

	// OrchestratorNameEnvVarKey is the environment variable key for
	// orchestration provider's name
	//
	// Usage:
	// <CTX>_ORCHESTRATOR_NAME = <some value>
	OrchestratorNameEnvVarKey EnvironmentVariableKey = "_ORCHESTRATOR_NAME"
	// OrchestratorRegionEnvVarKey is the environment variable key for orchestration
	// provider's region
	//
	// Usage:
	// <CTX>_ORCHESTRATOR_REGION = <some value>
	OrchestratorRegionEnvVarKey EnvironmentVariableKey = "_ORCHESTRATOR_REGION"
	// OrchestratorDCEnvVarKey is the environment variable key for orchestration
	// provider's datacenter
	//
	// Usage:
	// <CTX>_ORCHESTRATOR_DC = <some value>
	OrchestratorDCEnvVarKey EnvironmentVariableKey = "_ORCHESTRATOR_DC"
	// OrchestratorAddressEnvVarKey is the environment variable key for orchestration
	// provider's address
	//
	// Usage:
	// <CTX>_<REGION>_<DC>_ORCHESTRATOR_ADDR = 10.20.1.1
	OrchestratorAddressEnvVarKey EnvironmentVariableKey = "_ORCHESTRATOR_ADDR"
	// OrchestratorCNTypeEnvVarKey is the environment variable key for orchestration
	// provider's network type
	//
	// Usage:
	// <CTX>_ORCHESTRATOR_CN_TYPE = <some value>
	OrchestratorCNTypeEnvVarKey EnvironmentVariableKey = "_ORCHESTRATOR_CN_TYPE"
	// OrchestratorCNInterfaceEnvVarKey is the environment variable key for orchestration
	// provider's network interface
	//
	// Usage:
	// <CTX>_ORCHESTRATOR_CN_INTERFACE = <some value>
	OrchestratorCNInterfaceEnvVarKey EnvironmentVariableKey = "_ORCHESTRATOR_CN_INTERFACE"
	// OrchestratorCNAddrEnvVarKey is the environment variable key for orchestration
	// provider's network address
	//
	// Usage:
	// <CTX>_ORCHESTRATOR_CN_ADDRESS = <some value>
	OrchestratorCNAddrEnvVarKey EnvironmentVariableKey = "_ORCHESTRATOR_CN_ADDRESS"
	// OrchestratorNSEnvVarKey is the environment variable key for orchestration
	// provider's namespace
	//
	// Usage:
	// <CTX>_ORCHESTRATOR_NS = <some value>
	OrchestratorNSEnvVarKey EnvironmentVariableKey = "_ORCHESTRATOR_NS"
	// OrchestratorInClusterEnvVarKey is the environment variable key for orchestration
	// provider's in-cluster flag
	//
	// Usage:
	// <CTX>_ORCHESTRATOR_IN_CLUSTER = <some value>
	OrchestratorInClusterEnvVarKey EnvironmentVariableKey = "_ORCHESTRATOR_IN_CLUSTER"
)

type EnvironmentVariableLabel

type EnvironmentVariableLabel string

EnvironmentVariableLabel is a typed label that defines environment variable labels that are passed as request options during provisioning.

const (
	// EnvVariableContextLbl is the label that can be optionally set as one of the
	// request option during VSM provisioning operations. Its value is used
	// to set the context (/ prefix) against the environment variables for that
	// particular request.
	EnvVariableContextLbl EnvironmentVariableLabel = "env.mapi.openebs.io/env-var-ctx"
)

type Format

type Format string

Format lists the three possible formattings of a quantity.

type GenericAnnotations

type GenericAnnotations string
const (
	// VolumeProvisionerSelectorKey is used to filter VSMs
	VolumeProvisionerSelectorKey GenericAnnotations = "openebs/volume-provisioner"

	// ControllerSelectorKey is used to filter controllers
	ControllerSelectorKey GenericAnnotations = "openebs/controller"

	// ControllerSelectorKeyEquals is used to filter controller when
	// selector logic is used
	ControllerSelectorKeyEquals GenericAnnotations = ControllerSelectorKey + "="

	// ReplicaSelectorKey is used to filter replicas
	ReplicaSelectorKey GenericAnnotations = "openebs/replica"

	// ReplicaSelectorKeyEquals is used to filter replica when
	// selector logic is used
	ReplicaSelectorKeyEquals GenericAnnotations = ReplicaSelectorKey + "="

	// ServiceSelectorKey is used to filter services
	ServiceSelectorKey GenericAnnotations = "openebs/controller-service"

	// ServiceSelectorKeyEquals is used to filter services when selector logic is
	// used
	ServiceSelectorKeyEquals GenericAnnotations = ServiceSelectorKey + "="

	// SelectorEquals is used to filter
	SelectorEquals GenericAnnotations = "="

	// VSMSelectorKey is used to filter vsm
	VSMSelectorKey GenericAnnotations = "vsm"

	// VSMSelectorKeyEquals is used to filter vsm when selector logic is used
	VSMSelectorKeyEquals GenericAnnotations = VSMSelectorKey + "="

	// ControllerSuffix is used as a suffix for controller related names
	ControllerSuffix GenericAnnotations = "-ctrl"

	// ReplicaSuffix is used as a suffix for replica related names
	ReplicaSuffix GenericAnnotations = "-rep"

	// ServiceSuffix is used as a suffix for service related names
	ServiceSuffix GenericAnnotations = "-svc"

	// ContainerSuffix is used as a suffix for container related names
	ContainerSuffix GenericAnnotations = "-con"
)

type Initializer

type Initializer struct {
	// name of the process that is responsible for initializing this object.
	Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
}

Initializer is information about an initializer that has not yet completed.

type Initializers

type Initializers struct {
	// Pending is a list of initializers that must execute in order before this object is visible.
	// When the last pending initializer is removed, and no failing result is set, the initializers
	// struct will be set to nil and the object is considered as initialized and visible to all
	// clients.
	Pending []Initializer `json:"pending" protobuf:"bytes,1,rep,name=pending"`
	// If result is set with the Failure field, the object will be persisted to storage and then deleted,
	// ensuring that other clients can observe the deletion.
	Result *Status `json:"result,omitempty" protobuf:"bytes,2,opt,name=result"`
}

Initializers tracks the progress of initialization.

type JivaAnnotations

type JivaAnnotations string

TODO Move these to jiva folder

JivaAnnotations will be used to provide filtering options like named-labels, named-suffix, named-prefix, constants, etc.

NOTE:

These value(s) are generally used / remembered by the consumers of

maya api service

const (
	// JivaVolumeProvisionerSelectorValue is used to filter jiva based objects
	JivaVolumeProvisionerSelectorValue JivaAnnotations = "jiva"

	// JivaControllerSelectorValue is used to filter jiva controller objects
	JivaControllerSelectorValue JivaAnnotations = "jiva-controller"

	// JivaReplicaSelectorValue is used to filter jiva replica objects
	JivaReplicaSelectorValue JivaAnnotations = "jiva-replica"

	// JivaServiceSelectorValue is used to filter jiva service objects
	JivaServiceSelectorValue JivaAnnotations = "jiva-controller-service"

	// PortNameISCSI is the name given to iscsi ports
	PortNameISCSI JivaAnnotations = "iscsi"

	// PortNameAPI is the name given to api ports
	PortNameAPI JivaAnnotations = "api"

	// JivaCtrlIPHolder is used as a placeholder for persistent volume controller's
	// IP address
	//
	// NOTE:
	//    This is replaced at runtime
	JivaClusterIPHolder JivaAnnotations = "__CLUSTER_IP__"

	// JivaStorageSizeHolder is used as a placeholder for persistent volume's
	// storage capacity
	//
	// NOTE:
	//    This is replaced at runtime
	JivaStorageSizeHolder JivaAnnotations = "__STOR_SIZE__"

	//
	JivaVolumeNameHolder JivaAnnotations = "__VOLUME_NAME__"
)

TODO Rename these const s.t. they start with Jiva as Key Word

type JivaDefaults

type JivaDefaults string

JivaDefaults is a typed label to provide DEFAULT values to Jiva based persistent volume properties

const (
	// JivaControllerFrontendDef is used to provide default frontend for jiva
	// persistent volume controller
	JivaControllerFrontendDef JivaDefaults = "gotgt"

	// Jiva's iSCSI Qualified IQN value.
	JivaIqnFormatPrefix JivaDefaults = "iqn.2016-09.com.openebs.jiva"

	// JivaISCSIPortDef is used to provide default iscsi port value for jiva
	// based persistent volumes
	JivaISCSIPortDef JivaDefaults = "3260"

	// JivaPersistentMountPathDef is the default mount path used by jiva based
	// persistent volumes
	JivaPersistentMountPathDef JivaDefaults = "/openebs"

	// JivaPersistentMountNameDef is the default mount path name used by jiva based
	// persistent volumes
	JivaPersistentMountNameDef JivaDefaults = "openebs"

	// JivaAPIPortDef is used to provide management port for persistent volume
	// storage
	JivaAPIPortDef JivaDefaults = "9501"

	// JivaReplicaPortOneDef is used to provide port for jiva based persistent
	// volume replica
	JivaReplicaPortOneDef JivaDefaults = "9502"

	// JivaReplicaPortTwoDef is used to provide port for jiva based persistent
	// volume replica
	JivaReplicaPortTwoDef JivaDefaults = "9503"

	// JivaReplicaPortThreeDef is used to provide port for jiva based persistent
	// volume replica
	JivaReplicaPortThreeDef JivaDefaults = "9504"

	// JivaBackEndIPPrefixLbl is used to provide the label for VSM replica IP on
	// Nomad
	JivaBackEndIPPrefixLbl JivaDefaults = "JIVA_REP_IP_"
)

type K8sAnnotations

type K8sAnnotations string

TODO Move these to k8s folder

K8sAnnotations will be used to provide string based constants that are related to kubernetes as orchestration provider

const (
	// K8sKindPod is used to state the k8s Pod
	K8sKindPod K8sAnnotations = "Pod"
	// K8sKindDeployment is used to state the k8s Deployment
	K8sKindDeployment K8sAnnotations = "Deployment"
	// K8sKindService is used to state the k8s Service
	K8sKindService K8sAnnotations = "Service"
	// K8sServiceVersion is used to state the k8s Service version
	K8sServiceVersion K8sAnnotations = "v1"
	// K8sPodVersion is used to state the k8s Pod version
	K8sPodVersion K8sAnnotations = "v1"
	// K8sDeploymentVersion is used to state the k8s Deployment version
	K8sDeploymentVersion K8sAnnotations = "extensions/v1beta1"
	// K8sHostnameTopologyKey is used to specify the hostname as topology key
	K8sHostnameTopologyKey K8sAnnotations = "kubernetes.io/hostname"
)

type LabelSelector

type LabelSelector struct {
	// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
	// map is equivalent to an element of matchExpressions, whose key field is "key", the
	// operator is "In", and the values array contains only "value". The requirements are ANDed.
	// +optional
	MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"`
	// matchExpressions is a list of label selector requirements. The requirements are ANDed.
	// +optional
	MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"`
}

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

type LabelSelectorOperator

type LabelSelectorOperator string

A label selector operator is the set of operators that can be used in a selector requirement.

const (
	LabelSelectorOpIn           LabelSelectorOperator = "In"
	LabelSelectorOpNotIn        LabelSelectorOperator = "NotIn"
	LabelSelectorOpExists       LabelSelectorOperator = "Exists"
	LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist"
)

type LabelSelectorRequirement

type LabelSelectorRequirement struct {
	// key is the label key that the selector applies to.
	// +patchMergeKey=key
	// +patchStrategy=merge
	Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"`
	// operator represents a key's relationship to a set of values.
	// Valid operators ard In, NotIn, Exists and DoesNotExist.
	Operator LabelSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=LabelSelectorOperator"`
	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	// +optional
	Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
}

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

type ListMeta

type ListMeta struct {
	// SelfLink is a URL representing this object.
	// Populated by the system.
	// Read-only.
	// +optional
	SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,1,opt,name=selfLink"`

	// String that identifies the server's internal version of this object that
	// can be used by clients to determine when objects have changed.
	// Value must be treated as opaque by clients and passed unmodified back to the server.
	// Populated by the system.
	// Read-only.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
	// +optional
	ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"`
}

ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.

type MayaAPIServiceOutputLabel

type MayaAPIServiceOutputLabel string
const (
	ReplicaStatusAPILbl MayaAPIServiceOutputLabel = "vsm.openebs.io/replica-status"

	ControllerStatusAPILbl MayaAPIServiceOutputLabel = "vsm.openebs.io/controller-status"

	TargetPortalsAPILbl MayaAPIServiceOutputLabel = "vsm.openebs.io/targetportals"

	ClusterIPsAPILbl MayaAPIServiceOutputLabel = "vsm.openebs.io/cluster-ips"

	ReplicaIPsAPILbl MayaAPIServiceOutputLabel = "vsm.openebs.io/replica-ips"

	ControllerIPsAPILbl MayaAPIServiceOutputLabel = "vsm.openebs.io/controller-ips"

	IQNAPILbl MayaAPIServiceOutputLabel = "vsm.openebs.io/iqn"

	VolumeSizeAPILbl MayaAPIServiceOutputLabel = "vsm.openebs.io/volume-size"

	ReplicaCountAPILbl MayaAPIServiceOutputLabel = "vsm.openebs.io/replica-count"
)

type NameLabel

type NameLabel string

NameLabel type will be used to identify various maya api service components via this typed label

const (
	// Label / Tag for an orchestrator name
	OrchestratorNameLbl NameLabel = "orchprovider.mapi.openebs.io/name"
	// Label / Tag for a persistent volume provisioner name
	VolumeProvisionerNameLbl NameLabel = "volumeprovisioner.mapi.openebs.io/name"
)

type NomadEnvironmentVariable

type NomadEnvironmentVariable string

NomadEnvironmentVariable is a typed label that defines environment variables that are understood by Nomad

const (
	// NomadAddressEnvKey is the environment variable that determines the
	// Nomad server address where the Job request can be directed to.
	NomadAddressEnvKey NomadEnvironmentVariable = "NOMAD_ADDR"
	// NomadRegionEnvKey is the environment variable that determines the Nomad region
	// where the Job request can be directed to.
	NomadRegionEnvKey NomadEnvironmentVariable = "NOMAD_REGION"
)

type ObjectFieldSelector

type ObjectFieldSelector struct {
	// Version of the schema the FieldPath is written in terms of, defaults to "v1".
	// +optional
	APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"`
	// Path of the field to select in the specified API version.
	FieldPath string `json:"fieldPath" protobuf:"bytes,2,opt,name=fieldPath"`
}

ObjectFieldSelector selects an APIVersioned field of an object.

type ObjectMeta

type ObjectMeta struct {
	// Name must be unique within a namespace. Is required when creating resources, although
	// some resources may allow a client to request the generation of an appropriate name
	// automatically. Name is primarily intended for creation idempotence and configuration
	// definition.
	// Cannot be updated.
	// More info: http://kubernetes.io/docs/user-guide/identifiers#names
	// +optional
	Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`

	// GenerateName is an optional prefix, used by the server, to generate a unique
	// name ONLY IF the Name field has not been provided.
	// If this field is used, the name returned to the client will be different
	// than the name passed. This value will also be combined with a unique suffix.
	// The provided value has the same validation rules as the Name field,
	// and may be truncated by the length of the suffix required to make the value
	// unique on the server.
	//
	// If this field is specified and the generated name exists, the server will
	// NOT return a 409 - instead, it will either return 201 Created or 500 with Reason
	// ServerTimeout indicating a unique name could not be found in the time allotted, and the client
	// should retry (optionally after the time indicated in the Retry-After header).
	//
	// Applied only if Name is not specified.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
	// +optional
	GenerateName string `json:"generateName,omitempty" protobuf:"bytes,2,opt,name=generateName"`

	// Namespace defines the space within each name must be unique. An empty namespace is
	// equivalent to the "default" namespace, but "default" is the canonical representation.
	// Not all objects are required to be scoped to a namespace - the value of this field for
	// those objects will be empty.
	//
	// Must be a DNS_LABEL.
	// Cannot be updated.
	// More info: http://kubernetes.io/docs/user-guide/namespaces
	// +optional
	Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"`

	// SelfLink is a URL representing this object.
	// Populated by the system.
	// Read-only.
	// +optional
	SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,4,opt,name=selfLink"`

	// UID is the unique in time and space value for this object. It is typically generated by
	// the server on successful creation of a resource and is not allowed to change on PUT
	// operations.
	//
	// Populated by the system.
	// Read-only.
	// More info: http://kubernetes.io/docs/user-guide/identifiers#uids
	// +optional
	UID string `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid"`

	// An opaque value that represents the internal version of this object that can
	// be used by clients to determine when objects have changed. May be used for optimistic
	// concurrency, change detection, and the watch operation on a resource or set of resources.
	// Clients must treat these values as opaque and passed unmodified back to the server.
	// They may only be valid for a particular resource or set of resources.
	//
	// Populated by the system.
	// Read-only.
	// Value must be treated as opaque by clients and .
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
	// +optional
	ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"`

	// A sequence number representing a specific generation of the desired state.
	// Populated by the system. Read-only.
	// +optional
	Generation int64 `json:"generation,omitempty" protobuf:"varint,7,opt,name=generation"`

	// CreationTimestamp is a timestamp representing the server time when this object was
	// created. It is not guaranteed to be set in happens-before order across separate operations.
	// Clients may not set this value. It is represented in RFC3339 form and is in UTC.
	//
	// Populated by the system.
	// Read-only.
	// Null for lists.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	CreationTimestamp Time `json:"creationTimestamp,omitempty" protobuf:"bytes,8,opt,name=creationTimestamp"`

	// DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
	// field is set by the server when a graceful deletion is requested by the user, and is not
	// directly settable by a client. The resource is expected to be deleted (no longer visible
	// from resource lists, and not reachable by name) after the time in this field. Once set,
	// this value may not be unset or be set further into the future, although it may be shortened
	// or the resource may be deleted prior to this time. For example, a user may request that
	// a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination
	// signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard
	// termination signal (SIGKILL) to the container and after cleanup, remove the pod from the
	// API. In the presence of network partitions, this object may still exist after this
	// timestamp, until an administrator or automated process can determine the resource is
	// fully terminated.
	// If not set, graceful deletion of the object has not been requested.
	//
	// Populated by the system when a graceful deletion is requested.
	// Read-only.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	DeletionTimestamp *Time `json:"deletionTimestamp,omitempty" protobuf:"bytes,9,opt,name=deletionTimestamp"`

	// Number of seconds allowed for this object to gracefully terminate before
	// it will be removed from the system. Only set when deletionTimestamp is also set.
	// May only be shortened.
	// Read-only.
	// +optional
	DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty" protobuf:"varint,10,opt,name=deletionGracePeriodSeconds"`

	// Map of string keys and values that can be used to organize and categorize
	// (scope and select) objects. May match selectors of replication controllers
	// and services.
	// More info: http://kubernetes.io/docs/user-guide/labels
	// +optional
	Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`

	// Annotations is an unstructured key value map stored with a resource that may be
	// set by external tools to store and retrieve arbitrary metadata. They are not
	// queryable and should be preserved when modifying objects.
	// More info: http://kubernetes.io/docs/user-guide/annotations
	// +optional
	Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"`

	// List of objects depended by this object. If ALL objects in the list have
	// been deleted, this object will be garbage collected. If this object is managed by a controller,
	// then an entry in this list will point to this controller, with the controller field set to true.
	// There cannot be more than one managing controller.
	// +optional
	// +patchMergeKey=uid
	// +patchStrategy=merge
	OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"`

	// An initializer is a controller which enforces some system invariant at object creation time.
	// This field is a list of initializers that have not yet acted on this object. If nil or empty,
	// this object has been completely initialized. Otherwise, the object is considered uninitialized
	// and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to
	// observe uninitialized objects.
	//
	// When an object is created, the system will populate this list with the current set of initializers.
	// Only privileged users may set or modify this list. Once it is empty, it may not be modified further
	// by any user.
	Initializers *Initializers `json:"initializers,omitempty" protobuf:"bytes,16,opt,name=initializers"`

	// Must be empty before the object is deleted from the registry. Each entry
	// is an identifier for the responsible component that will remove the entry
	// from the list. If the deletionTimestamp of the object is non-nil, entries
	// in this list can only be removed.
	// +optional
	// +patchStrategy=merge
	Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"`

	// The name of the cluster which the object belongs to.
	// This is used to distinguish resources with same name and namespace in different clusters.
	// This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
	// +optional
	ClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"`
}

ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

type ObjectReference

type ObjectReference struct {
	// +optional
	Kind string
	// +optional
	Namespace string
	// +optional
	Name string
	// +optional
	UID string
	// +optional
	APIVersion string
	// +optional
	ResourceVersion string

	// Optional. If referring to a piece of an object instead of an entire object, this string
	// should contain information to identify the sub-object. For example, if the object
	// reference is to a container within a pod, this would take on a value like:
	// "spec.containers{name}" (where "name" refers to the name of the container that triggered
	// the event) or if no container name is specified "spec.containers[2]" (container with
	// index 2 in this pod). This syntax is chosen only to have some well-defined way of
	// referencing a part of an object.
	// TODO: this design is not final and this field is subject to change in the future.
	// +optional
	FieldPath string
}

ObjectReference contains enough information to let you inspect or modify the referred object.

type OpenEBS

type OpenEBS struct {
	// Unique ID of the persistent disk resource in OpenEBS.
	// More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore
	VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"`
	// Filesystem type of the volume that you want to mount.
	// Tip: Ensure that the filesystem type is supported by the host operating system.
	// Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
	// More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore
	// TODO: how do we prevent errors in the filesystem from compromising the machine
	// +optional
	FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
	// The partition in the volume that you want to mount.
	// If omitted, the default is to mount by volume name.
	// Examples: For volume /dev/sda1, you specify the partition as "1".
	// Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
	// +optional
	Partition int32 `json:"partition,omitempty" protobuf:"varint,3,opt,name=partition"`
	// Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".
	// If omitted, the default is "false".
	// More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore
	// +optional
	ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
}

Represents a Persistent Disk resource in OpenEBS.

An OpenEBS disk must exist before mounting to a container. An OpenEBS disk can only be mounted as read/write once. OpenEBS volumes support ownership management and SELinux relabeling.

type OrchProviderDefaults

type OrchProviderDefaults string

OrchProviderDefaults is a typed label to provide default values w.r.t orchestration provider properties.

const (
	// Default value for orchestrator's network address
	// NOTE: Should be in valid CIDR notation
	OrchNetworkAddrDef OrchProviderDefaults = "172.28.128.1/24"
	// Default value for orchestrator's in-cluster flag
	OrchInClusterDef OrchProviderDefaults = "true"
	// Default value for orchestrator namespace
	OrchNSDef OrchProviderDefaults = "default"
	// OrchRegionDef is the default value of orchestrator region
	OrchRegionDef OrchProviderDefaults = "global"
	// OrchDCDef is the default value of orchestrator datacenter
	OrchDCDef OrchProviderDefaults = "dc1"
	// OrchAddressDef is the default value of orchestrator address
	OrchAddressDef OrchProviderDefaults = "127.0.0.1"
	// OrchCNTypeDef is the default value of orchestrator network type
	OrchCNTypeDef OrchProviderDefaults = "host"
	// OrchCNInterfaceDef is the default value of orchestrator network interface
	OrchCNInterfaceDef OrchProviderDefaults = "enp0s8"
)

type OrchProviderProfileLabel

type OrchProviderProfileLabel string

OrchProviderProfileLabel is a typed label to determine orchestration provider profile's values.

const (
	// Label / Tag for an orchestrator profile name
	OrchProfileNameLbl OrchProviderProfileLabel = "orchprovider.mapi.openebs.io/profile-name"
	// Label / Tag for an orchestrator region
	OrchRegionLbl OrchProviderProfileLabel = "orchprovider.mapi.openebs.io/region"
	// Label / Tag for an orchestrator datacenter
	OrchDCLbl OrchProviderProfileLabel = "orchprovider.mapi.openebs.io/dc"
	// OrchAddrLbl is the Label / Tag for an orchestrator address
	OrchAddrLbl OrchProviderProfileLabel = "orchprovider.mapi.openebs.io/address"
	// Label / Tag for an orchestrator namespace
	OrchNSLbl OrchProviderProfileLabel = "orchprovider.mapi.openebs.io/ns"
	// OrchInClusterLbl is the label for setting the in cluster flag. This is used
	// during provisioning operations. It sets if the provisioning is meant to be
	// within cluster or outside the cluster.
	OrchInClusterLbl OrchProviderProfileLabel = "orchprovider.mapi.openebs.io/in-cluster"
	// OrchCNTypeLbl is the Label / Tag for an orchestrator's networking type
	OrchCNTypeLbl OrchProviderProfileLabel = "orchprovider.mapi.openebs.io/cn-type"
	// OrchCNNetworkAddrLbl is the Label / Tag for an orchestrator's network address
	// in CIDR notation
	OrchCNNetworkAddrLbl OrchProviderProfileLabel = "orchprovider.mapi.openebs.io/cn-addr"
	// OrchCNSubnetLbl is the Label / Tag for an orchestrator's network subnet
	OrchCNSubnetLbl OrchProviderProfileLabel = "orchprovider.mapi.openebs.io/cn-subnet"
	// OrchCNInterfaceLbl is the Label / Tag for an orchestrator's network interface
	OrchCNInterfaceLbl OrchProviderProfileLabel = "orchprovider.mapi.openebs.io/cn-interface"
)

type OrchProviderProfileRegistry

type OrchProviderProfileRegistry string

OrchProviderProfileRegistry type will be used to register various maya api service orchestrator profiles

const (
	// This is the name of PVC as orchestration provider profile
	// This is used for labelling PVC as a orchestration provider profile
	PVCOrchestratorProfile OrchProviderProfileRegistry = "pvc"
)

type OrchProviderRegistry

type OrchProviderRegistry string

OrchestratorRegistry type will be used to register various maya api service orchestrators.

const (
	// K8sOrchestrator states Kubernetes as orchestration provider plugin.
	// This is used for registering Kubernetes as an orchestration provider in maya
	// api server.
	K8sOrchestrator OrchProviderRegistry = "kubernetes"
	// NomadOrchestrator states Nomad as orchestration provider plugin.
	// This is used for registering Nomad as an orchestration provider in maya api
	// server.
	NomadOrchestrator OrchProviderRegistry = "nomad"
	// DefaultOrchestrator provides the default orchestration provider
	DefaultOrchestrator = K8sOrchestrator
)

func GetOrchestratorName

func GetOrchestratorName(profileMap map[string]string) OrchProviderRegistry

GetOrchestratorRegion gets the not nil name of orchestrator

type OwnerReference

type OwnerReference struct {
	// API version of the referent.
	APIVersion string `json:"apiVersion" protobuf:"bytes,5,opt,name=apiVersion"`
	// Kind of the referent.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
	// Name of the referent.
	// More info: http://kubernetes.io/docs/user-guide/identifiers#names
	Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
	// UID of the referent.
	// More info: http://kubernetes.io/docs/user-guide/identifiers#uids
	UID string `json:"uid" protobuf:"bytes,4,opt,name=uid"`
	// If true, this reference points to the managing controller.
	// +optional
	Controller *bool `json:"controller,omitempty" protobuf:"varint,6,opt,name=controller"`
	// If true, AND if the owner has the "foregroundDeletion" finalizer, then
	// the owner cannot be deleted from the key-value store until this
	// reference is removed.
	// Defaults to false.
	// To set this field, a user needs "delete" permission of the owner,
	// otherwise 422 (Unprocessable Entity) will be returned.
	// +optional
	BlockOwnerDeletion *bool `json:"blockOwnerDeletion,omitempty" protobuf:"varint,7,opt,name=blockOwnerDeletion"`
}

OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.

type PersistentVolume

type PersistentVolume struct {
	TypeMeta `json:",inline"`
	// +optional
	ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	//Spec defines a persistent volume owned by OpenEBS cluster
	// +optional
	Spec PersistentVolumeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

	// Status represents the current information about persistent volume.
	// +optional
	Status PersistentVolumeStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

PersistentVolume represents a named volume in OpenEBS that may be accessed by any container, VM, etc. This represents a CREATED resource.

type PersistentVolumeAccessMode

type PersistentVolumeAccessMode string
const (
	// can be mounted read/write mode to exactly 1 host
	ReadWriteOnce PersistentVolumeAccessMode = "ReadWriteOnce"
	// can be mounted in read-only mode to many hosts
	ReadOnlyMany PersistentVolumeAccessMode = "ReadOnlyMany"
	// can be mounted in read/write mode to many hosts
	ReadWriteMany PersistentVolumeAccessMode = "ReadWriteMany"
)

type PersistentVolumeClaim

type PersistentVolumeClaim struct {
	TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
	// +optional
	ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Spec defines the desired characteristics of a volume requested by a pod author.
	// More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims
	// +optional
	Spec PersistentVolumeClaimSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

	// Status represents the current information/status of a persistent volume claim.
	// Read-only.
	// More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims
	// +optional
	Status PersistentVolumeClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

PersistentVolumeClaim is a user's REQUEST for and CLAIM to a persistent volume

type PersistentVolumeClaimList

type PersistentVolumeClaimList struct {
	TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
	// +optional
	ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
	// A list of persistent volume claims.
	// More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims
	Items []PersistentVolumeClaim `json:"items" protobuf:"bytes,2,rep,name=items"`
}

PersistentVolumeClaimList is a list of PersistentVolumeClaim items.

type PersistentVolumeClaimPhase

type PersistentVolumeClaimPhase string
const (
	// used for PersistentVolumeClaims that are not yet bound
	ClaimPending PersistentVolumeClaimPhase = "Pending"
	// used for PersistentVolumeClaims that are bound
	ClaimBound PersistentVolumeClaimPhase = "Bound"
	// used for PersistentVolumeClaims that lost their underlying
	// PersistentVolume. The claim was bound to a PersistentVolume and this
	// volume does not exist any longer and all data on it was lost.
	ClaimLost PersistentVolumeClaimPhase = "Lost"
)

type PersistentVolumeClaimSpec

type PersistentVolumeClaimSpec struct {
	// AccessModes contains the desired access modes the volume should have.
	// More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1
	// +optional
	AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"`
	// A label query over volumes to consider for binding.
	// +optional
	Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
	// Resources represents the minimum resources the volume should have.
	// More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources
	// +optional
	Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,2,opt,name=resources"`
	// VolumeName is the binding reference to the PersistentVolume backing this claim.
	// +optional
	VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,3,opt,name=volumeName"`
	// Name of the StorageClass required by the claim.
	// More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1
	// +optional
	StorageClassName *string `json:"storageClassName,omitempty"`
}

PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes

type PersistentVolumeClaimStatus

type PersistentVolumeClaimStatus struct {
	// Phase represents the current phase of PersistentVolumeClaim.
	// +optional
	Phase PersistentVolumeClaimPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PersistentVolumeClaimPhase"`
	// AccessModes contains the actual access modes the volume backing the PVC has.
	// More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1
	// +optional
	AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,2,rep,name=accessModes,casttype=PersistentVolumeAccessMode"`
	// Represents the actual resources of the underlying volume.
	// +optional
	Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,3,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"`
}

PersistentVolumeClaimStatus is the current status of a persistent volume claim.

type PersistentVolumeList

type PersistentVolumeList struct {
	TypeMeta `json:",inline"`

	// Standard list metadata.
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
	// +optional
	ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// List of persistent volumes.
	// More info: http://kubernetes.io/docs/user-guide/persistent-volumes
	Items []PersistentVolume `json:"items" protobuf:"bytes,2,rep,name=items"`
}

PersistentVolumeList is a list of PersistentVolume items.

type PersistentVolumePhase

type PersistentVolumePhase string
const (
	// used for PersistentVolumes that are not available
	VolumePending PersistentVolumePhase = "Pending"
	// used for PersistentVolumes that are not yet bound
	// Available volumes are held by the binder and matched to PersistentVolumeClaims
	VolumeAvailable PersistentVolumePhase = "Available"
	// used for PersistentVolumes that are bound
	VolumeBound PersistentVolumePhase = "Bound"
	// used for PersistentVolumes where the bound PersistentVol:syntime onumeClaim was deleted
	// released volumes must be recycled before becoming available again
	// this phase is used by the persistent volume claim binder to signal to another process to reclaim the resource
	VolumeReleased PersistentVolumePhase = "Released"
	// used for PersistentVolumes that failed to be correctly recycled or deleted after being released from a claim
	VolumeFailed PersistentVolumePhase = "Failed"
)

type PersistentVolumeReclaimPolicy

type PersistentVolumeReclaimPolicy string

PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes

const (
	// PersistentVolumeReclaimRecycle means the volume will be recycled back into the pool of unbound persistent volumes on release from its claim.
	// The volume plugin must support Recycling.
	PersistentVolumeReclaimRecycle PersistentVolumeReclaimPolicy = "Recycle"
	// PersistentVolumeReclaimDelete means the volume will be deleted from Kubernetes on release from its claim.
	// The volume plugin must support Deletion.
	PersistentVolumeReclaimDelete PersistentVolumeReclaimPolicy = "Delete"
	// PersistentVolumeReclaimRetain means the volume will be left in its current phase (Released) for manual reclamation by the administrator.
	// The default policy is Retain.
	PersistentVolumeReclaimRetain PersistentVolumeReclaimPolicy = "Retain"
)

type PersistentVolumeSource

type PersistentVolumeSource struct {
	// OpenEBS represents an OpenEBS disk
	// +optional
	OpenEBS OpenEBS
}

PersistentVolumeSource represents the source type of the persistent volume.

NOTE:

Exactly one of its members must be set. Currently OpenEBS is the only

member.

type PersistentVolumeSpec

type PersistentVolumeSpec struct {
	// Resources represents the actual resources of the volume
	Capacity ResourceList
	// Source represents the location and type of a volume to mount.
	PersistentVolumeSource
	// AccessModes contains all ways the volume can be mounted
	// +optional
	AccessModes []PersistentVolumeAccessMode
	// ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
	// ClaimRef is expected to be non-nil when bound.
	// claim.VolumeName is the authoritative bind between PV and PVC.
	// When set to non-nil value, PVC.Spec.Selector of the referenced PVC is
	// ignored, i.e. labels of this PV do not need to match PVC selector.
	// +optional
	ClaimRef *ObjectReference
	// Optional: what happens to a persistent volume when released from its claim.
	// +optional
	PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy
	// Name of StorageClass to which this persistent volume belongs. Empty value
	// means that this volume does not belong to any StorageClass.
	// +optional
	StorageClassName string
}

PersistentVolumeSpec provides various characteristics of a volume that can be mounted, used, etc.

NOTE:

Only one of its members may be specified. Currently OpenEBS is the only

member. There may be other members in future.

type PersistentVolumeStatus

type PersistentVolumeStatus struct {
	// Phase indicates if a volume is available, bound to a claim, or released by a claim
	// +optional
	Phase PersistentVolumePhase
	// A human-readable message indicating details about why the volume is in this state.
	// +optional
	Message string
	// Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI
	// +optional
	Reason string
}

type Quantity

type Quantity struct {

	// Change Format at will. See the comment for Canonicalize for
	// more details.
	Format
	// contains filtered or unexported fields
}

Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and Int64() accessors.

The serialization format is:

<quantity> ::= <signedNumber><suffix>

(Note that <suffix> may be empty, from the "" case in <decimalSI>.)

<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= "+" | "-" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei

(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)

<decimalSI> ::= m | "" | k | M | G | T | P | E

(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)

<decimalExponent> ::= "e" <signedNumber> | "E" <signedNumber>

No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.

When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.

Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:

a. No precision is lost
b. No fractional digits will be emitted
c. The exponent (or suffix) is as large as possible.

The sign will be omitted unless the number is negative.

Examples:

1.5 will be serialized as "1500m"
1.5Gi will be serialized as "1536Mi"

NOTE: We reserve the right to amend this canonical format, perhaps to

allow 1.5 to be canonical.

TODO: Remove above disclaimer after all bikeshedding about format is over,

or after March 2015.

Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.

Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)

This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.

+protobuf=true +protobuf.embed=string +protobuf.options.marshal=false +protobuf.options.(gogoproto.goproto_stringer)=false +k8s:openapi-gen=true

func MustParse

func MustParse(str string) Quantity

MustParse turns the given string into a quantity or panics; for tests or others cases where you know the string is valid.

func NewMilliQuantity

func NewMilliQuantity(value int64, format Format) *Quantity

NewMilliQuantity returns a new Quantity representing the given value * 1/1000 in the given format. Note that BinarySI formatting will round fractional values, and will be changed to DecimalSI for values x where (-1 < x < 1) && (x != 0).

func NewQuantity

func NewQuantity(value int64, format Format) *Quantity

NewQuantity returns a new Quantity representing the given value in the given format.

func NewScaledQuantity

func NewScaledQuantity(value int64, scale Scale) *Quantity

NewScaledQuantity returns a new Quantity representing the given value * 10^scale in DecimalSI format.

func ParseQuantity

func ParseQuantity(str string) (Quantity, error)

ParseQuantity turns str into a Quantity, or returns an error.

func QuantityFlag

func QuantityFlag(flagName, defaultValue, description string) *Quantity

QuantityFlag is a helper that makes a quantity flag (using standard flag package). Will panic if defaultValue is not a valid quantity.

func (*Quantity) Add

func (q *Quantity) Add(y Quantity)

Add adds the provide y quantity to the current value. If the current value is zero, the format of the quantity will be updated to the format of y.

func (*Quantity) AsCanonicalBytes

func (q *Quantity) AsCanonicalBytes(out []byte) (result []byte, exponent int32)

AsCanonicalBytes returns the canonical byte representation of this quantity as a mantissa and base 10 exponent. The out byte slice may be passed to the method to avoid an extra allocation.

func (*Quantity) AsDec

func (q *Quantity) AsDec() *inf.Dec

AsDec returns the quantity as represented by a scaled inf.Dec.

func (*Quantity) AsInt64

func (q *Quantity) AsInt64() (int64, bool)

AsInt64 returns a representation of the current value as an int64 if a fast conversion is possible. If false is returned, callers must use the inf.Dec form of this quantity.

func (*Quantity) AsScale

func (q *Quantity) AsScale(scale Scale) (CanonicalValue, bool)

AsScaled returns the current value, rounded up to the provided scale, and returns false if the scale resulted in a loss of precision.

func (*Quantity) CanonicalizeBytes

func (q *Quantity) CanonicalizeBytes(out []byte) (result, suffix []byte)

CanonicalizeBytes returns the canonical form of q and its suffix (see comment on Quantity).

Note about BinarySI:

  • If q.Format is set to BinarySI and q.Amount represents a non-zero value between -1 and +1, it will be emitted as if q.Format were DecimalSI.
  • Otherwise, if q.Format is set to BinarySI, frational parts of q.Amount will be rounded up. (1.1i becomes 2i.)

func (*Quantity) Cmp

func (q *Quantity) Cmp(y Quantity) int

Cmp returns 0 if the quantity is equal to y, -1 if the quantity is less than y, or 1 if the quantity is greater than y.

func (*Quantity) CmpInt64

func (q *Quantity) CmpInt64(y int64) int

CmpInt64 returns 0 if the quantity is equal to y, -1 if the quantity is less than y, or 1 if the quantity is greater than y.

func (*Quantity) Copy

func (q *Quantity) Copy() *Quantity

Copy is a convenience function that makes a deep copy for you. Non-deep copies of quantities share pointers and you will regret that.

func (Quantity) DeepCopy

func (q Quantity) DeepCopy() Quantity

DeepCopy returns a deep-copy of the Quantity value. Note that the method receiver is a value, so we can mutate it in-place and return it.

func (*Quantity) IsZero

func (q *Quantity) IsZero() bool

IsZero returns true if the quantity is equal to zero.

func (Quantity) MarshalJSON

func (q Quantity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface.

func (*Quantity) MilliValue

func (q *Quantity) MilliValue() int64

MilliValue returns the value of ceil(q * 1000); this could overflow an int64; if that's a concern, call Value() first to verify the number is small enough.

func (*Quantity) Neg

func (q *Quantity) Neg()

Neg sets quantity to be the negative value of itself.

func (*Quantity) RoundUp

func (q *Quantity) RoundUp(scale Scale) bool

RoundUp updates the quantity to the provided scale, ensuring that the value is at least 1. False is returned if the rounding operation resulted in a loss of precision. Negative numbers are rounded away from zero (-9 scale 1 rounds to -10).

func (*Quantity) ScaledValue

func (q *Quantity) ScaledValue(scale Scale) int64

ScaledValue returns the value of ceil(q * 10^scale); this could overflow an int64. To detect overflow, call Value() first and verify the expected magnitude.

func (*Quantity) Set

func (q *Quantity) Set(value int64)

Set sets q's value to be value.

func (*Quantity) SetMilli

func (q *Quantity) SetMilli(value int64)

SetMilli sets q's value to be value * 1/1000.

func (*Quantity) SetScaled

func (q *Quantity) SetScaled(value int64, scale Scale)

SetScaled sets q's value to be value * 10^scale

func (*Quantity) Sign

func (q *Quantity) Sign() int

Sign returns 0 if the quantity is zero, -1 if the quantity is less than zero, or 1 if the quantity is greater than zero.

func (*Quantity) String

func (q *Quantity) String() string

String formats the Quantity as a string, caching the result if not calculated. String is an expensive operation and caching this result significantly reduces the cost of normal parse / marshal operations on Quantity.

func (*Quantity) Sub

func (q *Quantity) Sub(y Quantity)

Sub subtracts the provided quantity from the current value in place. If the current value is zero, the format of the quantity will be updated to the format of y.

func (*Quantity) ToDec

func (q *Quantity) ToDec() *Quantity

ToDec promotes the quantity in place to use an inf.Dec representation and returns itself.

func (*Quantity) UnmarshalJSON

func (q *Quantity) UnmarshalJSON(value []byte) error

UnmarshalJSON implements the json.Unmarshaller interface. TODO: Remove support for leading/trailing whitespace

func (*Quantity) Value

func (q *Quantity) Value() int64

Value returns the value of q; any fractional part will be lost.

type ResourceList

type ResourceList map[ResourceName]Quantity

ResourceList is a set of (resource name, quantity) pairs.

type ResourceName

type ResourceName string

ResourceName is the name identifying various resources in a ResourceList.

type ResourceRequirements

type ResourceRequirements struct {
	// Limits describes the maximum amount of compute resources allowed.
	// +optional
	Limits ResourceList
	// Requests describes the minimum amount of compute resources required.
	// If Request is omitted for a container, it defaults to Limits if that is explicitly specified,
	// otherwise to an implementation-defined value
	// +optional
	Requests ResourceList
}

ResourceRequirements describes the compute resource requirements.

type Scale

type Scale int32

Scale is used for getting and setting the base-10 scaled value. Base-2 scales are omitted for mathematical simplicity. See Quantity.ScaledValue for more details.

const (
	Nano  Scale = -9
	Micro Scale = -6
	Milli Scale = -3
	Kilo  Scale = 3
	Mega  Scale = 6
	Giga  Scale = 9
	Tera  Scale = 12
	Peta  Scale = 15
	Exa   Scale = 18
)

type Status

type Status struct {
	TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Status of the operation.
	// One of: "Success" or "Failure".
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
	// +optional
	Status string `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"`
	// A human-readable description of the status of this operation.
	// +optional
	Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
	// A machine-readable description of why this operation is in the
	// "Failure" status. If this value is empty there
	// is no information available. A Reason clarifies an HTTP status
	// code but does not override it.
	// +optional
	Reason StatusReason `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason,casttype=StatusReason"`
	// Extended data associated with the reason.  Each reason may define its
	// own extended details. This field is optional and the data returned
	// is not guaranteed to conform to any schema except that defined by
	// the reason type.
	// +optional
	Details *StatusDetails `json:"details,omitempty" protobuf:"bytes,5,opt,name=details"`
	// Suggested HTTP return code for this status, 0 if not set.
	// +optional
	Code int32 `json:"code,omitempty" protobuf:"varint,6,opt,name=code"`
}

Status is a return value for calls that don't return other objects.

type StatusCause

type StatusCause struct {
	// A machine-readable description of the cause of the error. If this value is
	// empty there is no information available.
	// +optional
	Type CauseType `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason,casttype=CauseType"`
	// A human-readable description of the cause of the error.  This field may be
	// presented as-is to a reader.
	// +optional
	Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
	// The field of the resource that has caused this error, as named by its JSON
	// serialization. May include dot and postfix notation for nested attributes.
	// Arrays are zero-indexed.  Fields may appear more than once in an array of
	// causes due to fields having multiple errors.
	// Optional.
	//
	// Examples:
	//   "name" - the field "name" on the current resource
	//   "items[0].name" - the field "name" on the first array entry in "items"
	// +optional
	Field string `json:"field,omitempty" protobuf:"bytes,3,opt,name=field"`
}

StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.

type StatusDetails

type StatusDetails struct {
	// The name attribute of the resource associated with the status StatusReason
	// (when there is a single name which can be described).
	// +optional
	Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
	// The group attribute of the resource associated with the status StatusReason.
	// +optional
	Group string `json:"group,omitempty" protobuf:"bytes,2,opt,name=group"`
	// The kind attribute of the resource associated with the status StatusReason.
	// On some operations may differ from the requested resource Kind.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	Kind string `json:"kind,omitempty" protobuf:"bytes,3,opt,name=kind"`
	// UID of the resource.
	// (when there is a single resource which can be described).
	// More info: http://kubernetes.io/docs/user-guide/identifiers#uids
	// +optional
	UID string `json:"uid,omitempty" protobuf:"bytes,6,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
	// The Causes array includes more details associated with the StatusReason
	// failure. Not all StatusReasons may provide detailed causes.
	// +optional
	Causes []StatusCause `json:"causes,omitempty" protobuf:"bytes,4,rep,name=causes"`
	// If specified, the time in seconds before the operation should be retried.
	// +optional
	RetryAfterSeconds int32 `json:"retryAfterSeconds,omitempty" protobuf:"varint,5,opt,name=retryAfterSeconds"`
}

StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.

type StatusReason

type StatusReason string

StatusReason is an enumeration of possible failure causes. Each StatusReason must map to a single HTTP status code, but multiple reasons may map to the same HTTP status code. TODO: move to apiserver

const (
	// StatusReasonUnknown means the server has declined to indicate a specific reason.
	// The details field may contain other information about this error.
	// Status code 500.
	StatusReasonUnknown StatusReason = ""

	// StatusReasonUnauthorized means the server can be reached and understood the request, but requires
	// the user to present appropriate authorization credentials (identified by the WWW-Authenticate header)
	// in order for the action to be completed. If the user has specified credentials on the request, the
	// server considers them insufficient.
	// Status code 401
	StatusReasonUnauthorized StatusReason = "Unauthorized"

	// StatusReasonForbidden means the server can be reached and understood the request, but refuses
	// to take any further action.  It is the result of the server being configured to deny access for some reason
	// to the requested resource by the client.
	// Details (optional):
	//   "kind" string - the kind attribute of the forbidden resource
	//                   on some operations may differ from the requested
	//                   resource.
	//   "id"   string - the identifier of the forbidden resource
	// Status code 403
	StatusReasonForbidden StatusReason = "Forbidden"

	// StatusReasonNotFound means one or more resources required for this operation
	// could not be found.
	// Details (optional):
	//   "kind" string - the kind attribute of the missing resource
	//                   on some operations may differ from the requested
	//                   resource.
	//   "id"   string - the identifier of the missing resource
	// Status code 404
	StatusReasonNotFound StatusReason = "NotFound"

	// StatusReasonAlreadyExists means the resource you are creating already exists.
	// Details (optional):
	//   "kind" string - the kind attribute of the conflicting resource
	//   "id"   string - the identifier of the conflicting resource
	// Status code 409
	StatusReasonAlreadyExists StatusReason = "AlreadyExists"

	// StatusReasonConflict means the requested operation cannot be completed
	// due to a conflict in the operation. The client may need to alter the
	// request. Each resource may define custom details that indicate the
	// nature of the conflict.
	// Status code 409
	StatusReasonConflict StatusReason = "Conflict"

	// StatusReasonGone means the item is no longer available at the server and no
	// forwarding address is known.
	// Status code 410
	StatusReasonGone StatusReason = "Gone"

	// StatusReasonInvalid means the requested create or update operation cannot be
	// completed due to invalid data provided as part of the request. The client may
	// need to alter the request. When set, the client may use the StatusDetails
	// message field as a summary of the issues encountered.
	// Details (optional):
	//   "kind" string - the kind attribute of the invalid resource
	//   "id"   string - the identifier of the invalid resource
	//   "causes"      - one or more StatusCause entries indicating the data in the
	//                   provided resource that was invalid.  The code, message, and
	//                   field attributes will be set.
	// Status code 422
	StatusReasonInvalid StatusReason = "Invalid"

	// StatusReasonServerTimeout means the server can be reached and understood the request,
	// but cannot complete the action in a reasonable time. The client should retry the request.
	// This is may be due to temporary server load or a transient communication issue with
	// another server. Status code 500 is used because the HTTP spec provides no suitable
	// server-requested client retry and the 5xx class represents actionable errors.
	// Details (optional):
	//   "kind" string - the kind attribute of the resource being acted on.
	//   "id"   string - the operation that is being attempted.
	//   "retryAfterSeconds" int32 - the number of seconds before the operation should be retried
	// Status code 500
	StatusReasonServerTimeout StatusReason = "ServerTimeout"

	// StatusReasonTimeout means that the request could not be completed within the given time.
	// Clients can get this response only when they specified a timeout param in the request,
	// or if the server cannot complete the operation within a reasonable amount of time.
	// The request might succeed with an increased value of timeout param. The client *should*
	// wait at least the number of seconds specified by the retryAfterSeconds field.
	// Details (optional):
	//   "retryAfterSeconds" int32 - the number of seconds before the operation should be retried
	// Status code 504
	StatusReasonTimeout StatusReason = "Timeout"

	// StatusReasonBadRequest means that the request itself was invalid, because the request
	// doesn't make any sense, for example deleting a read-only object.  This is different than
	// StatusReasonInvalid above which indicates that the API call could possibly succeed, but the
	// data was invalid.  API calls that return BadRequest can never succeed.
	StatusReasonBadRequest StatusReason = "BadRequest"

	// StatusReasonMethodNotAllowed means that the action the client attempted to perform on the
	// resource was not supported by the code - for instance, attempting to delete a resource that
	// can only be created. API calls that return MethodNotAllowed can never succeed.
	StatusReasonMethodNotAllowed StatusReason = "MethodNotAllowed"

	// StatusReasonInternalError indicates that an internal error occurred, it is unexpected
	// and the outcome of the call is unknown.
	// Details (optional):
	//   "causes" - The original error
	// Status code 500
	StatusReasonInternalError StatusReason = "InternalError"

	// StatusReasonExpired indicates that the request is invalid because the content you are requesting
	// has expired and is no longer available. It is typically associated with watches that can't be
	// serviced.
	// Status code 410 (gone)
	StatusReasonExpired StatusReason = "Expired"

	// StatusReasonServiceUnavailable means that the request itself was valid,
	// but the requested service is unavailable at this time.
	// Retrying the request after some time might succeed.
	// Status code 503
	StatusReasonServiceUnavailable StatusReason = "ServiceUnavailable"
)

type Time

type Time struct {
	time.Time `protobuf:"-"`
}

Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.

+protobuf.options.marshal=false +protobuf.as=Timestamp +protobuf.options.(gogoproto.goproto_stringer)=false

func Date

func Date(year int, month time.Month, day, hour, min, sec, nsec int, loc *time.Location) Time

Date returns the Time corresponding to the supplied parameters by wrapping time.Date.

func NewTime

func NewTime(time time.Time) Time

NewTime returns a wrapped instance of the provided time

func Now

func Now() Time

Now returns the current local time.

func Unix

func Unix(sec int64, nsec int64) Time

Unix returns the local time corresponding to the given Unix time by wrapping time.Unix.

func (Time) Before

func (t Time) Before(u Time) bool

Before reports whether the time instant t is before u.

func (Time) DeepCopy

func (t Time) DeepCopy() Time

DeepCopy returns a deep-copy of the Time value. The underlying time.Time type is effectively immutable in the time API, so it is safe to copy-by-assign, despite the presence of (unexported) Pointer fields.

func (Time) Equal

func (t Time) Equal(u Time) bool

Equal reports whether the time instant t is equal to u.

func (*Time) Fuzz

func (t *Time) Fuzz(c fuzz.Continue)

Fuzz satisfies fuzz.Interface.

func (*Time) IsZero

func (t *Time) IsZero() bool

IsZero returns true if the value is nil or time is zero.

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (Time) MarshalQueryParameter

func (t Time) MarshalQueryParameter() (string, error)

MarshalQueryParameter converts to a URL query parameter value

func (Time) Rfc3339Copy

func (t Time) Rfc3339Copy() Time

Rfc3339Copy returns a copy of the Time at second-level precision.

func (Time) String

func (t Time) String() string

String returns the representation of the time.

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaller interface.

func (*Time) UnmarshalQueryParameter

func (t *Time) UnmarshalQueryParameter(str string) error

UnmarshalQueryParameter converts from a URL query parameter value to an object

type TypeMeta

type TypeMeta struct {
	// Kind is a string value representing the REST resource this object represents.
	// Servers may infer this from the endpoint the client submits requests to.
	// Cannot be updated.
	// In CamelCase.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"`

	// APIVersion defines the versioned schema of this representation of an object.
	// Servers should convert recognized schemas to the latest internal value, and
	// may reject unrecognized values.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
	// +optional
	APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=apiVersion"`
}

TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.

type Volume

type Volume struct {
	Kind       string `yaml:"kind" json:"kind"`
	APIVersion string `yaml:"api_version" json:"api_version"`
	Metadata   struct {
		Annotations       interface{} `yaml:"annotations" json:"annotations"`
		CreationTimestamp interface{} `yaml:"creation_timestamp" json:"creation_timestamp"`
		Name              string      `yaml:"name" json:"name"`
		Labels            struct {
			Storage string `yaml:"storage" json:"storage"`
		} `yaml:"labels" json:"labels"`
	} `yaml:"metadata" json:"metadata"`
	Spec struct {
		AccessModes interface{} `yaml:"access_modes" json:"access_modes"`
		Capacity    interface{} `yaml:"capacity" json:"capacity"`
		ClaimRef    interface{} `yaml:"claim_ref" json:"claim_ref"`
		OpenEBS     struct {
			VolumeID string `yaml:"volume_id" json:"volume_id"`
		} `yaml:"open_ebs" json:"open_ebs"`
		PersistentVolumeReclaimPolicy string `yaml:"persistent_volume_reclaim_policy" json:"persistent_volume_reclaim_policy"`
		StorageClassName              string `yaml:"storage_class_name" json:"storage_class_name"`
	} `yaml:"spec" json:"spec"`
	Status struct {
		Message string `yaml:"message" json:"message"`
		Phase   string `yaml:"phase" json:"phase"`
		Reason  string `yaml:"reason" json:"reason"`
	} `yaml:"status" json:"status"`
}

Volume is a command implementation struct

type VolumeProvisionerDefaults

type VolumeProvisionerDefaults string

VolumeProvsionerDefaults is a typed label to provide default values w.r.t volume provisioner properties.

const (
	// Default value for persistent volume provisioner's controller count
	PVPControllerCountDef VolumeProvisionerDefaults = "1"
	// Default value for persistent volume provisioner's replica count
	PVPReplicaCountDef VolumeProvisionerDefaults = "2"
	// Default value for persistent volume provisioner's persistent path count
	// This should be equal to persistent volume provisioner's replica count
	PVPPersistentPathCountDef VolumeProvisionerDefaults = PVPReplicaCountDef
	// Default value for persistent volume provisioner's controller image
	PVPControllerImageDef VolumeProvisionerDefaults = "openebs/jiva:latest"
	// Default value for persistent volume provisioner's support for replica
	PVPReqReplicaDef VolumeProvisionerDefaults = "true"
	// Default value for persistent volume provisioner's replica image
	PVPReplicaImageDef VolumeProvisionerDefaults = "openebs/jiva:latest"
	// Default value for persistent volume provisioner's networking support
	PVPReqNetworkingDef VolumeProvisionerDefaults = "false"
	// PVPPersistentPathDef is the default value for persistent volume provisioner's
	// replica persistent path
	PVPPersistentPathDef VolumeProvisionerDefaults = "/var/openebs"
	// PVPStorageSizeDef is the default value for persistent volume provisioner's
	// replica size
	PVPStorageSizeDef VolumeProvisionerDefaults = "1G"
)

type VolumeProvisionerProfileLabel

type VolumeProvisionerProfileLabel string

VolumeProvisionerProfileLabel is a typed label to determine volume provisioner profile values.

const (
	// Label / Tag for a persistent volume provisioner profile's name
	PVPProfileNameLbl VolumeProvisionerProfileLabel = "volumeprovisioner.mapi.openebs.io/profile-name"
	// Label / Tag for a persistent volume provisioner's replica support
	PVPReqReplicaLbl VolumeProvisionerProfileLabel = "volumeprovisioner.mapi.openebs.io/req-replica"
	// Label / Tag for a persistent volume provisioner's networking support
	PVPReqNetworkingLbl VolumeProvisionerProfileLabel = "volumeprovisioner.mapi.openebs.io/req-networking"
	// Label / Tag for a persistent volume provisioner's replica count
	PVPReplicaCountLbl VolumeProvisionerProfileLabel = "volumeprovisioner.mapi.openebs.io/replica-count"
	// Label / Tag for a persistent volume provisioner's persistent path count
	PVPPersistentPathCountLbl VolumeProvisionerProfileLabel = PVPReplicaCountLbl
	// Label / Tag for a persistent volume provisioner's storage size
	PVPStorageSizeLbl VolumeProvisionerProfileLabel = "volumeprovisioner.mapi.openebs.io/storage-size"
	// Label / Tag for a persistent volume provisioner's replica IPs
	PVPReplicaIPsLbl VolumeProvisionerProfileLabel = "volumeprovisioner.mapi.openebs.io/replica-ips"
	// Label / Tag for a persistent volume provisioner's replica image
	PVPReplicaImageLbl VolumeProvisionerProfileLabel = "volumeprovisioner.mapi.openebs.io/replica-image"
	// Label / Tag for a persistent volume provisioner's controller count
	PVPControllerCountLbl VolumeProvisionerProfileLabel = "volumeprovisioner.mapi.openebs.io/controller-count"
	// Label / Tag for a persistent volume provisioner's controller image
	PVPControllerImageLbl VolumeProvisionerProfileLabel = "volumeprovisioner.mapi.openebs.io/controller-image"
	// Label / Tag for a persistent volume provisioner's controller IPs
	PVPControllerIPsLbl VolumeProvisionerProfileLabel = "volumeprovisioner.mapi.openebs.io/controller-ips"
	// Label / Tag for a persistent volume provisioner's persistent path
	PVPPersistentPathLbl VolumeProvisionerProfileLabel = "volumeprovisioner.mapi.openebs.io/persistent-path"
	// Label / Tag for a persistent volume provisioner's controller node taint toleration
	PVPControllerNodeTaintTolerationLbl VolumeProvisionerProfileLabel = "volumeprovisioner.mapi.openebs.io/controller-node-taint-toleration"
	// Label / Tag for a persistent volume provisioner's replica node taint toleration
	PVPReplicaNodeTaintTolerationLbl VolumeProvisionerProfileLabel = "volumeprovisioner.mapi.openebs.io/replica-node-taint-toleration"

	// PVPReplicaTopologyKeyLbl is the label for a persistent volume provisioner's
	// VSM replica topology key
	PVPReplicaTopologyKeyLbl VolumeProvisionerProfileLabel = "volumeprovisioner.mapi.openebs.io/replica-topology-key"
)

type VolumeProvisionerProfileRegistry

type VolumeProvisionerProfileRegistry string

VolumeProvisionerProfileRegistry type will be used to register various maya api service persistent volume provisioner profiles

const (
	// This is the name of PVC as persistent volume provisioner profile
	// This is used for labelling PVC as a persistent volume provisioner profile
	PVCProvisionerProfile VolumeProvisionerProfileRegistry = "pvc"
)

type VolumeProvisionerRegistry

type VolumeProvisionerRegistry string

VolumeProvisionerRegistry type will be used to register various maya api service volume provisioners.

const (
	// JivaVolumeProvisioner states Jiva as persistent volume provisioner plugin.
	// This is used for registering Jiva as a volume provisioner in maya api server.
	JivaVolumeProvisioner VolumeProvisionerRegistry = "jiva"
	// DefaultVolumeProvisioner provides the default persistent volume provisioner
	// plugin.
	DefaultVolumeProvisioner VolumeProvisionerRegistry = JivaVolumeProvisioner
)

func DefaultVolumeProvisionerName

func DefaultVolumeProvisionerName() VolumeProvisionerRegistry

DefaultVolumeProvisionerName gets the default name of persistent volume provisioner plugin used to cater the provisioning requests to maya api service

NOTE:

This returns the hard coded default set in this pkg

type VolumeSnapshot

type VolumeSnapshot struct {
	metav1.TypeMeta `json:",inline"`
	Metadata        metav1.ObjectMeta `json:"metadata"`

	// Spec represents the desired state of the snapshot
	// +optional
	Spec VolumeSnapshotSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`

	// SnapshotName represents the name of the snapshot
	SnapshotName string `json:"snapshotName" protobuf:"bytes,1,opt,name=snapshotName"`

	// Status represents the latest observer state of the snapshot
	// +optional
	Status VolumeSnapshotStatus `json:"status" protobuf:"bytes,3,opt,name=status"`
}

The volume snapshot object accessible to the user. Upon succesful creation of the actual snapshot by the volume provider it is bound to the corresponding VolumeSnapshotData through the VolumeSnapshotSpec

type VolumeSnapshotCondition

type VolumeSnapshotCondition struct {
	// Type of replication controller condition.
	Type VolumeSnapshotConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=VolumeSnapshotConditionType"`
	// Status of the condition, one of True, False, Unknown.
	Status core_v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
	// The last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime" protobuf:"bytes,3,opt,name=lastTransitionTime"`
	// The reason for the condition's last transition.
	// +optional
	Reason string `json:"reason" protobuf:"bytes,4,opt,name=reason"`
	// A human readable message indicating details about the transition.
	// +optional
	Message string `json:"message" protobuf:"bytes,5,opt,name=message"`
}

VolumeSnapshot Condition describes the state of a volume snapshot at a certain point.

type VolumeSnapshotConditionType

type VolumeSnapshotConditionType string
const (
	// VolumeSnapshotReady is added when the snapshot has been successfully created and is ready to be used.
	VolumeSnapshotConditionReady VolumeSnapshotConditionType = "Ready"
)

These are valid conditions of a volume snapshot.

type VolumeSnapshotList

type VolumeSnapshotList struct {
	metav1.TypeMeta `json:",inline"`
	Metadata        metav1.ListMeta  `json:"metadata"`
	Items           []VolumeSnapshot `json:"items"`
}

type VolumeSnapshotSpec

type VolumeSnapshotSpec struct {
	// PersistentVolumeClaimName is the name of the PVC being snapshotted
	// +optional
	PersistentVolumeClaimName string `json:"persistentVolumeClaimName" protobuf:"bytes,1,opt,name=persistentVolumeClaimName"`

	// SnapshotDataName binds the VolumeSnapshot object with the VolumeSnapshotData
	// +optional
	SnapshotDataName string `json:"snapshotDataName" protobuf:"bytes,2,opt,name=snapshotDataName"`
}

The desired state of the volume snapshot

type VolumeSnapshotStatus

type VolumeSnapshotStatus struct {
	// The time the snapshot was successfully created
	// +optional
	CreationTimestamp metav1.Time `json:"creationTimestamp" protobuf:"bytes,1,opt,name=creationTimestamp"`

	// Representes the lates available observations about the volume snapshot
	Conditions []VolumeSnapshotCondition `json:"conditions" protobuf:"bytes,2,rep,name=conditions"`
}

type VsmSpec

type VsmSpec struct {
	Kind       string `yaml:"kind"`
	APIVersion string `yaml:"apiVersion"`
	Metadata   struct {
		Name   string `yaml:"name"`
		Labels struct {
			Storage string `yaml:"volumeprovisioner.mapi.openebs.io/storage-size"`
		}
	} `yaml:"metadata"`
}

VsmSpec holds the config for creating a VSM

Directories

Path Synopsis
This package deals with profiles.
This package deals with profiles.

Jump to

Keyboard shortcuts

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