Documentation ¶
Index ¶
- func AerospikeAdminCredentials(desiredState, currentState *asdbv1.AerospikeClusterSpec, ...) (user, pass string, err error)
- func AerospikePrivilegeToPrivilegeString(aerospikePrivileges []as.Privilege) ([]string, error)
- func GetAdminPolicy(clusterSpec *asdbv1.AerospikeClusterSpec) as.AdminPolicy
- func GetEndpointsFromInfo(aeroCtx, addressName string, endpointsMap map[string]string) []string
- func SliceSubtract(slice1, slice2 []string) []string
- type AerospikeClusterReconciler
- type AerospikeUserPasswordProvider
- type PortInfo
- type RackState
- type RestartType
- type SingleClusterReconciler
- func (r *SingleClusterReconciler) AddAPIVersionLabel(ctx context.Context) error
- func (r *SingleClusterReconciler) IsReclusterNeeded() bool
- func (r *SingleClusterReconciler) IsReclusterNeededForRack(specRack, statusRack *asdbv1.Rack) bool
- func (r *SingleClusterReconciler) IsStatusEmpty() bool
- func (r *SingleClusterReconciler) Reconcile() (result ctrl.Result, recErr error)
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 ¶
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 ¶
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 ¶
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 ¶
func (r *AerospikeClusterReconciler) Reconcile( _ context.Context, request reconcile.Request, ) (ctrl.Result, error)
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 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