ratel

by Helm

Helm chartv25.0.3App v25.0.3

A Helm chart for Kubernetes

About this chart

Ratel

TL;DR

helm repo add dgraph https://charts.dgraph.io
helm install "my-ratel" --namespace "my-ratel" dgraph/ratel

Introduction

Ratel is a SPA (single-page-application) React client that runs locally from your web browser. The server component is a small web server that hosts the client application, which is then downloaed into your browser locally. There is no server-to-server connection.

Prequisites

  • Kubernetes 1.20+
  • Helm 3.0+
  • Dgraph v21.12.0+

Restricting Ratel

For best practices in security, it is recommended that you install Ratel separately instead of bundled together with the Dgraph. This small web server should be installed in a namespace that is separate from Dgraph server. If your Kubernetes cluster supports the network policies feature, such as Calico, you can use these to restrict traffic between the web service hosting Ratel and Dgraph servers.

Given this, use thie helm chart to install Ratel separately from Dgraph

Accessing Ratel

In order for the Ratel client to connect to the Dgraph Alpha server, you can connect through a tunnel, such as VPN, or connect Dgraph Alpha to an endpoint, such as service of type LoadBalancer or use an ingress resource. See Dgraph helm chart for further information on such configurations.

Configuration

The following table lists the configurable parameters of the ratel chart and their default values.

ParameterDescriptionDefault
replicaCountnumber of Kubernetes replicas1
image.repositoryContainer repository namedgraph/dgraph-lambda
image.pullPolicyContainer image pull policyIfNotPresent
image.tagContainer image tagv21.12.0
imagePullSecretsImage pull secrets auth tokens used to access a private registry[]
nameOverrideName override of the default chart name""
namespaceOverrideNamespace overridenil
fullnameOverrideFull Name override of the release name + chart name""
serviceAccount.createSpecifies if service account should be createdtrue
serviceAccount.annotationsService Account annotations{}
serviceAccount.nameService Account name""
podAnnotationsAdditional pod annotations{}
podSecurityContextPod Security context to define privilege and access control{}
securityContextContainer Security context to define privilege and access control{}
service.typeService type (ClusterIP, NodePort, LoadBalancer)ClusterIP
service.portService inbound port80
ingress.enabledIngress enabledfalse
ingress.annotationsIngress annotations{}
ingress.hostsIngress hosts list to configure virtual hosts + routes to the servicesee values.yaml
ingress.tlsIngress tls configuration[]
resourcesResource limites and requests{}
nodeSelectorNode selection constraints{}
tolerationsAllow scheduling pods onto nodes matching specified taints[]
affinityAffinity configuration to allow nodes to scheduled on desired nodes{}

Deploy ratel with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ratel 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 chartratel is pinned at v25.0.3 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