pool

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package pool to manage a rook pool.

Package pool to manage a rook pool.

Package pool to manage a rook pool.

Index

Constants

This section is empty.

Variables

View Source
var PoolResource = opkit.CustomResource{
	Name:    customResourceName,
	Plural:  customResourceNamePlural,
	Group:   k8sutil.CustomResourceGroup,
	Version: k8sutil.V1Alpha1,
	Scope:   apiextensionsv1beta1.NamespaceScoped,
	Kind:    reflect.TypeOf(Pool{}).Name(),
}

PoolResource represents the Pool custom resource object

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns back a Group qualified GroupResource

Types

type ErasureCodedSpec added in v0.6.0

type ErasureCodedSpec struct {
	// Number of coding chunks per object in an erasure coded storage pool (required for erasure-coded pool type)
	CodingChunks uint `json:"codingChunks"`

	// Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type)
	DataChunks uint `json:"dataChunks"`

	// The algorithm for erasure coding
	Algorithm string `json:"algorithm"`
}

ErasureCodeSpec represents the spec for erasure code in a pool

type Pool

type Pool struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              PoolSpec `json:"spec"`
}

Pool is the definition of the pool custom resource

type PoolController

type PoolController struct {
	// contains filtered or unexported fields
}

PoolController represents a controller object for pool custom resources

func NewPoolController

func NewPoolController(context *clusterd.Context) *PoolController

NewPoolController create controller for watching pool custom resources created

func (*PoolController) StartWatch

func (c *PoolController) StartWatch(namespace string, stopCh chan struct{}) error

Watch watches for instances of Pool custom resources and acts on them

type PoolList

type PoolList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []Pool `json:"items"`
}

PoolList is the definition of a list of pools

type PoolSpec

type PoolSpec struct {
	// The failure domain: osd or host (technically also any type in the crush map)
	FailureDomain string `json:"failureDomain"`

	// The replication settings
	Replicated ReplicatedSpec `json:"replicated"`

	// The erasure code setteings
	ErasureCoded ErasureCodedSpec `json:"erasureCoded"`
}

PoolSpec represent the spec of a pool

func ModelToSpec added in v0.6.0

func ModelToSpec(pool model.Pool) PoolSpec

func (*PoolSpec) ToModel added in v0.6.0

func (p *PoolSpec) ToModel(name string) *model.Pool

func (*PoolSpec) Validate added in v0.6.0

func (p *PoolSpec) Validate(context *clusterd.Context, namespace string) error

type ReplicatedSpec added in v0.6.0

type ReplicatedSpec struct {
	// Number of copies per object in a replicated storage pool, including the object itself (required for replicated pool type)
	Size uint `json:"size"`
}

ReplicationSpec represents the spec for replication in a pool

Jump to

Keyboard shortcuts

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