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 ¶
var PoolResource = kit.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 Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns back a Group qualified GroupResource
Types ¶
type ErasureCodeSpec ¶
type ErasureCodeSpec 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"`
}
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(clientset kubernetes.Interface) (*PoolController, error)
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 replication settings
Replication ReplicationSpec `json:"replication"`
// The erasure code setteings
ErasureCoding ErasureCodeSpec `json:"erasureCode"`
}
PoolSpec represent the spec of a pool
type ReplicationSpec ¶
type ReplicationSpec 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