Documentation ¶
Overview ¶
Package cluster to manage a rook cluster.
Package cluster to manage a rook cluster.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ClusterResource = kit.CustomResource{ Name: customResourceName, Plural: customResourceNamePlural, Group: k8sutil.CustomResourceGroup, Version: k8sutil.V1Alpha1, Scope: apiextensionsv1beta1.NamespaceScoped, Kind: reflect.TypeOf(Cluster{}).Name(), }
Functions ¶
func Kind ¶ added in v0.5.0
Kind takes an unqualified kind and returns back a Group qualified GroupKind
func Resource ¶ added in v0.5.0
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns back a Group qualified GroupResource
Types ¶
type Cluster ¶
type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec ClusterSpec `json:"spec"` // contains filtered or unexported fields }
Cluster represents an object of a Rook cluster
type ClusterController ¶ added in v0.5.0
type ClusterController struct {
// contains filtered or unexported fields
}
ClusterController controls an instance of a Rook cluster
func NewClusterController ¶ added in v0.5.0
func NewClusterController(context *clusterd.Context) (*ClusterController, error)
NewClusterController create controller for watching cluster custom resources created
func (*ClusterController) StartWatch ¶ added in v0.5.0
func (c *ClusterController) StartWatch(namespace string, stopCh chan struct{}) error
Watch watches instances of cluster resources
type ClusterList ¶
type ClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Cluster `json:"items"` }
ClusterList represents an object of a Rook cluster list
type ClusterSpec ¶ added in v0.5.0
type ClusterSpec struct { // VersionTag is the expected version of the rook container to run in the cluster. // The operator will eventually make the rook cluster version // equal to the expected version. VersionTag string `json:"versionTag"` // Paused is to pause the control of the operator for the rook cluster. Paused bool `json:"paused,omitempty"` // The path on the host where config and data can be persisted. DataDirHostPath string `json:"dataDirHostPath"` // The placement-related configuration to pass to kubernetes (affinity, node selector, tolerations). Placement PlacementSpec `json:"placement,omitempty"` // A spec for available storage in the cluster and how it should be used Storage osd.StorageSpec `json:"storage"` }
ClusterSpec represents an object of a Rook cluster spec
type PlacementSpec ¶ added in v0.5.0
type PlacementSpec struct { All k8sutil.Placement `json:"all,omitempty"` API k8sutil.Placement `json:"api,omitempty"` MDS k8sutil.Placement `json:"mds,omitempty"` MGR k8sutil.Placement `json:"mgr,omitempty"` MON k8sutil.Placement `json:"mon,omitempty"` OSD k8sutil.Placement `json:"osd,omitempty"` RGW k8sutil.Placement `json:"rgw,omitempty"` }
PlacementSpec is a set of Placement configurations for the rook cluster.
func (PlacementSpec) GetAPI ¶ added in v0.5.0
func (p PlacementSpec) GetAPI() k8sutil.Placement
GetAPI returns the placement for the API service
func (PlacementSpec) GetMDS ¶ added in v0.5.0
func (p PlacementSpec) GetMDS() k8sutil.Placement
GetMDS returns the placement for the MDS service
func (PlacementSpec) GetMGR ¶ added in v0.5.1
func (p PlacementSpec) GetMGR() k8sutil.Placement
GetMGR returns the placement for the MGR service
func (PlacementSpec) GetMON ¶ added in v0.5.0
func (p PlacementSpec) GetMON() k8sutil.Placement
GetMON returns the placement for the MON service
func (PlacementSpec) GetOSD ¶ added in v0.5.0
func (p PlacementSpec) GetOSD() k8sutil.Placement
GetOSD returns the placement for the OSD service
func (PlacementSpec) GetRGW ¶ added in v0.5.0
func (p PlacementSpec) GetRGW() k8sutil.Placement
GetRGW returns the placement for the RGW service