Documentation ¶
Overview ¶
Package v1alpha1 documentation file
Index ¶
Constants ¶
const ( // DefaultCassandraImage Default repository for cassandra images DefaultCassandraImage = "quay.io/getpantheon/cassandra" // DefaultCassandraTag Default tag/version for cassandra image DefaultCassandraTag = "2x-64" )
Variables ¶
var ( // SchemeBuilder for the CRD SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme adds it to the scheme AddToScheme = SchemeBuilder.AddToScheme // SchemeGroupVersion is the group version used to register these objects. SchemeGroupVersion = schema.GroupVersion{Group: groupName, Version: version} )
Functions ¶
This section is empty.
Types ¶
type CassandraCluster ¶
type CassandraCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterSpec `json:"spec"` Status ClusterStatus `json:"status"` }
CassandraCluster CassandraCluster api representation
func (*CassandraCluster) DeepCopy ¶
func (in *CassandraCluster) DeepCopy() *CassandraCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraCluster.
func (*CassandraCluster) DeepCopyInto ¶
func (in *CassandraCluster) DeepCopyInto(out *CassandraCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CassandraCluster) DeepCopyObject ¶
func (in *CassandraCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CassandraClusterList ¶
type CassandraClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `jsoån:"metadata,omitempty"` Items []CassandraCluster `json:"items"` }
CassandraClusterList Lists of CassandraClusters
func (*CassandraClusterList) DeepCopy ¶
func (in *CassandraClusterList) DeepCopy() *CassandraClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraClusterList.
func (*CassandraClusterList) DeepCopyInto ¶
func (in *CassandraClusterList) DeepCopyInto(out *CassandraClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CassandraClusterList) DeepCopyObject ¶
func (in *CassandraClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterPhase ¶
type ClusterPhase string
ClusterPhase type alias for the string representing the phase
const ( // ClusterPhaseInitial is the initial phase before resources are created // but after the CRD resource is created in kube ClusterPhaseInitial ClusterPhase = "Initial" // ClusterPhaseCreating is the second phase after resources (pods,services) are created // but before there are active pods ClusterPhaseCreating ClusterPhase = "Creating" // ClusterPhaseInitializing is after the pods are active but before they have fully joined // this fase is pod startup, cassandra startup, cassandra joining ClusterPhaseInitializing ClusterPhase = "Initializing" // ClusterPhaseRunning pods are all joined and normal ClusterPhaseRunning ClusterPhase = "Running" // ClusterPhaseScaling occurs when a pod/cassandra node is leaving or joining the ring, inclusive of pod creation // and pod startup ClusterPhaseScaling ClusterPhase = "Scaling" // ClusterPhaseFailed when the initial pod that is the seed creating the cluster fails to create ClusterPhaseFailed ClusterPhase = "Failed" // ClusterPhaseTerminated when the cluster is being deleted, when the child resources are is being deleted through // all child resources being gone ClusterPhaseTerminating ClusterPhase = "Terminating" // ClusterPhaseUnknown if the cluster is out of band with the statemachine, this is the state ClusterPhaseUnknown ClusterPhase = "Unknown" )
ClusterPhases enumerated
type ClusterSpec ¶
type ClusterSpec struct { Size int `json:"size"` Repair *RepairPolicy `json:"repair,omitempty"` Node *NodePolicy `json:"node"` KeyspaceName string `json:"keyspaceName,omitempty"` SecretName string `json:"secretName,omitempty"` ConfigMapName string `json:"configMapName,omitempty"` JvmAgentConfigName string `json:"jvmAgentConfigName,omitemtpy"` JvmAgent string `json:"jvmAgent,omitempty"` Datacenter string `json:"datacenter"` ExternalSeeds []string `json:"externalSeeds,omitempty"` EnablePublicPodServices bool `json:"enablePublicPodServices"` ExposePublicLB bool `json:"exposePublicLB"` EnablePodDisruptionBudget bool `json:"enablePodDisruptionBudget"` Affinity *corev1.Affinity `json:"affinity,omitempty"` }
ClusterSpec Specification for cassandra cluster for API
func (*ClusterSpec) DeepCopy ¶
func (in *ClusterSpec) DeepCopy() *ClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
func (*ClusterSpec) DeepCopyInto ¶
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterState ¶
type ClusterState string
ClusterState represents a state in the cassandra cluster state-machine
const ( // ClusterStateInitial Initial state of the cluster, no stateful set created ClusterStateInitial ClusterState = "Initial" // ClusterStateBootstrap Clusters first node is creating and starting up ClusterStateBootstrap ClusterState = "Bootstrap" // ClusterStateScale Cluster is scaling up/down by 1 ClusterStateScale ClusterState = "Scale" // ClusterStateJoin Cluster is joining the ring ClusterStateJoin ClusterState = "Join" // ClusterStateRun Cluster is up and running ClusterStateRun ClusterState = "Run" // ClusterStateScaleFail Cluster is in a failed state ClusterStateScaleFail ClusterState = "ScaleFail" // ClusterStateRepair Cluster is executing a repair ClusterStateRepair ClusterState = "Repair" // ClusterStateDecomission Cluster is in process of decomissioning ClusterStateDecomission ClusterState = "Decomission" // ClusterStateProbeFail error state for cluster probe failing ClusterStateProbeFail ClusterState = "ProbeFail" // ClusterStateDelete Cluster has been deleted ClusterStateDelete ClusterState = "Delete" )
func (ClusterState) Describe ¶
func (cs ClusterState) Describe() string
Describe returns a description of the cluster state
type ClusterStatus ¶
type ClusterStatus struct { Phase ClusterPhase `json:"phase"` State ClusterState `json:"state"` Members NodesStatus `json:"members"` CurrentVersion string `json:"currentVersion"` }
ClusterStatus specifies the status of the cassandra cluster
func (*ClusterStatus) DeepCopy ¶
func (in *ClusterStatus) DeepCopy() *ClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.
func (*ClusterStatus) DeepCopyInto ¶
func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterStatus) NodesInTransit ¶
func (s *ClusterStatus) NodesInTransit() bool
NodesInTransit returns true if ANY cluster nodes are joining, creating or leaving the cluster
func (*ClusterStatus) Provisioning ¶
func (s *ClusterStatus) Provisioning() bool
Provisioning returns true if the cluster has a node that is in process of provisioning (Joining, Creating)
type NodePolicy ¶
type NodePolicy struct { Resources *corev1.ResourceRequirements `json:"resources,omitempty"` PersistentVolume *PersistentVolumeSpec `json:"persistentVolume,omitempty"` Image string `json:"image"` FileMountPath string `json:"fileMountPath"` }
NodePolicy specifies the details of constructing a cassandra node
func (*NodePolicy) DeepCopy ¶
func (in *NodePolicy) DeepCopy() *NodePolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePolicy.
func (*NodePolicy) DeepCopyInto ¶
func (in *NodePolicy) DeepCopyInto(out *NodePolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodesStatus ¶
type NodesStatus struct { Creating []string `json:"creating,omitempty"` Ready []string `json:"ready,omitempty"` Joining []string `json:"joining,omitempty"` Leaving []string `json:"leaving,omitempty"` Unready []string `json:"unready,omitempty"` Deleted []string `json:"deleted,omitempty"` }
NodesStatus bins nodes by state
func (*NodesStatus) DeepCopy ¶
func (in *NodesStatus) DeepCopy() *NodesStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodesStatus.
func (*NodesStatus) DeepCopyInto ¶
func (in *NodesStatus) DeepCopyInto(out *NodesStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PersistentVolumeSpec ¶
type PersistentVolumeSpec struct { StorageClassName string `json:"storageClass,omitempty"` Capacity corev1.ResourceList `json:"resources,omitempty"` }
PersistentVolumeSpec exposes configurables for the PV for the stateful set
func (*PersistentVolumeSpec) DeepCopy ¶
func (in *PersistentVolumeSpec) DeepCopy() *PersistentVolumeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeSpec.
func (*PersistentVolumeSpec) DeepCopyInto ¶
func (in *PersistentVolumeSpec) DeepCopyInto(out *PersistentVolumeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RepairPolicy ¶
type RepairPolicy struct { Schedule string `json:"schedule"` Image string `json:"image,omitempty"` }
RepairPolicy sets the policies for the automated cassandra repair job
func (*RepairPolicy) DeepCopy ¶
func (in *RepairPolicy) DeepCopy() *RepairPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepairPolicy.
func (*RepairPolicy) DeepCopyInto ¶
func (in *RepairPolicy) DeepCopyInto(out *RepairPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.