dgraph
Dgraph is a horizontally scalable and distributed graph database, providing ACID transactions, consistent replication and linearizable reads.
About this chart
Dgraph
Dgraph is a horizontally scalable and distributed graph database, providing ACID transactions, consistent replication and linearizable reads. It's built from the ground up to perform for a rich set of queries. Being a native graph database, it tightly controls how the data is arranged on disk to optimize for query performance and throughput, reducing disk seeks and network calls in a cluster.
TL;DR;
helm repo add dgraph https://charts.dgraph.io
helm install "my-release" dgraph/dgraph
Introduction
This chart bootstraps Dgraph cluster deployment on a Kubernetes cluster using Helm package manager.
Prerequisites
- Kubernetes 1.16+
- Helm 3.0+
Installing the Chart
To install the chart with the release name my-release:
helm repo add dgraph https://charts.dgraph.io
helm install "my-release" dgraph/dgraph
These commands deploy Dgraph on the Kubernetes cluster in the default configuration. The Configuration section lists the parameters that can be configured during installation:
Tip: List all releases using
helm list
Uninstalling the chart
To uninstall/delete the my-release resources:
helm delete "my-release"
The command above removes all the Kubernetes components associated with the chart and deletes the release.
Deletion of the StatefulSet doesn't cascade to deleting associated PVCs. To delete them:
kubectl delete pvc --selector release=my-release
Configuration
The following table lists the configurable parameters of the dgraph chart and their default values.
| Parameter | Description | Default |
|---|---|---|
image.registry | Container registry name | docker.io |
image.repository | Container image name | dgraph/dgraph |
image.tag | Container image tag | v21.03.1 |
image.pullPolicy | Container pull policy | IfNotPresent |
nameOverride | Deployment name override (will append the release name) | nil |
fullnameOverride | Deployment full name override (the release name is ignored) | nil |
zero.name | Zero component name | zero |
zero.metrics.enabled | Add annotations for Prometheus metric scraping | true |
zero.extraAnnotations | Specify annotations for template metadata | {} |
zero.updateStrategy | Strategy for upgrading zero nodes | RollingUpdate |
zero.schedulerName | Configure an explicit scheduler | nil |
zero.monitorLabel | Monitor label for zero, used by prometheus. | zero-dgraph-io |
zero.rollingUpdatePartition | Partition update strategy | nil |
zero.podManagementPolicy | Pod management policy for zero nodes | OrderedReady |
zero.replicaCount | Number of zero nodes | 3 |
zero.shardReplicaCount | Max number of replicas per data shard | 5 |
zero.terminationGracePeriodSeconds | Zero server pod termination grace period | 60 |
zero.antiAffinity | Zero anti-affinity policy | soft |
zero.podAntiAffinitytopologyKey | Anti affinity topology key for zero nodes | kubernetes.io/hostname |
zero.nodeAffinity | Zero node affinity policy | {} |
zero.extraEnvs | extra env vars | [] |
zero.extraFlags | Zero extra flags for command line | "" |
zero.configFile | Zero config file | {} |
zero.service.type | Zero service type | ClusterIP |
zero.service.annotations | Zero service annotations | {} |
zero.service.publishNotReadyAddresses | publish address if pods not in ready state | true |
zero.service.loadBalancerIP | specify static IP address for LoadBalancer type | "" |
zero.service.externalTrafficPolicy | route external traffic to node-local or cluster-wide endpoints | "" |
zero.service.loadBalancerSourceRanges | restrict CIDR IP addresses for a LoadBalancer type | [] |
zero.securityContext.enabled | Security context for zero nodes enabled | false |
zero.securityContext.fsGroup | Group id of the zero container | 1001 |
zero.securityContext.runAsUser | User ID for the zero container | 1001 |
zero.persistence.enabled | Enable persistence for zero using PVC | true |
zero.persistence.storageClass | PVC Storage Class for zero volume | nil |
zero.persistence.accessModes | PVC Access Mode for zero volume | ['ReadWriteOnce'] |
zero.persistence.size | PVC Storage Request for zero volume | 32Gi |
zero.nodeSelector | Node labels for zero pod assignment | {} |
zero.tolerations | Zero tolerations | [] |
zero.resources.requests.memory | Zero pod resources memory requests | 100Mi |
zero.startupProbe | Zero startup probes (NOTE: only supported in Kubernetes v1.16+) | See values.yaml for defaults |
zero.livenessProbe | Zero liveness probes | See values.yaml for defaults |
zero.readinessProbe | Zero readiness probes | See values.yaml for defaults |
zero.customStartupProbe | Zero custom startup probes (if zero.startupProbe not enabled) | {} |
zero.customLivenessProbe | Zero custom liveness probes (if zero.livenessProbe not enabled) | {} |
zero.customReadinessProbe | Zero custom readiness probes (if zero.readinessProbe not enabled) | {} |
alpha.name | Alpha component name | alpha |
alpha.metrics.enabled | Add annotations for Prometheus metric scraping | true |
alpha.extraAnnotations | Specify annotations for template metadata | {} |
alpha.monitorLabel | Monitor label for alpha, used by prometheus. | alpha-dgraph-io |
alpha.updateStrategy | Strategy for upgrading alpha nodes | RollingUpdate |
alpha.schedulerName | Configure an explicit scheduler | nil |
alpha.rollingUpdatePartition | Partition update strategy | nil |
alpha.podManagementPolicy | Pod management policy for alpha nodes | OrderedReady |
alpha.replicaCount | Number of alpha nodes | 3 |
alpha.terminationGracePeriodSeconds | Alpha server pod termination grace period | 600 |
alpha.antiAffinity | Alpha anti-affinity policy | soft |
alpha.podAntiAffinitytopologyKey | Anti affinity topology key for zero nodes | kubernetes.io/hostname |
alpha.nodeAffinity | Alpha node affinity policy | {} |
alpha.extraEnvs | extra env vars | [] |
alpha.extraFlags | Alpha extra flags for command | "" |
alpha.configFile | Alpha config file | {} |
alpha.service.type | Alpha node service type | ClusterIP |
alpha.service.annotations | Alpha service annotations | {} |
alpha.service.publishNotReadyAddresses | publish address if pods not in ready state | true |
alpha.service.loadBalancerIP | specify static IP address for LoadBalancer type | "" |
alpha.service.externalTrafficPolicy | route external traffic to node-local or cluster-wide endpoints | "" |
alpha.service.loadBalancerSourceRanges | restrict CIDR IP addresses for a LoadBalancer type | [] |
alpha.ingress.enabled | Alpha ingress resource enabled | false |
alpha.ingress.hostname | Alpha ingress virtual hostname | nil |
alpha.ingress.annotations | Alpha ingress annotations | nil |
alpha.ingress.tls |
Deploy dgraph with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has dgraph 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 chartdgraph is pinned at v0.0.20 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