v1alpha1

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=cassandra.rook.io

Index

Constants

View Source
const (
	CustomResourceGroup = "cassandra.rook.io"
	Version             = "v1alpha1"
)

Variables

View Source
var (
	// SchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: cassandrarookio.CustomResourceGroupName, Version: Version}

SchemeGroupVersion is group version used to register these objects

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Cluster

type Cluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              ClusterSpec `json:"spec"`
	// +optional
	// +nullable
	Status ClusterStatus `json:"status,omitempty"`
}

func (*Cluster) DeepCopy

func (in *Cluster) DeepCopy() *Cluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Cluster) DeepCopyObject

func (in *Cluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterList

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

func (*ClusterList) DeepCopy

func (in *ClusterList) DeepCopy() *ClusterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.

func (*ClusterList) DeepCopyInto

func (in *ClusterList) DeepCopyInto(out *ClusterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterList) DeepCopyObject

func (in *ClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterMode

type ClusterMode string
const (
	ClusterModeCassandra ClusterMode = "cassandra"
	ClusterModeScylla    ClusterMode = "scylla"
)

type ClusterSpec

type ClusterSpec struct {
	// The annotations-related configuration to add/set on each Pod related object.
	// +optional
	// +nullable
	Annotations rook.Annotations `json:"annotations,omitempty"`
	// Version of Cassandra to use.
	Version string `json:"version"`
	// Repository to pull the image from.
	// +optional
	// +nullable
	Repository *string `json:"repository,omitempty"`
	// Mode selects an operating mode.
	// +optional
	Mode ClusterMode `json:"mode,omitempty"`
	// Datacenter that will make up this cluster.
	// +optional
	// +nullable
	Datacenter DatacenterSpec `json:"datacenter,omitempty"`
	// User-provided image for the sidecar that replaces default.
	// +optional
	// +nullable
	SidecarImage *ImageSpec `json:"sidecarImage,omitempty"`
}

ClusterSpec is the desired state for a Cassandra Cluster.

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 ClusterStatus

type ClusterStatus struct {
	Racks map[string]*RackStatus `json:"racks,omitempty"`
}

ClusterStatus is the status of a 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.

type ConditionStatus

type ConditionStatus string
const (
	APIVersion = CustomResourceGroup + "/" + Version

	// These are valid condition statuses. "ConditionTrue" means a resource is in the condition;
	// "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes
	// can't decide if a resource is in the condition or not.
	ConditionTrue    ConditionStatus = "True"
	ConditionFalse   ConditionStatus = "False"
	ConditionUnknown ConditionStatus = "Unknown"
)

type DatacenterSpec

type DatacenterSpec struct {
	// Name of the Cassandra Datacenter. Used in the cassandra-rackdc.properties file.
	Name string `json:"name"`
	// Racks of the specific Datacenter.
	Racks []RackSpec `json:"racks"`
}

DatacenterSpec is the desired state for a Cassandra Datacenter.

func (*DatacenterSpec) DeepCopy

func (in *DatacenterSpec) DeepCopy() *DatacenterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatacenterSpec.

func (*DatacenterSpec) DeepCopyInto

func (in *DatacenterSpec) DeepCopyInto(out *DatacenterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImageSpec

type ImageSpec struct {
	// Version of the image.
	Version string `json:"version"`
	// Repository to pull the image from.
	// +optional
	Repository string `json:"repository,omitempty"`
}

ImageSpec is the desired state for a container image.

func (*ImageSpec) DeepCopy

func (in *ImageSpec) DeepCopy() *ImageSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec.

func (*ImageSpec) DeepCopyInto

func (in *ImageSpec) DeepCopyInto(out *ImageSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Node added in v1.7.1

type Node struct {
	// +optional
	Name string `json:"name,omitempty"`
}

Node is a storage nodes +nullable

func (*Node) DeepCopy added in v1.7.1

func (in *Node) DeepCopy() *Node

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Node.

func (*Node) DeepCopyInto added in v1.7.1

func (in *Node) DeepCopyInto(out *Node)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Placement added in v1.7.1

type Placement struct {
	// NodeAffinity is a group of node affinity scheduling rules
	// +optional
	NodeAffinity *v1.NodeAffinity `json:"nodeAffinity,omitempty"`
	// PodAffinity is a group of inter pod affinity scheduling rules
	// +optional
	PodAffinity *v1.PodAffinity `json:"podAffinity,omitempty"`
	// PodAntiAffinity is a group of inter pod anti affinity scheduling rules
	// +optional
	PodAntiAffinity *v1.PodAntiAffinity `json:"podAntiAffinity,omitempty"`
	// The pod this Toleration is attached to tolerates any taint that matches
	// the triple <key,value,effect> using the matching operator <operator>
	// +optional
	Tolerations []v1.Toleration `json:"tolerations,omitempty"`
	// TopologySpreadConstraint specifies how to spread matching pods among the given topology
	// +optional
	TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
}

Placement is the placement for an object

func (*Placement) DeepCopy added in v1.7.1

func (in *Placement) DeepCopy() *Placement

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement.

func (*Placement) DeepCopyInto added in v1.7.1

func (in *Placement) DeepCopyInto(out *Placement)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RackCondition

type RackCondition struct {
	Type   RackConditionType `json:"type"`
	Status ConditionStatus   `json:"status"`
}

RackCondition is an observation about the state of a rack.

func (*RackCondition) DeepCopy

func (in *RackCondition) DeepCopy() *RackCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RackCondition.

func (*RackCondition) DeepCopyInto

func (in *RackCondition) DeepCopyInto(out *RackCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RackConditionType

type RackConditionType string
const (
	RackConditionTypeMemberLeaving RackConditionType = "MemberLeaving"
)

type RackSpec

type RackSpec struct {
	// Name of the Cassandra Rack. Used in the cassandra-rackdc.properties file.
	Name string `json:"name"`
	// Members is the number of Cassandra instances in this rack.
	Members int32 `json:"members"`
	// User-provided ConfigMap applied to the specific statefulset.
	// +optional
	// +nullable
	ConfigMapName *string `json:"configMapName,omitempty"`
	// User-provided ConfigMap for jmx prometheus exporter
	// +optional
	// +nullable
	JMXExporterConfigMapName *string `json:"jmxExporterConfigMapName,omitempty"`
	// Storage describes the underlying storage that Cassandra will consume.
	Storage StorageScopeSpec `json:"storage,omitempty"`
	// The annotations-related configuration to add/set on each Pod related object.
	// +optional
	// +nullable
	Annotations map[string]string `json:"annotations,omitempty"`
	// Placement describes restrictions for the nodes Cassandra is scheduled on.
	// +optional
	// +nullable
	Placement *Placement `json:"placement,omitempty"`
	// Resources the Cassandra Pods will use.
	// +optional
	// +nullable
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}

RackSpec is the desired state for a Cassandra Rack.

func (*RackSpec) DeepCopy

func (in *RackSpec) DeepCopy() *RackSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RackSpec.

func (*RackSpec) DeepCopyInto

func (in *RackSpec) DeepCopyInto(out *RackSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RackStatus

type RackStatus struct {
	// Members is the current number of members requested in the specific Rack
	Members int32 `json:"members"`
	// ReadyMembers is the number of ready members in the specific Rack
	ReadyMembers int32 `json:"readyMembers"`
	// Conditions are the latest available observations of a rack's state.
	Conditions []RackCondition `json:"conditions,omitempty"`
}

RackStatus is the status of a Cassandra Rack

func (*RackStatus) DeepCopy

func (in *RackStatus) DeepCopy() *RackStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RackStatus.

func (*RackStatus) DeepCopyInto

func (in *RackStatus) DeepCopyInto(out *RackStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StorageScopeSpec added in v1.7.1

type StorageScopeSpec struct {
	// +nullable
	// +optional
	Nodes []Node `json:"nodes,omitempty"`

	// PersistentVolumeClaims to use as storage
	// +optional
	VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`
}

func (*StorageScopeSpec) DeepCopy added in v1.7.1

func (in *StorageScopeSpec) DeepCopy() *StorageScopeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageScopeSpec.

func (*StorageScopeSpec) DeepCopyInto added in v1.7.1

func (in *StorageScopeSpec) DeepCopyInto(out *StorageScopeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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