Annotation Documentation
Couchbase Operator uses special annotations to configure specific resources.
Bucket Backend Configuration
Unmanaged Buckets
cao.couchbase.com/buckets.targetUnmanagedBucketStorageBackend
Used to force a storage backend on all buckets in a Couchbase Cluster. This configuration only takes action if bucket management is disabled
When configured the Couchbase Operator will attempt to force all buckets in a cluster to a particular storage backend.
This config is only used with Couchbase Server 7.6.0.
Accepts either couchstore or magma.
Bucket Migrations
cao.couchbase.com/buckets.enableBucketMigrationRoutines
By default, bucket storage backend migrations are not enabled as they will result in a swap-rebalance of every effected couchbase node. This means changing the bucket storage backend will be prevented unless this annotation is set to "true".
Accepts either true or false.
Sample buckets
cao.couchbase.com/sampleBucket
SampleBucket indicates whether the bucket should be treated as a sample bucket. If set to "true", the bucket name will define the sample bucket used and the bucket will be created with the sample bucket configuration, not the CRD specification. SampleBuckets have a memory quota of 200Mi and a couchstore storage backend. If this annotation is changed to false or removed, the bucket will then be updated with the CRD specification. This annotation cannot be added to an existing bucket and should not be used for production clusters.
Cluster Scheduling
Rescheduling To Different Server Groups On Failed Scheduling
cao.couchbase.com/rescheduleDifferentServerGroup
Used to allow Couchbase Operator to attempt to reschedule a pod to a different server group if the pod fails to schedule on the original server group.
By default Couchbase Operator will continue to try to schedule the pod on the original server group if it fails to schedule.
With this annotation applied to a cluster the operator will try to schedule the pod to a different server group that has the same number of Couchbase Pods in it as the original server group. This is to ensure that the cluster remains balanced across the server groups.
This is a best effort attempt and may not always succeed. If there are no server groups with the same number of pods as the original server group the pod will be scheduled on the original server group.
Accepts either true or false.
Server Group Shuffling
cao.couchbase.com/shuffleServerGroups
Used to allow Couchbase Operator to shuffle the order that pods are scheduled to defined server groups.
By default Couchbase Operator will schedule pods to server groups in lexical order.
The shuffling is pseudo-random and is based on the cluster name and namespace, so the same cluster/namespace combination will always shuffle the server groups in the same order.
Accepts either true or false.
Pod Rescheduling
Individual Pod Rescheduling
cao.couchbase.com/reschedule
Used to force a pod to be rescheduled. When this annotation is applied to a Couchbase pod, the operator will detect it and reschedule the pod. The pods will either be Swap Rebalanced or go through a InPlaceUpgrade depending on couchbaseclusters.spec.upgradeProcess.
Accepts either true or false.
Cluster Upgrade
Rollback Method
cao.couchbase.com/upgrade.rollbackMethod
Used to select how the operator replaces nodes during a rollback.
A rollback cannot be performed in place, so by default the operator swap rebalances: the replacement pod is created before the old one is removed, so the cluster peaks at its configured size plus maxUpgradable pods.
Where there is no room to schedule those extra pods, the rollback stalls.
ConstrainedRebalanceOut removes the node first instead, so the pod count never exceeds the configured cluster size.
Accepts one of the following values:
-
SwapRebalance(default): creates the replacement before ejecting the old node. Keeps the cluster at full strength, but needs spare capacity to schedule the extra pods. -
ConstrainedRebalanceOut: rebalances the node’s data off before creating its replacement. Replica coverage is never reduced, but the remaining nodes must have room for the relocated data and it costs two rebalances instead of one.
An unrecognised value logs a warning and falls back to SwapRebalance.
Host Network
Improved Host Network Support
cao.couchbase.com/networking.improvedHostNetwork
Used to enable improved host network support. This annotation is used to enable improved host network support for Couchbase Server pods. When enabled on a cluster the operator will skip SAN validation and will add the underlying Kubernetes hostname a pod is running on to the alternate addresses list.
cao.couchbase.com/networking.initPodsWithNodeHostname
Used to set the hostname of the pod to the name of the node it is running on.
The annotation cao.couchbase.com/networking.improvedHostNetwork must also be set to true in order for the annotation to take effect.
When set to true, the pods will be initialised with the node name as the hostname of the pod without an alternate address.
Cloud Native Gateway
OTLP Endpoint
cao.couchbase.com/networking.cloudNativeGateway.otlp.endpoint
Use this annotation to set a custom OTLP endpoint for the Cloud Native Gateway.
Apply the annotation to the cluster with a string value such as https://otel:1234.
The value is passed directly to the Cloud Native Gateway container.
TLS
Node Internal Client Certificate
cao.couchbase.com/networking.tls.secretSource.nodeClientSecretName
Used to supply the internal client certificate that each Couchbase node presents when it acts as a client for node-to-node communication.
Set the value to the name of a secret in the same namespace as the cluster, using the kubernetes.io/tls layout (tls.crt and tls.key).
The certificate must be valid for client authentication (clientAuth extended key usage), chain to a CA the cluster trusts, and contain a SAN email address of the form <name>@internal.couchbase.com.
When set, the operator uploads the certificate to each node and reloads it, so the node’s internal client identity is signed by your CA rather than the auto-generated CA of Couchbase Server. This allows the auto-generated CA to be removed from the trust pool when mandatory client certificate authentication is used with strict node-to-node encryption.
Requires Couchbase Server 7.6.0 or later; on earlier versions the annotation has no effect.
Backup
Additional Args
cao.couchbase.com/full.additionalArgs
Use this annotation to set additional arguments for cbbackupmgr in full backup jobs.
Provide a string that includes any values supported by cbbackupmgr.
cao.couchbase.com/incremental.additionalArgs
Use this annotation to set additional arguments for cbbackupmgr in incremental backup jobs.
Provide a string that includes any values supported by cbbackupmgr.
cao.couchbase.com/merge.additionalArgs
Use this annotation to set additional arguments for cbbackupmgr in merge backup jobs.
Provide a string that includes any values supported by cbbackupmgr.
Backup Restore
Additional Args
cao.couchbase.com/additionalArgs
Use this annotation to set additional arguments for cbbackupmgr in restore jobs.
Provide a string that includes any values supported by cbbackupmgr.