couchbase-operator

by Couchbase Inc

Helm chartv2.94.0App 2.9.4Verified publisher

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:

  1. Add the chart repository to helm:
helm repo add couchbase https://couchbase-partners.github.io/helm-charts/
helm repo update
  1. Install the Chart:
helm upgrade --install default couchbase/couchbase-operator

See Couchbase Helm Documentation for more information about customizing and managing your charts.

Values

KeyTypeDefaultDescription
admissionCA.certstringnilA base64 encoded PEM format certificate
admissionCA.expirationint3650Expiry time of CA in days for generated certs
admissionCA.keystringnilA base64 encoded PEM format private key
admissionController.commandArgsobject{"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.disableValidatingWebhookboolfalseDisable 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.imageobject{"repository":"couchbase/admission-controller","tag":"2.9.4"}Image specifies repository and tag of the Couchbase Admission container.
admissionController.imagePullPolicystring"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.imagePullSecretslist[]ImagePullSecrets is an optional list of references to secrets to use for pulling images
admissionController.namestring"couchbase-admission-controller"
admissionController.nodeSelectorobject{}Specify a node selection constraint for couchbase-admission-controller pod assignment. Ref: https://kubernetes.io/docs/user-guide/node-selection/
admissionController.resourcesobject{}Resource Limits and requests for Pod CPU and Memory
admissionController.runAsNonRootbooltrueSpecify whether to run as a non-root user. Running as non-root ensures least privilege.
admissionController.scopestring"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.tolerationslist[]Tolerations are applied to pods, and allow (but do not require) the pods to schedule onto nodes with matching taints.
admissionController.verboseLoggingboolfalseDetermines 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.certstringnilPEM format certificate (auto-generated) override via --set-file
admissionSecret.keystringnilPEM format certificate (auto-generated) override via --set-file
admissionSecret.namestringnilName of the secret (auto-generated)
admissionService.namestringnilName of the service (auto-generated)
admissionService.portint443Port service exposes
admissionService.targetPortint8443
backuprestoresobject{}
backupsobject{}CouchbaseBackups runs a job which preserves data into backups
buckets.default.accessScannerEnabledbooltrueAccessScannerEnabled 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.autoCompactionobject{"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.databaseFragmentationThresholdobject{"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.percentstringnilPercent 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.sizestringnilSize 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.magmaFragmentationPercentagestringnilMagmaFragmentationThresholdPercentage 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.timeWindowobject{"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.abortCompactionOutsideWindowboolfalseAbortCompactionOutsideWindow stops compaction processes when the process moves outside the window, defaulting to false.
buckets.default.autoCompaction.timeWindow.endstringnilEnd is a wallclock time, in the form HH:MM, when a compaction should stop.
buckets.default.autoCompaction.timeWindow.startstringnilStart is a wallclock time, in the form HH:MM, when a compaction is permitted to start.
buckets.default.autoCompaction.tombstonePurgeIntervalstringnilTombstonePurgeInterval 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.viewFragmentationThresholdobject{"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.percentstringnilPercent 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.sizestringnilSize 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.compressionModestring"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.conflictResolutionstring"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.durabilityImpossibleFallbackstringnilDurabilityImpossibleFallback 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.enableCrossClusterVersioningboolfalseEnableCrossClusterVersioning 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.enableFlushboolfalseEnableFlush defines whether a client can delete all documents in a bucket. This field defaults to false.
buckets.default.enableIndexReplicaboolfalseEnableIndexReplica defines whether indexes for this bucket are replicated. This field defaults to false.
buckets.default.evictionPolicystring"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.expiryPagerSleepTimestring"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.ioPrioritystring"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.kindstring"CouchbaseBucket"The type of the bucket to create by default. Removed from CRD as only used by Helm.
buckets.default.maxTTLstringnilMaxTTL 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.memoryHighWatermarkint85MemoryHighWatermark 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.memoryLowWatermarkint75MemoryLowWatermark 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.memoryQuotastring"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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcouchbase-operator is pinned at v2.94.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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