dgraph

by joaquinito2051

Helm chartv0.0.20App v21.12.0

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.

ParameterDescriptionDefault
image.registryContainer registry namedocker.io
image.repositoryContainer image namedgraph/dgraph
image.tagContainer image tagv21.03.1
image.pullPolicyContainer pull policyIfNotPresent
nameOverrideDeployment name override (will append the release name)nil
fullnameOverrideDeployment full name override (the release name is ignored)nil
zero.nameZero component namezero
zero.metrics.enabledAdd annotations for Prometheus metric scrapingtrue
zero.extraAnnotationsSpecify annotations for template metadata{}
zero.updateStrategyStrategy for upgrading zero nodesRollingUpdate
zero.schedulerNameConfigure an explicit schedulernil
zero.monitorLabelMonitor label for zero, used by prometheus.zero-dgraph-io
zero.rollingUpdatePartitionPartition update strategynil
zero.podManagementPolicyPod management policy for zero nodesOrderedReady
zero.replicaCountNumber of zero nodes3
zero.shardReplicaCountMax number of replicas per data shard5
zero.terminationGracePeriodSecondsZero server pod termination grace period60
zero.antiAffinityZero anti-affinity policysoft
zero.podAntiAffinitytopologyKeyAnti affinity topology key for zero nodeskubernetes.io/hostname
zero.nodeAffinityZero node affinity policy{}
zero.extraEnvsextra env vars[]
zero.extraFlagsZero extra flags for command line""
zero.configFileZero config file{}
zero.service.typeZero service typeClusterIP
zero.service.annotationsZero service annotations{}
zero.service.publishNotReadyAddressespublish address if pods not in ready statetrue
zero.service.loadBalancerIPspecify static IP address for LoadBalancer type""
zero.service.externalTrafficPolicyroute external traffic to node-local or cluster-wide endpoints""
zero.service.loadBalancerSourceRangesrestrict CIDR IP addresses for a LoadBalancer type[]
zero.securityContext.enabledSecurity context for zero nodes enabledfalse
zero.securityContext.fsGroupGroup id of the zero container1001
zero.securityContext.runAsUserUser ID for the zero container1001
zero.persistence.enabledEnable persistence for zero using PVCtrue
zero.persistence.storageClassPVC Storage Class for zero volumenil
zero.persistence.accessModesPVC Access Mode for zero volume['ReadWriteOnce']
zero.persistence.sizePVC Storage Request for zero volume32Gi
zero.nodeSelectorNode labels for zero pod assignment{}
zero.tolerationsZero tolerations[]
zero.resources.requests.memoryZero pod resources memory requests100Mi
zero.startupProbeZero startup probes (NOTE: only supported in Kubernetes v1.16+)See values.yaml for defaults
zero.livenessProbeZero liveness probesSee values.yaml for defaults
zero.readinessProbeZero readiness probesSee values.yaml for defaults
zero.customStartupProbeZero custom startup probes (if zero.startupProbe not enabled){}
zero.customLivenessProbeZero custom liveness probes (if zero.livenessProbe not enabled){}
zero.customReadinessProbeZero custom readiness probes (if zero.readinessProbe not enabled){}
alpha.nameAlpha component namealpha
alpha.metrics.enabledAdd annotations for Prometheus metric scrapingtrue
alpha.extraAnnotationsSpecify annotations for template metadata{}
alpha.monitorLabelMonitor label for alpha, used by prometheus.alpha-dgraph-io
alpha.updateStrategyStrategy for upgrading alpha nodesRollingUpdate
alpha.schedulerNameConfigure an explicit schedulernil
alpha.rollingUpdatePartitionPartition update strategynil
alpha.podManagementPolicyPod management policy for alpha nodesOrderedReady
alpha.replicaCountNumber of alpha nodes3
alpha.terminationGracePeriodSecondsAlpha server pod termination grace period600
alpha.antiAffinityAlpha anti-affinity policysoft
alpha.podAntiAffinitytopologyKeyAnti affinity topology key for zero nodeskubernetes.io/hostname
alpha.nodeAffinityAlpha node affinity policy{}
alpha.extraEnvsextra env vars[]
alpha.extraFlagsAlpha extra flags for command""
alpha.configFileAlpha config file{}
alpha.service.typeAlpha node service typeClusterIP
alpha.service.annotationsAlpha service annotations{}
alpha.service.publishNotReadyAddressespublish address if pods not in ready statetrue
alpha.service.loadBalancerIPspecify static IP address for LoadBalancer type""
alpha.service.externalTrafficPolicyroute external traffic to node-local or cluster-wide endpoints""
alpha.service.loadBalancerSourceRangesrestrict CIDR IP addresses for a LoadBalancer type[]
alpha.ingress.enabledAlpha ingress resource enabledfalse
alpha.ingress.hostnameAlpha ingress virtual hostnamenil
alpha.ingress.annotationsAlpha ingress annotationsnil
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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartdgraph is pinned at v0.0.20 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