cassandradatacenter

package
v1.0.2-0...-b8906d8 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MEBIBYTE = 1 << 20
	GIBIBYTE = 1 << 30
)
View Source
const (
	ManagedByKey    = "app.kubernetes.io/managed-by"
	ManagedByValue  = "com.instaclustr.cassandra-operator"
	RackKey         = "cassandra-operator.instaclustr.com/rack"
	DataCenterKey   = "cassandra-operator.instaclustr.com/datacenter"
	DataCenterUID   = "cassandra-operator.instaclustr.com/datacenterUID"
	CassandraPodUID = "cassandra-operator.instaclustr.com/cassandraPodUID"
	ClusterKey      = "cassandra-operator.instaclustr.com/cluster"
)
View Source
const (
	DataVolumeMountPath           = "/var/lib/cassandra"
	OperatorConfigVolumeMountPath = "/tmp/operator-config"
	RackConfigVolumeMountPath     = "/tmp/cassandra-rack-config"
	UserConfigVolumeMountPath     = "/tmp/user-config"
	SidecarSecretVolumeMountPath  = "/tmp/sidecar-secret"
)

Variables

View Source
var (
	ErrorClusterNotReady = errors.New("skipping stateful set reconcile, some pods or cassandra nodes are not ready")
)

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new CassandraDataCenter Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

func AllDeletedPods

func AllDeletedPods(c client.Client, cdc *v1alpha1.CassandraDataCenter) ([]corev1.Pod, error)

func AllPodsInCDC

func AllPodsInCDC(c client.Client, cdc *v1alpha1.CassandraDataCenter) ([]corev1.Pod, error)

func AllPodsInRack

func AllPodsInRack(c client.Client, namespace string, rackLabels map[string]string) ([]corev1.Pod, error)

func CustomStatefulSetAnnotations

func CustomStatefulSetAnnotations(cdc *cop.CassandraDataCenter) map[string]string

func CustomStatefulSetLabels

func CustomStatefulSetLabels(cdc *cop.CassandraDataCenter) map[string]string

func DataCenterAnnotations

func DataCenterAnnotations(cdc *cop.CassandraDataCenter) map[string]string

func DataCenterLabels

func DataCenterLabels(cdc *cop.CassandraDataCenter) map[string]string

func DataCenterResourceMetadata

func DataCenterResourceMetadata(cdc *cop.CassandraDataCenter, suffixes ...string) metav1.ObjectMeta

func GetAllSidecarClients

func GetAllSidecarClients(client client.Client, instance *v1alpha1.CassandraDataCenter) (map[*corev1.Pod]*sidecar.Client, error)

func NodesServiceAnnotations

func NodesServiceAnnotations(cdc *cop.CassandraDataCenter) map[string]string

func NodesServiceLabels

func NodesServiceLabels(cdc *cop.CassandraDataCenter) map[string]string

func PodTemplateSpecAnnotations

func PodTemplateSpecAnnotations(cdc *cop.CassandraDataCenter) map[string]string

func PodTemplateSpecLabels

func PodTemplateSpecLabels(cdc *cop.CassandraDataCenter) map[string]string

func PrometheusAnnotations

func PrometheusAnnotations(cdc *cop.CassandraDataCenter) map[string]string

func PrometheusLabels

func PrometheusLabels(cdc *cop.CassandraDataCenter) map[string]string

func RackLabels

func RackLabels(cdc *cop.CassandraDataCenter, rack *cluster.Rack) map[string]string

func RackMetadata

func RackMetadata(cdc *cop.CassandraDataCenter, rack *cluster.Rack, suffixes ...string) metav1.ObjectMeta

func SeedNodesAnnotations

func SeedNodesAnnotations(cdc *cop.CassandraDataCenter) map[string]string

func SeedNodesLabels

func SeedNodesLabels(cdc *cop.CassandraDataCenter) map[string]string

func StatefulSetMetadata

func StatefulSetMetadata(cdc *cop.CassandraDataCenter, objectMetaData metav1.ObjectMeta) metav1.ObjectMeta

Types

type ReconcileCassandraDataCenter

type ReconcileCassandraDataCenter struct {
	// contains filtered or unexported fields
}

ReconcileCassandraDataCenter reconciles a CassandraDataCenter object

func (*ReconcileCassandraDataCenter) Reconcile

Reconcile reads that state of the cluster for a CassandraDataCenter object and makes changes based on the state read and what is in the CassandraDataCenter.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

Jump to

Keyboard shortcuts

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