reaper

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultImageRepository = "thelastpickle"
	DefaultImageName       = "cassandra-reaper"
	DefaultVersion         = "3.2.1"

	InitContainerMemRequest = "128Mi"
	InitContainerMemLimit   = "512Mi"
	InitContainerCpuRequest = "100m"
	MainContainerMemRequest = "256Mi"
	MainContainerMemLimit   = "3Gi"
	MainContainerCpuRequest = "100m"
)
View Source
const (
	DeploymentModeSingle = "SINGLE"
	DeploymentModePerDc  = "PER_DC"

	DatacenterAvailabilityEach = "EACH"
	DatacenterAvailabilityAll  = "ALL"
)
View Source
const (
	MetricsPort         = 8081
	VectorContainerName = "reaper-vector-agent"
)

Variables

View Source
var DisableAuthVar = &corev1.EnvVar{
	Name:  envVarEnableAuth,
	Value: "false",
}
View Source
var EnableAuthVar = &corev1.EnvVar{
	Name:  envVarEnableAuth,
	Value: "true",
}
View Source
var EnableCassAuthVar = &corev1.EnvVar{
	Name:  envVarEnableCassAuth,
	Value: "true",
}

Functions

func AddReaperSettingsToDcConfig

func AddReaperSettingsToDcConfig(reaperTemplate *reaperapi.ReaperClusterTemplate, dcConfig *cassandra.DatacenterConfig, authEnabled bool)

func CreateVectorConfigMap added in v1.5.0

func CreateVectorConfigMap(namespace, vectorToml string, dc cassdcapi.CassandraDatacenter) *corev1.ConfigMap

func DefaultResourceName

func DefaultResourceName(dc *cassdcapi.CassandraDatacenter) string

DefaultResourceName generates a name for a new Reaper resource that is derived from the Cassandra cluster and DC names.

func DefaultUiSecretName

func DefaultUiSecretName(clusterName string) string

func DefaultUserSecretName

func DefaultUserSecretName(clusterName string) string

DefaultUserSecretName generates a name for the Reaper CQL user, that is derived from the Cassandra cluster name.

func GetAuthEnvironmentVars

func GetAuthEnvironmentVars(secret *corev1.Secret, authType string) (*corev1.EnvVar, *corev1.EnvVar, error)

func GetServiceName

func GetServiceName(reaperName string) string

func NewDeployment

func NewDeployment(reaper *api.Reaper, dc *cassdcapi.CassandraDatacenter, keystorePassword *string, truststorePassword *string, logger logr.Logger, authVars ...*corev1.EnvVar) *appsv1.Deployment

func NewService

func NewService(key types.NamespacedName, reaper *api.Reaper) *corev1.Service

func VectorAgentConfigMapName added in v1.5.0

func VectorAgentConfigMapName(clusterName, dcName string) string

VectorAgentConfigMapName generates a ConfigMap name based on the K8s sanitized cluster name and datacenter name.

Types

type Manager

type Manager interface {
	Connect(ctx context.Context, reaper *api.Reaper, username, password string) error
	AddClusterToReaper(ctx context.Context, cassdc *cassdcapi.CassandraDatacenter) error
	VerifyClusterIsConfigured(ctx context.Context, cassdc *cassdcapi.CassandraDatacenter) (bool, error)
}

func NewManager

func NewManager() Manager

Jump to

Keyboard shortcuts

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