CouchbaseMemcachedBucket
Resource
The Couchbase Autonomous Operator operates on CouchbaseCluster
objects.
Buckets are decoupled from this configuration and are selected for inclusion within a cluster with configurable label selectors.
CouchbaseBucket
resources provide Memcached compatible in-memory storage.
The following YAML shows all possible fields that may be configured for a CouchbaseMemcachedBucket
.
This configuration may not be valid and is only for illustrative purposes.
CouchbaseMemcachedBucket
configuration parametersapiVersion: couchbase.com/v2
kind: CouchbaseMemcachedBucket
metadata:
name: my-bucket
labels:
cluster: my-cluster
spec:
name: Non_DNS_name
memoryQuota: 100Mi
enableFlush: false
Top-Level Definitions
The following are relevant generic parameters that can be defined:
apiVersion: couchbase.com/v2
kind: CouchbaseMemcachedBucket
metadata:
name: my-bucket
labels:
cluster: my-cluster
apiVersion
The API version defines which version of the resource this configuration refers to.
Field rules: This field is required and must be set to
couchbase.com/v2
kind
The kind defines the type of resource this configuration refers to.
Field rules: This field is required and must be set to
CouchbaseMemcachedBucket
metadata.name
The metadata name defines the name of the resource, and is used as the bucket name by default.
The name must be unique for the kind defined.
Furthermore the name must be unique for all bucket kinds defined and used by the cluster.
For example you cannot have a CouchbaseMemcachedBucket
named "default" and a CouchbaseBucket
also named "default".
Like other Kubernetes resource names, the metadata name is restricted to the character limits of DNS label names. This means that this field cannot accept the full character set that Couchbase supports for bucket names. If you wish to use a bucket name that would otherwise be supported by Couchbase, but contains characters that are outside of the limits for DNS label names, then you can use the spec.name field to override the metadata name becoming the bucket name.
Field rules: This field is required and must be unique as described above.
metadata.labels
The metadata labels allow the resource to be tagged so that it is only selected by specific CouchbaseCluster
resources.
Further details about resource selection can be found on the Couchbase Resources and RBAC page.
Field rules: This field is optional and must be a map of string key/value pairs.
spec
The following are parameters that may be set on the bucket:
spec:
name: Non_DNS_name
memoryQuota: 100Mi
enableFlush: false
spec.name
This field allows the name of a bucket to be overridden.
By default, the bucket name will be that which is specified as the resource name in metadata.name
.
This has limitations in that the metadata name is limited to the character set of DNS label names.
Couchbase Server allows characters outside of the DNS label character set.
By specifying this field you may use any character that Couchbase Server supports.
You may also use this field to allow multiple buckets in the same namespace — whose resource names differ as they must be unique — to have the same actual bucket name in Couchbase.
Field rules: This field is optional and must be a string containing a maximum of 100 of the following characters
a-zA-Z0-9-_%.
.
spec.memoryQuota
This field specifies the amount of memory to allocate to this bucket per-node.
It is deducted from the per-node spec.cluster.dataServiceMemoryQuota
parameter in a related CouchbaseCluster
resource.
The total quota allocated for all buckets must not exceed the spec.cluster.dataServiceMemoryQuota
parameter in a related CouchbaseCluster
resource.
The minimum size is 100Mi.
If not specified this field will default to 100Mi.
Field rules: This field is optional and must be a Kubernetes resource quantity greater than or equal to 100Mi.