A newer version of this documentation is available.

View Latest
March 30, 2025
+ 12

CouchbaseScopeGroup represents a logical unit of data storage that sits between buckets and collections e.g. a bucket may contain multiple scopes, and a scope may contain multiple collections. At present, scopes are not nested, so provide only a single level of abstraction. Scopes provide a coarser grained basis for role-based access control (RBAC) and cross-datacenter replication (XDCR) than collections, but finer that buckets. In order to be considered by the Operator, a scope must be referenced by either a CouchbaseBucket or CouchbaseEphemeralBucket resource. Unlike CouchbaseScope resources, scope groups represents multiple scopes, with the same common set of collections, to be expressed as a single resource, minimizing required configuration and Kubernetes API traffic. It also forms the basis of Couchbase RBAC security boundaries.

The following is an example resource, depicting the overall structure and any defaults (consult the field reference for valid values for "empty" values, such as empty strings etc.):

yaml
apiVersion: v2 kind: CouchbaseScopeGroup metadata: name: "" spec: collections: managed: false preserveDefaultCollection: false resources: - kind: CouchbaseCollection name: "" selector: {} names: - ""

couchbasescopegroups.apiVersion

Constraints

Type: string

Description

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.

couchbasescopegroups.kind

Constraints

Type: string

Description

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.

couchbasescopegroups.metadata

Constraints

Required

Type: object

Description

Standard object metadata as defined for all Kubernetes types.

For additional details see the Kubernetes reference documentation.

couchbasescopegroups.metadata.name

Constraints

Type: string

Description

The name of a resource. This must be unique for the kind of resource within the namespace.

All resources must have a name. The name may be omitted and metadata.generateName used instead to generate a unique resource name.

For additional details on resource names, see the Kubernetes reference documentation.

couchbasescopegroups.metadata.namespace

Constraints

Type: string

Description

The namespace the resource resides in. All resources reside in a namespace.

The namespace is optional and may be specified in YAML configuration to override the namespace supplied by kubectl.

For additional details on namespaces, see the Kubernetes reference documentation.

couchbasescopegroups.metadata.labels

Constraints

Type: map[string]string

Description

Labels allow resources to be labeled with key/value pairs of data. Labels are indexed and allow resources to be selected based upon specified labels.

Labels are relevant for certain types when using label selection within your resources.

For additional details on labels and selectors, see the Kubernetes reference documentation.

couchbasescopegroups.metadata.annotations

Constraints

Type: map[string]string

Description

Annotations allow resources to be annotated with key/value pairs of data. Annotations are arbitrary, and not indexed, so cannot be used to select resources, however may be used to add context or accounting to your resources.

For additional details on annotations, see the Kubernetes reference documentation.

couchbasescopegroups.spec

Constraints

Required

Type: object

Description

Spec defines the desired state of the resource.

couchbasescopegroups.spec.collections

Constraints

Type: object

Description

Collections defines how to collate collections included in this scope or scope group. Any of the provided methods may be used to collate a set of collections to manage. Collated collections must have unique names, otherwise it is considered ambiguous, and an error condition.

couchbasescopegroups.spec.collections.managed

Constraints

Type: boolean

Description

Managed indicates whether collections within this scope are managed. If not then you can dynamically create and delete collections with the Couchbase UI or SDKs.

couchbasescopegroups.spec.collections.preserveDefaultCollection

Constraints

Type: boolean

Description

PreserveDefaultCollection indicates whether the Operator should manage the default collection within the default scope. The default collection can be deleted, but can not be recreated by Couchbase Server. By setting this field to true, the Operator will implicitly manage the default collection within the default scope. The default collection cannot be modified and will have no document time-to-live (TTL). When set to false, the operator will not manage the default collection, which will be deleted and cannot be used or recreated.

couchbasescopegroups.spec.collections.resources

Constraints

Type: []object

Description

Resources is an explicit list of named resources that will be considered for inclusion in this scope or scopes. If a resource reference doesn’t match a resource, then no error conditions are raised due to undefined resource creation ordering and eventual consistency.

couchbasescopegroups.spec.collections.resources.kind

Constraints

Type: string

Default: CouchbaseCollection

Enumerations: CouchbaseCollection, CouchbaseCollectionGroup

Description

Kind indicates the kind of resource that is being referenced. A scope can only reference CouchbaseCollection and CouchbaseCollectionGroup resource kinds. This field defaults to CouchbaseCollection if not specified.

couchbasescopegroups.spec.collections.resources.name

Constraints

Required

Type: string

Minimum Length: 1

Maximum Length: 251

Pattern (Regular Expression): ^[a-zA-Z0-9\-][a-zA-Z0-9\-%_]{0,250}$

Description

Name is the name of the Kubernetes resource name that is being referenced. Legal collection names have a maximum length of 251 characters and may be composed of any character from "a-z", "A-Z", "0-9" and "_-%".

couchbasescopegroups.spec.collections.selector

Constraints

Type: object

Description

Selector allows resources to be implicitly considered for inclusion in this scope or scopes. More info: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#labelselector-v1-meta.

couchbasescopegroups.spec.names

Constraints

Required

Type: []string

Minimum Length: 1

Maximum Length: 251

Pattern (Regular Expression): ^[a-zA-Z0-9\-][a-zA-Z0-9\-%_]{0,250}$

Description

Names specifies the names of the scopes. Unlike CouchbaseScope, which specifies a single scope, a scope group specifies multiple, and the scope group must specify at least one scope name. Any scope names specified must be unique. Scope names must be 1-251 characters in length, contain only [a-zA-Z0-9_-%] and not start with either _ or %.