unleash-edge
by Unleash Org
A Helm chart for deploying Unleash Edge to kubernetes
About this chart
Unleash Edge
Unleash Edge offers a way to use Unleash in client-side applications, such as single page and native apps. It can also be used for server-side applications, taking the place of the main Unleash server. This has the added benefit of not triggering database operations for every client refresh.
See the reference documentation for more on the reasons why you might want to deploy Edge in your cluster.
This chart bootstraps an Unleash Edge deployment on a Kubernetes cluster using the Helm package manager.
No extra configuration is needed besides pointing edge to an Upstream URL.
Prerequisites
- Kubernetes 1.23+
- Helm 3+
Get Repository Info
helm repo add unleash https://docs.getunleash.io/helm-charts
helm repo update
See the helm repository docs for command documentation.
Install Chart
helm install unleash-edge unleash/unleash-edge
See configuration below.
See helm install for command documentation.
Dependencies
You'll need a running Unleash instance in your kubernetes cluster, or a hosted instance (Get one at https://www.getunleash.io).
Uninstall Chart
helm uninstall unleash-edge
This removes all the Kubernetes components associated with the chart and deletes the release.
See helm uninstall for command documentation.
Upgrading Chart
helm upgrade unleash-edge unleash/unleash-edge --install
See helm upgrade for command documentation.
Configuration
See description of configuration in the values.yaml
Use initContainers to add Kubernetes init containers to the Edge pod. This can be combined with volumes and volumeMounts when an init container needs to prepare files for the main Edge container.
To delay shutdown during pod termination, you can optionally configure a preStop hook together with terminationGracePeriodSeconds:
readinessProbe:
httpGet:
path: /internal-backstage/ready
port: http
initialDelaySeconds: 10
timeoutSeconds: 5
periodSeconds: 5
successThreshold: 1
failureThreshold: 1
livenessProbe:
httpGet:
path: /internal-backstage/health
port: http
initialDelaySeconds: 10
timeoutSeconds: 5
periodSeconds: 5
successThreshold: 1
failureThreshold: 5
terminationGracePeriodSeconds: 60
lifecycle:
preStop:
exec:
command:
- /bin/sh
- -c
- sleep 30
This keeps the container alive briefly after Kubernetes starts terminating the pod, which can reduce traffic reaching a pod that is already on its way out.
Deploy unleash-edge with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has unleash-edge 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 chartunleash-edge is pinned at v3.2.1 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