Skip to main content

AerospikeCluster API Reference

This page documents the AerospikeCluster Custom Resource Definition (CRD) types.

API Group: acko.io API Version: v1alpha1 Kind: AerospikeCluster Short Names: asc


AerospikeCluster

AerospikeCluster is the Schema for the aerospikeclusters API. It manages the lifecycle of an Aerospike Community Edition cluster.

FieldTypeDescription
apiVersionstringacko.io/v1alpha1
kindstringAerospikeCluster
metadataObjectMetaStandard object metadata
specAerospikeClusterSpecDesired state of the cluster
statusAerospikeClusterStatusObserved state of the cluster

AerospikeClusterSpec

Defines the desired state of an Aerospike CE cluster.

FieldTypeRequiredDefaultDescription
sizeint32YesNumber of Aerospike pods. CE max: 8.
imagestringYesAerospike CE container image (e.g., aerospike:ce-8.1.1.1).
aerospikeConfigAerospikeConfigSpecNoRaw Aerospike configuration map, converted to aerospike.conf.
storageAerospikeStorageSpecNoVolume definitions for Aerospike pods.
rackConfigRackConfigNoRack-aware deployment topology.
aerospikeNetworkPolicyAerospikeNetworkPolicyNoClient access network configuration.
podSpecAerospikePodSpecNoPod-level configuration.
aerospikeAccessControlAerospikeAccessControlSpecNoACL roles and users.
monitoringAerospikeMonitoringSpecNoPrometheus monitoring configuration.
networkPolicyConfigNetworkPolicyConfigNoAutomatic NetworkPolicy creation.
bandwidthConfigBandwidthConfigNoCNI bandwidth annotations.
enableDynamicConfigUpdate*boolNoEnable runtime config changes via set-config.
rollingUpdateBatchSize*int32No1Number of pods to restart in parallel during rolling update.
disablePDB*boolNofalseDisable PodDisruptionBudget creation.
maxUnavailableIntOrStringNo1Max pods unavailable during disruption.
paused*boolNofalseStop reconciliation when true.
seedsFinderServicesSeedsFinderServicesNoLoadBalancer service for seed discovery.
k8sNodeBlockList[]stringNoNode names to exclude from scheduling.
operations[]OperationSpecNoOn-demand operations (WarmRestart, PodRestart). Max 1 at a time.
validationPolicyValidationPolicySpecNoControls webhook validation behavior.
headlessServiceAerospikeServiceSpecNoCustom metadata for the headless service.
podServiceAerospikeServiceSpecNoCustom metadata for per-pod services. Creates individual Service per pod when set.
enableRackIDOverride*boolNofalseEnable dynamic rack ID assignment via pod annotations.
templateRefTemplateRefNoReference to an AerospikeClusterTemplate. When set, the template spec is resolved and stored as a snapshot at creation time.
overridesAerospikeClusterTemplateSpecNoFields that override the referenced template. Merge priority: overrides > template > operator defaults.

TemplateRef

Reference to an AerospikeClusterTemplate in the same namespace.

FieldTypeRequiredDescription
namestringYesName of the AerospikeClusterTemplate resource

TemplateSnapshotStatus

Recorded in status.templateSnapshot after a template is resolved.

FieldTypeDescription
namestringName of the referenced template
resourceVersionstringResourceVersion of the template at snapshot time
snapshotTimestampTimeWhen the snapshot was taken
syncedboolWhether the cluster uses the latest template version. Set to false when the template changes after the snapshot.
specAerospikeClusterTemplateSpecResolved template spec at snapshot time.

AerospikeConfigSpec

Holds the raw Aerospike configuration as an unstructured JSON/YAML object. The operator converts this to aerospike.conf format.

This is a map[string]interface{} wrapper. Access via .Value in Go code. In YAML, write the Aerospike configuration directly:

aerospikeConfig:
service:
cluster-name: my-cluster
proto-fd-max: 15000
network:
service:
port: 3000
heartbeat:
mode: mesh
port: 3002
fabric:
port: 3001
namespaces:
- name: testns
replication-factor: 2
storage-engine:
type: device
file: /opt/aerospike/data/testns.dat
filesize: 4294967296
logging:
- name: /var/log/aerospike/aerospike.log
context: any info

AerospikeClusterStatus

Observed state of the Aerospike CE cluster.

FieldTypeDescription
phasestringCluster phase: InProgress, Completed, Error, ScalingUp, ScalingDown, RollingRestart, ACLSync, Paused, Deleting.
sizeint32Current cluster size.
conditions[]ConditionLatest observations of cluster state.
podsmap[string]AerospikePodStatusPer-pod status information, keyed by pod name.
observedGenerationint64Most recent generation observed by the controller.
selectorstringLabel selector string for HPA compatibility.
aerospikeConfigAerospikeConfigSpecLast applied Aerospike configuration.
operationStatusOperationStatusCurrent on-demand operation status.
phaseReasonstringHuman-readable explanation of the current phase (e.g., "Rolling restart in progress for rack 1").
appliedSpecAerospikeClusterSpecCopy of the last successfully reconciled spec. Used to detect configuration drift.
aerospikeClusterSizeint32Aerospike cluster-size as reported by asinfo. May differ from K8s pod count during split-brain or rolling restarts.
operatorVersionstringVersion of the operator that last reconciled this cluster.
pendingRestartPods[]stringPods queued for restart in the current rolling restart. Cleared when complete.
lastReconcileTimeTimeTimestamp of the last successful reconciliation.
templateSnapshotTemplateSnapshotStatusResolved template spec at last sync time.

Condition Types

The operator maintains the following condition types in status.conditions:

TypeDescription
AvailableAt least one pod is ready to serve requests.
ReadyAll desired pods are running and ready.
ConfigAppliedAll pods have the desired Aerospike configuration.
ACLSyncedACL roles and users are synchronized with the cluster.
MigrationCompleteNo data migrations are pending.
ReconciliationPausedReconciliation is paused by the user (spec.paused: true).

AerospikePodStatus

Per-pod status information.

FieldTypeDescription
podIPstringPod IP address.
hostIPstringHost node IP address.
imagestringContainer image running on the pod.
podPortint32Aerospike service port on the pod.
servicePortint32Aerospike service port exposed via node/LB.
rackintRack ID assigned to this pod.
initializedVolumes[]stringVolumes that have been initialized.
isRunningAndReadyboolWhether the pod is running and ready.
configHashstringSHA256 hash of the applied config.
podSpecHashstringHash of the pod template spec.
dynamicConfigStatusstringDynamic config update result: Applied, Failed, Pending, or empty.
dirtyVolumes[]stringVolumes needing initialization or cleanup.
nodeIDstringAerospike-assigned node identifier (e.g., BB9020012AC4202). Empty if unreachable.
clusterNamestringAerospike cluster name as reported by the node.
accessEndpoints[]stringNetwork endpoints (host:port) for direct client access via asinfo "service".
readinessGateSatisfiedboolWhether acko.io/aerospike-ready gate is True. Only meaningful when readinessGateEnabled=true.
lastRestartReasonRestartReasonReason the pod was last restarted by the operator.
lastRestartTimeTimeWhen the pod was last restarted by the operator.
unstableSinceTimeFirst time this pod became NotReady. Reset to nil when Ready.

RestartReason

Describes why a pod was restarted by the operator.

ValueDescription
ConfigChangedCold restart triggered by an Aerospike config change.
ImageChangedPod image was updated.
PodSpecChangedPod spec (resources, env, etc.) changed.
ManualRestartOn-demand pod restart (OperationPodRestart).
WarmRestartOn-demand or rolling warm restart (SIGUSR1).

AerospikeStorageSpec

Defines storage volumes for Aerospike pods.

FieldTypeRequiredDefaultDescription
volumes[]VolumeSpecNoList of volumes to attach.
cleanupThreadsint32No1Max threads for volume cleanup/init.
filesystemVolumePolicyAerospikeVolumePolicyNoDefault policy for filesystem-mode persistent volumes. Per-volume settings override this.
blockVolumePolicyAerospikeVolumePolicyNoDefault policy for block-mode persistent volumes. Per-volume settings override this.
localStorageClasses[]stringNoStorageClass names using local storage (e.g., local-path). Volumes using these classes require special handling on pod restart.
deleteLocalStorageOnRestart*boolNoDelete local PVCs before pod restart, forcing re-provisioning on new node.

AerospikeVolumePolicy

Default policies for a category of persistent volumes (filesystem or block).

FieldTypeDefaultDescription
initMethodstringnoneDefault init method for this volume category.
wipeMethodstringnoneDefault wipe method for this volume category.
cascadeDelete*boolnilDelete PVCs when the CR is deleted.

VolumeSpec

Defines a single volume attachment.

FieldTypeRequiredDefaultDescription
namestringYesVolume name.
sourceVolumeSourceYesVolume source (PVC, emptyDir, secret, configMap, hostPath).
aerospikeAerospikeVolumeAttachmentNoMount path in Aerospike container.
sidecars[]VolumeAttachmentNoVolume mounts for sidecar containers.
initContainers[]VolumeAttachmentNoVolume mounts for init containers.
initMethodstringNononeInit method: none, deleteFiles, dd, blkdiscard, headerCleanup.
wipeMethodstringNononeWipe method for dirty volumes: none, deleteFiles, dd, blkdiscard, headerCleanup, blkdiscardWithHeaderCleanup.
cascadeDelete*boolNonilDelete PVC when CR is deleted. When nil, falls back to global volume policy.

VolumeSource

Describes the volume data source. Exactly one field should be set.

FieldTypeDescription
persistentVolumePersistentVolumeSpecCreate a PVC.
emptyDirEmptyDirVolumeSourceUse emptyDir.
secretSecretVolumeSourceUse a Kubernetes Secret.
configMapConfigMapVolumeSourceUse a Kubernetes ConfigMap.
hostPathHostPathVolumeSourceUse a path on the host node.

PersistentVolumeSpec

Defines a persistent volume claim template.

FieldTypeRequiredDefaultDescription
storageClassstringNoStorageClass name.
volumeModestringNoFilesystemFilesystem or Block.
sizestringYesStorage size (e.g., 10Gi).
accessModes[]stringNoAccess modes (e.g., ReadWriteOnce).
selectorLabelSelectorNoLabel selector for PV binding.
metadataAerospikeObjectMetaNoCustom labels and annotations for the PVC.

AerospikeVolumeAttachment

Defines how a volume is mounted in the Aerospike container.

FieldTypeRequiredDescription
pathstringYesMount path in the container.
readOnlyboolNoMount the volume as read-only.
subPathstringNoMount only a sub-path of the volume.
subPathExprstringNoExpanded path using environment variables. Mutually exclusive with subPath.
mountPropagationMountPropagationModeNoHow mounts are propagated: None, HostToContainer, Bidirectional.

VolumeAttachment

Defines a volume mount for sidecar or init containers.

FieldTypeRequiredDescription
containerNamestringYesTarget container name.
pathstringYesMount path in the container.
readOnlyboolNoMount the volume as read-only.
subPathstringNoMount only a sub-path of the volume.
subPathExprstringNoExpanded path using environment variables. Mutually exclusive with subPath.
mountPropagationMountPropagationModeNoHow mounts are propagated: None, HostToContainer, Bidirectional.

AerospikeNetworkPolicy

Defines network access configuration.

FieldTypeDefaultDescription
accessTypestringpodClient access type: pod, hostInternal, hostExternal, configuredIP.
alternateAccessTypestringpodAlternate access type.
fabricTypestringpodFabric (inter-node) network type.
customAccessNetworkNames[]stringNetwork names for configuredIP access.
customAlternateAccessNetworkNames[]stringNetwork names for configuredIP alternate access.
customFabricNetworkNames[]stringNetwork names for configuredIP fabric.

SeedsFinderServices

Configures external seed discovery via LoadBalancer.

FieldTypeDescription
loadBalancerLoadBalancerSpecLoadBalancer service configuration.

LoadBalancerSpec

Defines a LoadBalancer service.

FieldTypeDefaultDescription
annotationsmap[string]stringService annotations.
labelsmap[string]stringService labels.
externalTrafficPolicystringCluster or Local.
portint323000External port.
targetPortint323000Container target port.
loadBalancerSourceRanges[]stringAllowed source CIDRs.

AerospikePodSpec

Pod-level customization for Aerospike pods.

FieldTypeDescription
aerospikeContainerAerospikeContainerSpecAerospike container customization.
sidecars[]ContainerSidecar containers.
initContainers[]ContainerAdditional init containers.
imagePullSecrets[]LocalObjectReferenceImage pull secrets.
nodeSelectormap[string]stringNode labels for scheduling.
tolerations[]TolerationPod tolerations.
affinityAffinityAffinity/anti-affinity rules.
securityContextPodSecurityContextPod-level security attributes.
serviceAccountNamestringServiceAccount name.
dnsPolicystringDNS policy for the pod.
hostNetworkboolEnable host networking.
multiPodPerHost*boolAllow multiple pods on the same node.
terminationGracePeriodSeconds*int64Pod termination grace period.
topologySpreadConstraints[]TopologySpreadConstraintHow pods spread across topology domains.
podManagementPolicystringStatefulSet pod management: OrderedReady (default) or Parallel.
metadataAerospikePodMetadataAdditional pod labels/annotations.
readinessGateEnabled*boolEnable custom readiness gate acko.io/aerospike-ready. Pods excluded from Service endpoints until Aerospike joins cluster mesh and finishes migrations.

AerospikeContainerSpec

Customizes the Aerospike server container.

FieldTypeDescription
resourcesResourceRequirementsCPU/memory requests and limits.
securityContextSecurityContextContainer-level security attributes.

AerospikePodMetadata

Extra labels and annotations for pods.

FieldTypeDescription
labelsmap[string]stringAdditional pod labels.
annotationsmap[string]stringAdditional pod annotations.

RackConfig

Defines rack-aware deployment configuration.

FieldTypeRequiredDescription
racks[]RackYesList of rack definitions (min 1).
namespaces[]stringNoAerospike namespace names that are rack-aware.
scaleDownBatchSizeIntOrStringNoPods to scale down simultaneously per rack. Int or percent string (e.g., "25%"). Default: 1.
maxIgnorablePodsIntOrStringNoMax pending/failed pods to ignore during reconciliation.
rollingUpdateBatchSizeIntOrStringNoPods to restart simultaneously per rack. Int or percent string. Takes precedence over spec.rollingUpdateBatchSize.

Rack

Defines a single rack in the cluster topology.

FieldTypeRequiredDescription
idintYesUnique rack identifier (>= 1). Rack ID 0 is reserved for the default rack.
zonestringNoZone label value (topology.kubernetes.io/zone).
regionstringNoRegion label value (topology.kubernetes.io/region).
nodeNamestringNoConstrain to a specific node.
rackLabelstringNoCustom label for rack affinity. Schedules to nodes with acko.io/rack=<rackLabel>. Must be unique across racks.
revisionstringNoVersion identifier for controlled rack migrations.
aerospikeConfigAerospikeConfigSpecNoPer-rack Aerospike config override.
storageAerospikeStorageSpecNoPer-rack storage override.
podSpecRackPodSpecNoPer-rack pod scheduling override.

RackPodSpec

Rack-level pod scheduling overrides.

FieldTypeDescription
affinityAffinityRack-level affinity override.
tolerations[]TolerationRack-level tolerations override.
nodeSelectormap[string]stringRack-level node selector override.

AerospikeAccessControlSpec

Defines ACL configuration.

FieldTypeDescription
roles[]AerospikeRoleSpecAerospike role definitions.
users[]AerospikeUserSpecAerospike user definitions.
adminPolicyAerospikeClientAdminPolicyAdmin client timeout policy.

AerospikeRoleSpec

Defines an Aerospike role.

FieldTypeRequiredDescription
namestringYesRole name.
privileges[]stringYesPrivilege strings: read, write, read-write, read-write-udf, sys-admin, user-admin, data-admin, truncate. Supports namespace scoping (e.g., read-write.testns).
whitelist[]stringNoAllowed CIDR ranges.

AerospikeUserSpec

Defines an Aerospike user.

FieldTypeRequiredDescription
namestringYesUsername.
secretNamestringYesKubernetes Secret name containing the password (key: password).
roles[]stringYesAssigned role names (min 1).

AerospikeClientAdminPolicy

Admin client timeout settings.

FieldTypeDefaultDescription
timeoutint2000Admin operation timeout in milliseconds.

AerospikeMonitoringSpec

Prometheus monitoring configuration.

FieldTypeDefaultDescription
enabledboolfalseEnable Prometheus exporter sidecar.
exporterImagestringaerospike/aerospike-prometheus-exporter:1.16.1Exporter container image.
portint329145Metrics port.
resourcesResourceRequirementsExporter resource limits.
env[]EnvVarAdditional environment variables for the exporter container.
metricLabelsmap[string]stringCustom labels added to all exported metrics via METRIC_LABELS env var.
serviceMonitorServiceMonitorSpecServiceMonitor configuration.
prometheusRulePrometheusRuleSpecPrometheusRule configuration for cluster alerts.

ServiceMonitorSpec

ServiceMonitor configuration for Prometheus Operator.

FieldTypeDefaultDescription
enabledboolfalseCreate ServiceMonitor resource.
intervalstring30sScrape interval.
labelsmap[string]stringAdditional labels for ServiceMonitor discovery.

PrometheusRuleSpec

PrometheusRule configuration for Aerospike cluster alerts.

FieldTypeDefaultDescription
enabledboolfalseCreate PrometheusRule resource.
labelsmap[string]stringAdditional labels for PrometheusRule discovery.
customRules[]JSONCustom rule groups replacing built-in alerts (NodeDown, StopWrites, HighDiskUsage, HighMemoryUsage). Each entry must be a complete Prometheus rule group object with name and rules fields.

NetworkPolicyConfig

Automatic NetworkPolicy creation.

FieldTypeDefaultDescription
enabledboolfalseEnable NetworkPolicy creation.
typestringkubernetesPolicy type: kubernetes or cilium.

BandwidthConfig

Bandwidth annotations for CNI traffic shaping.

FieldTypeDescription
ingressstringMax ingress bandwidth (e.g., 1Gbps, 500Mbps).
egressstringMax egress bandwidth (e.g., 1Gbps, 500Mbps).

OperationSpec

Defines an on-demand operation to trigger on cluster pods.

FieldTypeRequiredDescription
kindstringYesOperation type: WarmRestart (SIGUSR1) or PodRestart (delete/recreate).
idstringYesUnique operation identifier (1-20 characters).
podList[]stringNoSpecific pod names to target. Empty means all pods.

OperationStatus

Tracks the status of an on-demand operation.

FieldTypeDescription
idstringOperation identifier.
kindstringOperation type: WarmRestart or PodRestart.
phasestringOperation phase: InProgress, Completed, or Error.
completedPods[]stringPods that have completed the operation.
failedPods[]stringPods where the operation failed.

ValidationPolicySpec

Controls webhook validation behavior.

FieldTypeDefaultDescription
skipWorkDirValidateboolfalseSkip validation that the Aerospike work directory is on persistent storage.

AerospikeServiceSpec

Defines custom metadata for a Kubernetes Service.

FieldTypeRequiredDescription
metadataAerospikeObjectMetaNoCustom annotations and labels for the service.

AerospikeObjectMeta

Custom metadata for Kubernetes objects.

FieldTypeDescription
annotationsmap[string]stringCustom annotations.
labelsmap[string]stringCustom labels.