cluster

package
v0.0.0-...-12c90d4 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AerospikeAdminCredentials

func AerospikeAdminCredentials(
	desiredState, currentState *asdbv1.AerospikeClusterSpec,
	passwordProvider AerospikeUserPasswordProvider,
) (user, pass string, err error)

AerospikeAdminCredentials to use for aerospike clients.

Returns a tuple of admin username and password to use. If the cluster is not security enabled both username and password will be zero strings.

func AerospikePrivilegeToPrivilegeString

func AerospikePrivilegeToPrivilegeString(aerospikePrivileges []as.Privilege) (
	[]string, error,
)

AerospikePrivilegeToPrivilegeString converts aerospikePrivilege to controller spec privilege string.

func GetAdminPolicy

func GetAdminPolicy(clusterSpec *asdbv1.AerospikeClusterSpec) as.AdminPolicy

GetAdminPolicy returns the AdminPolicy to use for performing access control operations.

func GetEndpointsFromInfo

func GetEndpointsFromInfo(
	aeroCtx, addressName string, endpointsMap map[string]string,
) []string

GetEndpointsFromInfo returns the aerospike endpoints as a slice of host:port based on context and addressName passed from the info endpointsMap. It returns an empty slice if the access address with addressName is not found in endpointsMap. E.g. addressName are access, alternate-access

func SliceSubtract

func SliceSubtract(slice1, slice2 []string) []string

SliceSubtract removes elements of slice2 from slice1 and returns the result.

Types

type AerospikeClusterReconciler

type AerospikeClusterReconciler struct {
	client.Client
	Recorder   record.EventRecorder
	KubeClient *kubernetes.Clientset
	KubeConfig *rest.Config
	Scheme     *k8sRuntime.Scheme
	Log        logr.Logger
}

AerospikeClusterReconciler reconciles AerospikeClusters

func (*AerospikeClusterReconciler) Reconcile

Reconcile AerospikeCluster object

func (*AerospikeClusterReconciler) SetupWithManager

func (r *AerospikeClusterReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager

type AerospikeUserPasswordProvider

type AerospikeUserPasswordProvider interface {
	// Get returns the password for username.
	Get(username string, userSpec *asdbv1.AerospikeUserSpec) (
		string, error,
	)

	// GetDefaultPassword returns the default password for cluster using AerospikeClusterSpec.
	GetDefaultPassword(spec *asdbv1.AerospikeClusterSpec) string
}

AerospikeUserPasswordProvider provides password for a give user..

type PortInfo

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

type RackState

type RackState struct {
	Rack *asdbv1.Rack
	Size int
}

RackState contains the rack configuration and rack size.

type RestartType

type RestartType int

RestartType is the type of pod restart to use.

type SingleClusterReconciler

type SingleClusterReconciler struct {
	client.Client
	Recorder record.EventRecorder

	KubeClient *kubernetes.Clientset
	KubeConfig *rest.Config
	Scheme     *k8sRuntime.Scheme
	Log        logr.Logger
	// contains filtered or unexported fields
}

SingleClusterReconciler reconciles a single AerospikeCluster

func (*SingleClusterReconciler) AddAPIVersionLabel

func (r *SingleClusterReconciler) AddAPIVersionLabel(ctx context.Context) error

func (*SingleClusterReconciler) IsReclusterNeeded

func (r *SingleClusterReconciler) IsReclusterNeeded() bool

func (*SingleClusterReconciler) IsReclusterNeededForRack

func (r *SingleClusterReconciler) IsReclusterNeededForRack(specRack, statusRack *asdbv1.Rack) bool

func (*SingleClusterReconciler) IsStatusEmpty

func (r *SingleClusterReconciler) IsStatusEmpty() bool

func (*SingleClusterReconciler) Reconcile

func (r *SingleClusterReconciler) Reconcile() (result ctrl.Result, recErr error)

Jump to

Keyboard shortcuts

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