cluster

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2017 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package cluster to manage a rook cluster.

Package cluster to manage a rook cluster.

Index

Constants

View Source
const (
	CustomResourceName       = "cluster"
	CustomResourceNamePlural = "clusters"
)
View Source
const (
	// DefaultClusterName states the default name of the rook-cluster if not provided.
	DefaultClusterName = "rook"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
)

Functions

func Kind added in v0.5.0

func Kind(kind string) schema.GroupKind

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, volumeAttachmentController flexcrd.VolumeAttachmentController) *ClusterController

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"`

	// HostNetwork to enable host network
	HostNetwork bool `json:"hostNetwork"`

	// MonCount sets the mon size
	MonCount int `json:"monCount"`
}

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

Jump to

Keyboard shortcuts

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