couchbase-operator
A Helm chart to deploy the Couchbase Autonomous Operator for easily deploying, managing, and maintaining Couchbase Clusters. Couchbase Server is a NoSQL document database with a distributed architecture for performance, scalability, and availability. It enables developers to build applications easier and faster by leveraging the power of SQL with the flexibility of JSON.
About this chart
couchbase-operator
A Helm chart to deploy the Couchbase Autonomous Operator for easily deploying, managing, and maintaining Couchbase Clusters. Couchbase Server is a NoSQL document database with a distributed architecture for performance, scalability, and availability. It enables developers to build applications easier and faster by leveraging the power of SQL with the flexibility of JSON.
Deploying the Operator and Couchbase Server
REQUIRED
- Helm 3.1+ is required when installing the couchbase cluster chart.
- A license for Couchbase Server Enterprise Edition.
Quick Start
The Couchbase Operator can be used to instantly deploy the Autonomous Operator, Admission Controller, and Couchbase Cluster. Additonally, Sync Gateway can be deployed, along with auto-generation of TLS and networking services.
To quickly deploy the admission controller and Operator, as well as a Couchbase Server cluster:
- Add the chart repository to
helm:
helm repo add couchbase https://couchbase-partners.github.io/helm-charts/
helm repo update
- Install the Chart:
helm upgrade --install default couchbase/couchbase-operator
See Couchbase Helm Documentation for more information about customizing and managing your charts.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| admissionCA.cert | string | nil | A base64 encoded PEM format certificate |
| admissionCA.expiration | int | 3650 | Expiry time of CA in days for generated certs |
| admissionCA.key | string | nil | A base64 encoded PEM format private key |
| admissionController.commandArgs | object | {"default-file-system-group":true,"validate-secrets":true,"validate-storage-classes":true} | Set of command-line flags to pass on to the Admission Controller to modify its behavior. Do not change. |
| admissionController.disableValidatingWebhook | bool | false | Disable the creation of Validation webhook. Setting to 'false' may be helpful when installing into a restricted environments (ie Strict mTLS), since disabling avoids performing resource fetching and validation from the Kubernetes API server. |
| admissionController.image | object | {"repository":"couchbase/admission-controller","tag":"2.9.4"} | Image specifies repository and tag of the Couchbase Admission container. |
| admissionController.imagePullPolicy | string | "IfNotPresent" | The policy for pulling images from the repository onto hosts. The imagePullPolicy value defaults to IfNotPresent, which means that images are only pulled if they’re not present on the Kubernetes node. Values allowed are Always, IfNotPresent, and Never. |
| admissionController.imagePullSecrets | list | [] | ImagePullSecrets is an optional list of references to secrets to use for pulling images |
| admissionController.name | string | "couchbase-admission-controller" | |
| admissionController.nodeSelector | object | {} | Specify a node selection constraint for couchbase-admission-controller pod assignment. Ref: https://kubernetes.io/docs/user-guide/node-selection/ |
| admissionController.resources | object | {} | Resource Limits and requests for Pod CPU and Memory |
| admissionController.runAsNonRoot | bool | true | Specify whether to run as a non-root user. Running as non-root ensures least privilege. |
| admissionController.scope | string | "ClusterRole" | RBAC Scope of the Admission Controller. Must be either 'Role' or 'ClusterRole'. When scope is 'ClusterRole' the admission controller is able to validate resources in all namespaces. 'Role' scope limits validation to a single a namespace. |
| admissionController.tolerations | list | [] | Tolerations are applied to pods, and allow (but do not require) the pods to schedule onto nodes with matching taints. |
| admissionController.verboseLogging | bool | false | Determines whether the admission controller should log all of its validation notices within the console. When set to false, only validation errors are logged within the pod’s console. |
| admissionSecret.cert | string | nil | PEM format certificate (auto-generated) override via --set-file |
| admissionSecret.key | string | nil | PEM format certificate (auto-generated) override via --set-file |
| admissionSecret.name | string | nil | Name of the secret (auto-generated) |
| admissionService.name | string | nil | Name of the service (auto-generated) |
| admissionService.port | int | 443 | Port service exposes |
| admissionService.targetPort | int | 8443 | |
| backuprestores | object | {} | |
| backups | object | {} | CouchbaseBackups runs a job which preserves data into backups |
| buckets.default.accessScannerEnabled | bool | true | AccessScannerEnabled allows the bucket to be configured to allow enabling and disabling the access scanner. This feature is only supported for Couchbase Server 8.0.0+. It is set to true by default. |
| buckets.default.autoCompaction | object | {"databaseFragmentationThreshold":{"percent":null,"size":null},"magmaFragmentationPercentage":null,"timeWindow":{"abortCompactionOutsideWindow":false,"end":null,"start":null},"tombstonePurgeInterval":null,"viewFragmentationThreshold":{"percent":null,"size":null}} | AutoCompaction allows the configuration of auto-compaction settings, including on what conditions disk space is reclaimed and when it is allowed to run, on a per-bucket basis. If any of these fields are configured, those that are not configured here will take the value set at the cluster level. Excluding this field (which is the default), will set the autoCompactionSettings to false and the bucket will use cluster defaults. |
| buckets.default.autoCompaction.databaseFragmentationThreshold | object | {"percent":null,"size":null} | DatabaseFragmentationThreshold defines triggers for when database compaction should start on buckets with a couchstore storage backend. This field will be ignored if the bucket has a magma storage backend. |
| buckets.default.autoCompaction.databaseFragmentationThreshold.percent | string | nil | Percent specifies the level of view fragmentation that must be reached for View compaction to be automatically triggered. This field must be in the range 2-100, defaulting to the cluster level value. |
| buckets.default.autoCompaction.databaseFragmentationThreshold.size | string | nil | Size the level of database fragmentation that must be reached for data compaction to be automatically triggered on the bucket. More info: https://kubernetes.io/docs/concepts/configuration/manage- resources-containers/#resource-units-in-kubernetes |
| buckets.default.autoCompaction.magmaFragmentationPercentage | string | nil | MagmaFragmentationThresholdPercentage defines the percentage of magma fragmentation level to determine the point when compaction is triggered for buckets with a magma storage backend. This field will be ignored if the bucket has a couchstore storage backend. |
| buckets.default.autoCompaction.timeWindow | object | {"abortCompactionOutsideWindow":false,"end":null,"start":null} | TimeWindow allows restriction of when compaction can occur. This field will be ignored if the bucket has a magma storage backend. |
| buckets.default.autoCompaction.timeWindow.abortCompactionOutsideWindow | bool | false | AbortCompactionOutsideWindow stops compaction processes when the process moves outside the window, defaulting to false. |
| buckets.default.autoCompaction.timeWindow.end | string | nil | End is a wallclock time, in the form HH:MM, when a compaction should stop. |
| buckets.default.autoCompaction.timeWindow.start | string | nil | Start is a wallclock time, in the form HH:MM, when a compaction is permitted to start. |
| buckets.default.autoCompaction.tombstonePurgeInterval | string | nil | TombstonePurgeInterval controls how long to wait before purging tombstones. This field must be in the range 1h-1440h, defaulting to the cluster level value. More info: https://golang.org/pkg/time/#ParseDuration |
| buckets.default.autoCompaction.viewFragmentationThreshold | object | {"percent":null,"size":null} | ViewFragmentationThreshold defines triggers for when view compaction should start. This field will be ignored if the bucket has a magma storage backend. |
| buckets.default.autoCompaction.viewFragmentationThreshold.percent | string | nil | Percent specifies the percentage level of View fragmentation that must be reached for View compaction to be automatically triggered on the bucket This field must be in the range 2-100, defaulting to the cluster level value. |
| buckets.default.autoCompaction.viewFragmentationThreshold.size | string | nil | Size is the level of View fragmentation that must be reached for view compaction to be automatically triggered on the bucket. More info: https://kubernetes.io/docs/concepts/configuration/manage- resources-containers/#resource-units-in-kubernetes |
| buckets.default.compressionMode | string | "passive" | CompressionMode defines how Couchbase server handles document compression. When off, documents are stored in memory, and transferred to the client uncompressed. When passive, documents are stored compressed in memory, and transferred to the client compressed when requested. When active, documents are stored compresses in memory and when transferred to the client. This field must be "off", "passive" or "active", defaulting to "passive". Be aware "off" in YAML 1.2 is a boolean, so must be quoted as a string in configuration files. |
| buckets.default.conflictResolution | string | "seqno" | ConflictResolution defines how XDCR handles concurrent write conflicts. Sequence number based resolution selects the document with the highest sequence number as the most recent. Timestamp based resolution selects the document that was written to most recently as the most recent. This field must be "seqno" (sequence based), or "lww" (timestamp based), defaulting to "seqno". |
| buckets.default.durabilityImpossibleFallback | string | nil | DurabilityImpossibleFallback defines whether to report writes as durable even if not enough replicas are written to. This feature is only supported for Couchbase Server 8.0.0+. Defaults to disabled. |
| buckets.default.enableCrossClusterVersioning | bool | false | EnableCrossClusterVersioning allows the bucket to be configured to allow cross-cluster versioning. This feature is only supported for Couchbase Server 7.6.0+. Once it has been set to true, it cannot be toggled to false. |
| buckets.default.enableFlush | bool | false | EnableFlush defines whether a client can delete all documents in a bucket. This field defaults to false. |
| buckets.default.enableIndexReplica | bool | false | EnableIndexReplica defines whether indexes for this bucket are replicated. This field defaults to false. |
| buckets.default.evictionPolicy | string | "valueOnly" | EvictionPolicy controls how Couchbase handles memory exhaustion. Value only eviction flushes documents to disk but maintains document metadata in memory in order to improve query performance. Full eviction removes all data from memory after the document is flushed to disk. This field must be "valueOnly" or "fullEviction", defaulting to "valueOnly". |
| buckets.default.expiryPagerSleepTime | string | "10m" | ExpiryPagerSleepTime defines the time between Expiry Pager runs. It defaults to 10 minutes. This field is only supported for Couchbase Server 8.0.0+. |
| buckets.default.ioPriority | string | "low" | IOPriority controls how many threads a bucket has, per pod, to process reads and writes. This field must be "low" or "high", defaulting to "low". Modification of this field will cause a temporary service disruption as threads are restarted. |
| buckets.default.kind | string | "CouchbaseBucket" | The type of the bucket to create by default. Removed from CRD as only used by Helm. |
| buckets.default.maxTTL | string | nil | MaxTTL defines how long a document is permitted to exist for, without modification, until it is automatically deleted. This is a default and maximum time-to-live and may be set to a lower value by the client. If the client specifies a higher value, then it is truncated to the maximum durability. Documents are removed by Couchbase, after they have expired, when either accessed, the expiry pager is run, or the bucket is compacted. When set to 0, then documents are not expired by default. This field must be a duration in the range 0-2147483648s, defaulting to 0. More info: https://golang.org/pkg/time/#ParseDuration |
| buckets.default.memoryHighWatermark | int | 85 | MemoryHighWatermark defines the memory high watermark for the bucket. It must be between 51 and 90. It must also be greater than spec.memoryLowWatermark. It defaults to 85. This field is only supported for Couchbase Server 8.0.0+. |
| buckets.default.memoryLowWatermark | int | 75 | MemoryLowWatermark defines the memory low watermark for the bucket. It must be between 50 and 89. It must also be less than spec.memoryHighWatermark. It defaults to 75. This field is only supported for Couchbase Server 8.0.0+. |
| buckets.default.memoryQuota | string | "100Mi" | MemoryQuota is a memory limit to the size of a bucket. When this limit is exceeded, documents will be evicted from memory to disk as defined by the eviction policy. The memory quota is defined per Couchbase pod running the data service. This field defaults to, and must be greater than or equal to 100Mi. More info: https://kubernetes.io/docs/concepts/configuration/ |
Deploy couchbase-operator with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has couchbase-operator on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartcouchbase-operator is pinned at v2.94.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply