cloudprem
by Datadog
Datadog CloudPrem
About this chart
CloudPrem
Using the Datadog Helm repository
Add and update the Datadog Helm repository to your Helm repositories:
helm repo add datadog https://helm.datadoghq.com
helm repo update
Prerequisites
- AWS account
- Kubernetes
1.25+(EKS preferred) - AWS Load Balancer Controller
- PostgreSQL database (RDS preferred)
- S3 bucket
Quick start
Creating the Kubernetes namespace
kubectl create namespace <namespace name>
Storing the PostgreSQL database connection string as a Kubernetes secret
kubectl create secret generic <secret name> --from-literal QW_METASTORE_URI=postgres://<username>:<password>@<endpoint>:<port>/<database> -n <namespace name>
Customizing the Helm chart
Create a datadog-values.yaml file to override the default values with your custom configuration. This is where you define environment-specific settings such as the image tag, AWS account ID, service account, ingress setup, resource requests and limits, and more.
Any parameters not explicitly overridden in datadog-values.yaml will fall back to the defaults defined in the chart’s values.yaml. Here is an example of a datadog-values.yaml file with such overrides:
Pod sizes and resource requirements
podSize selects a predefined resource tier and related Quickwit tuning parameters for indexer and searcher pods. The default podSize is xlarge for both components. Each preset is designed to leave room on a matching node for Kubernetes system components, DaemonSets, and add-ons.
The presets account for resources reserved for Kubernetes system components. The reservation amounts are based on the GKE node reservation calculation. An additional 250m CPU and 512Mi memory per node is reserved for DaemonSets and add-ons:
Actual CPU request = (nominal pod CPU - Kubernetes system CPU reservation - 250m), rounded down to the nearest 100m
Actual memory request/limit = (nominal pod memory - Kubernetes system memory reservation - 512Mi), rounded down to the nearest 100Mi
podSize | Nominal CPU request | Actual CPU request | Nominal memory request/limit | Actual memory request/limit |
|---|---|---|---|---|
large | 2 | 1600m | 8Gi | 5700Mi |
xlarge | 4 | 3600m | 16Gi | 13100Mi |
2xlarge | 8 | 7600m | 32Gi | 28500Mi |
4xlarge | 16 | 15600m | 64Gi | 59300Mi |
6xlarge | 24 | 23600m | 96Gi | 90100Mi |
8xlarge | 32 | 31600m | 128Gi | 120900Mi |
For searchers, the presets do not set a CPU limit, allowing a pod to use idle CPU on its node without being throttled. For indexers, the presets set a CPU limit equal to the CPU request rounded up to the next whole core: 2000m for large, 4000m for xlarge, 8000m for 2xlarge, and 16000m for 4xlarge. No CPU limit is added when indexer.resources is set. Memory requests and limits are equal to keep memory usage within the allocatable node capacity.
For indexers, podSize also sets QW_INDEXING_MAX_WRITE_THROUGHPUT, which caps each indexer's write throughput and scales with the CPU request: 25MiB for large, 50MiB for xlarge, 100MiB for 2xlarge, and 200MiB for 4xlarge. Indexers do not support 6xlarge or 8xlarge. The variable is not set when indexer.resources is set. To override it, set QW_INDEXING_MAX_WRITE_THROUGHPUT in indexer.extraEnv or environment.
datadog:
# The Datadog [site](https://docs.datadoghq.com/getting_started/site/) to connect to. Defaults to `datadoghq.com`.
site: datadoghq.eu
# The name of the existing Secret containing the Datadog API key. The secret key name must be `api-key`.
apiKeyExistingSecret: datadog-api-key
aws:
accountId: "123456789012"
# AWS partition, set to "aws" by default, but should be set to "aws-cn" for China regions
partition: aws-cn
# Environment variables
# Any environment variables defined here will be available to all pods in the deployment
environment:
AWS_REGION: cn-north-1
# Service account configuration
# If `serviceAccount.create` is set to `true`, a service account will be created with the specified name.
# The service account will be annotated with the IAM role ARN if `aws.partition`, `aws.accountId`, and serviceAccount.eksRoleName` are set.
# Additional annotations can be added using serviceAccount.extraAnnotations.
serviceAccount:
create: true
name: cloudprem
# The name of the IAM role to use for the service account. If set, the following annotations will be added to the service account:
# - eks.amazonaws.com/role-arn: arn:<aws.partition>:iam::<aws.accountId>:role/<serviceAccount.eksRoleName>
# - eks.amazonaws.com/sts-regional-endpoints: "true"
eksRoleName: cloudprem
extraAnnotations: {}
# CloudPrem node configuration
config:
# The root URI where index data will be stored. This should be an S3 path.
# All indexes created in CloudPrem will be stored under this location.
default_index_root_uri: s3://<bucket name>/indexes
# Ingress configuration
ingress:
# The internal ingress is used by Datadog agents and other collectors running outside
# the Kubernetes cluster to send their logs to CloudPrem.
internal:
enabled: true
name: cloudprem-internal
host: cloudprem.acme.internal
# Additional annotations can be added to customize the ALB behavior.
extraAnnotations:
alb.ingress.kubernetes.io/load-balancer-name: cloudprem-internal
# Metastore configuration
# The metastore is responsible for storing and managing index metadata.
# It requires a PostgreSQL database connection string to be provided via a Kubernetes secret.
# The secret should contain a key named `QW_METASTORE_URI` with a value in the format:
# postgresql://<username>:<password>@<host>:<port>/<database>
#
# The metastore connection string is mounted into the pods using extraEnvFrom to reference the secret.
metastore:
extraEnvFrom:
- secretRef:
name: cloudprem-metastore-uri
# Indexer configuration
# The indexer is responsible for processing and indexing incoming data it receives data from various sources (e.g., Datadog agents, log collectors)
# and transforms it into searchable files called "splits" stored in S3.
#
# The indexer is horizontally scalable - you can increase `replicaCount` or enable autoscaling to increase the cluster's indexing throughput.
# Resource requests and limits should be tuned based on your indexing workload.
#
# The default values are suitable for moderate indexing loads of up to 20MB/s per indexer pod.
indexer:
replicaCount: 2
resources:
requests:
cpu: "4"
memory: "8Gi"
limits:
cpu: "4"
memory: "8Gi"
autoscaling:
enabled: false
# Searcher configuration
# The searcher is responsible for executing search queries against the indexed data stored in S3.
# It handles search requests from Datadog's query service and returns matching results.
#
# The searcher is horizontally scalable - you can increase `replicaCount` or enable autoscaling to handle more concurrent search requests.
# Resource requirements for searchers are highly workload-dependent and should be determined empirically.
# Key factors that impact searcher performance include:
# - Query complexity (e.g., number of terms, use of wildcards or regex)
# - Query concurrency (number of simultaneous search requests)
# - Amount of data scanned per query
# - Data access patterns (cache hit rates)
#
# Memory is particularly important for searchers as they cache frequently accessed index data in memory.
# Monitor searcher metrics and adjust resources based on observed performance and workload characteristics.
searcher:
replicaCount: 2
resources:
requests:
cpu: "4"
memory: "16Gi"
limits:
cpu: "4"
memory: "16Gi"
autoscaling:
enabled: false
# Additional ConfigMaps
# Create custom ConfigMaps for application configuration, scripts, or other data
extraConfigMaps:
- name: custom-app-config
labels:
component: application
annotations:
description: "Custom application configuration"
data:
app.properties: |
database.pool.size=10
logging.level=INFO
init-script.sh: |
#!/bin/bash
echo "Initializing application..."
Installing or upgrading the Helm chart
helm upgrade --install <release name> datadog/cloudprem \
-n <namespace name> \
-f datadog-values.yaml
Upgrading indexers to Parallel
Indexer StatefulSets now default to Parallel, so an unready indexer no longer blocks creation of other indexers during scale-up. Scale-down can also terminate indexers concurrently; rolling-update ordering is unchanged.
Kubernetes does not allow changing podManagementPolicy on an existing StatefulSet. To upgrade without migrating, keep this explicit override:
indexer:
podManagementPolicy: OrderedReady
To migrate an existing indexer StatefulSet:
- Pause any automation that applies Helm changes.
- Delete only the indexer StatefulSet, preserving its pods and PVCs:
kubectl delete statefulset <indexer-statefulset-name> -n <namespace> --cascade=orphan - Set
indexer.podManagementPolicy: Parallelin your release values (or remove theOrderedReadyoverride), then apply the changes usinghelm upgradeor your usual deployment process. - Resume the automation.
Do not delete pods or PVCs or use helm upgrade --force. The upgrade may restart pods if it changes their template.
After migration, rolling back to an older chart requires keeping indexer.podManagementPolicy: Parallel; switching back to OrderedReady requires recreating the StatefulSet again.
Uninstalling the Helm chart
To uninstall the deployment:
helm uninstall <release name>
This command removes all the Kubernetes resources associated with the chart and deletes the release.
Helm Chart values (non-exhaustive)
| Key | Type | Default | Description |
|---|---|---|---|
| aws.accountId | string | null | AWS account ID used for the EKS role ARN service account annotation |
| aws.partition | string | aws | AWS partition used for the EKS role ARN service account annotation |
| config.* | dict | config defaults | Config used by the CloudPrem prods |
| environment | dict | {} | Key-value environment variables passed to CloudPrem pods |
| environmentFrom | list | [] | List of sources to populate environment variables (e.g., Secrets or ConfigMaps) |
| extraConfigMaps | list | [] | Additional ConfigMaps to create with custom data and configuration |
| image.pullPolicy | string | IfNotPresent | Image pull policy for CloudPrem containers |
| image.repository | string | public.ecr.aws/datadog/cloudprem | Repository of the CloudPrem image |
| image.tag | string | devel | Tag of the CloudPrem image to deploy |
| ingress.internal.enabled | bool | false | Whether to enable the internal ingress |
| ingress.internal.host | string | null | Hostname for internal ingress access |
| ingress.internal.name | string | null | Name of the internal ingress resource |
| ingress.internal.extraAnnotations | dict | {} | Annotations to add to the internal ingress resource |
| ingress.public.enabled | bool | false | Whether to enable the public ingress |
| ingress.public.extraAnnotations | dict | {} | Annotations to add to the public ingress resource |
| ingress.public.host | string | null | Hostname for public ingress access |
| ingress.public.name | string | null | Name of the public ingress resource |
| serviceAccount.create | bool | true | Whether to create a new Kubernetes service account |
| serviceAccount.eksRoleName | string | null | IAM role name to associate with the service account |
| serviceAccount.extraAnnotations | dict | {} | Extra annotations to add to the service account |
| serviceAccount.name | string | null | Name of the service account used by the CloudPrem pods |
Deploy cloudprem with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cloudprem 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 chartcloudprem is pinned at v0.7.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