Skip to content

Latest commit

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Typesense Helm Chart

Typesense is an open source, typo tolerant search engine that delivers fast and relevant results out-of-the-box.

TL;DR;

$ helm repo add springboard https://helm-charts.springboardvr.com
$ helm install my-release springboard/typesense -n [namespace]

Introduction

This chart bootstraps a Typesense deployment on a Kubernetes cluster using the Helm package manager.

It deploys a Typesense server application and by default will create a persistent volume claim with the default storage class. Optionally, you can set up an Ingress resource to access your application.

This chart is heavily influenced by Bitnami charts best practices.

Prerequisites

  • Kubernetes 1.12+
  • Helm 3.0+
  • PV provisioner support in the underlying infrastructure
  • ReadWriteMany volumes for deployment scaling

Installing the Chart

To install the chart with the release name my-release:

$ helm repo add springboard https://helm-charts.springboardvr.com
$ helm install my-release springboard/typesense -n [namespace]

These commands deploy Typesense on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm ls -n [namespace]

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm del my-release -n [namespace]

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

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

ParameterDescriptionDefault
image.registryTypesense image registrydocker.io
image.repositoryTypesense image nametypesense/typesense
image.tagTypesense image tag0.13.0
image.pullPolicyTypesense image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
nameOverrideString to partially override typesense.fullname templatenil
fullnameOverrideString to fully override typesense.fullname templatenil
replicasNumber of replicas for the application1
applicationPortPort where the application will be running8108
extraEnvAny extra environment variables to be pass to the pods{}
envFromAn envFrom for the deployment, for adding a secret as ENV vars{}
affinityMap of node/pod affinities{} (The value is evaluated as a template)
nodeSelectornode labels for pod assignment{} (The value is evaluated as a template)
tolerationsTolerations for pod assignment[] (The value is evaluated as a template)
securityContext.enabledEnable security contexttrue
securityContext.fsGroupGroup ID for the container1001
securityContext.runAsUserUser ID for the container1001
resourcesResource requests and limits{}
persistence.enabledEnable persistence using PVCfalse
persistence.pathPath to persisted directory/app/data
persistence.accessModePVC Access ModeReadWriteOnce
persistence.storageClassStorage class for dynamic provisioningnil
persistence.sizePVC Storage Request1Gi
service.typeKubernetes Service typeClusterIP
service.portKubernetes Service port80
service.annotationsAnnotations for the Service{}
service.loadBalancerIPLoadBalancer IP if Service type is LoadBalancernil
service.nodePortnodePort if Service type is LoadBalancer or nodePortnil
ingress.enabledEnable ingress controller resourcefalse
ingress.hosts[0].nameHostname to your Typesense installationtypesense.local
ingress.hosts[0].pathPath within the url structure/
ingress.hosts[0].tlsUtilize TLS backend in ingressfalse
ingress.hosts[0].certManagerAdd annotations for cert-managerfalse
ingress.hosts[0].tlsSecretTLS Secret (certificates)typesense.local-tls-secret
ingress.hosts[0].annotationsAnnotations for this host's ingress record[]
ingress.secrets[0].nameTLS Secret Namenil
ingress.secrets[0].certificateTLS Secret Certificatenil
ingress.secrets[0].keyTLS Secret Keynil

The above parameters map to the env variables defined in spittal/typesense.

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

$ helm install my-release \ --set repository=https://github.com/jbianquetti-nami/simple-typesense-app.git,replicas=2 \ springboard/typesense

The above command clones the remote git repository to the /app/ directory of the container. Additionally it sets the number of replicas to 2.

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

$ helm install my-release -f values.yaml springboard/typesense

Tip: You can use the default values.yaml

Configuration and installation details

Typesense settings

You can configure any typesense setting using the envFrom parameter like so. Learn about envFrom

envFrom:
- configMapRef:
name: name-of-config-map-with-env-vars

Or you can do individual settings like.

extraArgs:
- name: TYPESENSE_API_PORTvalue: 8080

A list of the available options can be found on the Typesense website.

Set up an Ingress controller

First install the nginx-ingress controller and then deploy the Typesense Helm chart with the following parameters:

ingress.enabled=trueingress.host=example.comservice.type=ClusterIP

Configure TLS termination for your ingress controller

You must manually create a secret containing the certificate and key for your domain. Then ensure you deploy the Helm chart with the following ingress configuration:

ingress:
enabled: falsepath: /host: example.comannotations:
kubernetes.io/ingress.class: nginxtls:
hosts:
- example.com

About

Helm Chart for Typesense

Resources

Stars

22 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages