rilusmahmud/typesense

By rilusmahmud

Updated about 2 months ago

Helm
0

289

rilusmahmud/typesense repository overview

Typesense Helm Chart

A Helm chart for deploying Typesense search engine on Kubernetes.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.0+
  • PV provisioner support in the underlying infrastructure (for persistent storage)

Installation

Install the chart
# Install with default values
helm install typesense ./typesense

# Install with custom values
helm install typesense ./typesense -f custom-values.yaml

# Install in a specific namespace
helm install typesense ./typesense --namespace search --create-namespace
Upgrade the chart
helm upgrade typesense ./typesense
Uninstall the chart
helm uninstall typesense

Configuration

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

ParameterDescriptionDefault
image.repositoryTypesense image repositorytypesense/typesense
image.tagTypesense image tag28.0
image.pullPolicyImage pull policyIfNotPresent
replicaCountNumber of replicas1
service.typeService typeLoadBalancer
service.portService port8108
service.targetPortContainer target port8108
config.hostTypesense hostlocalhost
config.portTypesense port8108
config.protocolTypesense protocolhttp
config.collectionNameDefault collection namespl_locations
config.logLevelLog levelinfo
apiKeyTypesense API keyM@aps4world!
serverArgs.dataDirData directory path/data
serverArgs.listenPortListen port8108
serverArgs.enableCorsEnable CORStrue
serverArgs.memoryAddressSpaceLimitMbMemory limit in MB16384
serverArgs.enableMmapEnable memory mappingtrue
serverArgs.logLevelServer log levelinfo
resources.requests.memoryMemory request2Gi
resources.requests.cpuCPU request1000m
resources.limits.memoryMemory limit16Gi
resources.limits.cpuCPU limit8000m
persistence.enabledEnable persistencetrue
persistence.storageClassNameStorage class namestandard-rwo
persistence.accessModesAccess modes[ReadWriteOnce]
persistence.sizeStorage size512Gi
livenessProbe.enabledEnable liveness probetrue
readinessProbe.enabledEnable readiness probetrue

Examples

Production Deployment with Custom API Key
helm install typesense ./typesense \
  --set apiKey="your-secure-api-key-here" \
  --set service.type=ClusterIP \
  --set persistence.size=1Ti
Development Deployment without Persistence
helm install typesense ./typesense \
  --set persistence.enabled=false \
  --set resources.requests.memory=512Mi \
  --set resources.limits.memory=2Gi
Custom Values File

Create a custom-values.yaml file:

replicaCount: 1

image:
  tag: "28.0"

service:
  type: ClusterIP

apiKey: "your-production-api-key"

config:
  collectionName: "my_custom_collection"
  logLevel: "debug"

resources:
  requests:
    memory: "4Gi"
    cpu: "2000m"
  limits:
    memory: "32Gi"
    cpu: "16000m"

persistence:
  size: 1Ti
  storageClassName: "fast-ssd"

nodeSelector:
  disktype: ssd

Then install:

helm install typesense ./typesense -f custom-values.yaml

Security Considerations

  1. API Key Management: Always change the default API key for production deployments
  2. Secret Management: Consider using external secret management solutions like:
    • Sealed Secrets
    • External Secrets Operator
    • HashiCorp Vault
  3. Network Policies: Implement network policies to restrict access to Typesense
  4. RBAC: Use Kubernetes RBAC to control access to the secret
Example: Override API Key During Installation
helm install typesense ./typesense \
  --set apiKey="$(openssl rand -base64 32)"

Persistence

This chart uses a PersistentVolumeClaim for data persistence. Make sure your cluster has a storage class configured.

To disable persistence:

helm install typesense ./typesense --set persistence.enabled=false

Health Checks

The chart includes liveness and readiness probes that check the /health endpoint. You can disable them:

livenessProbe:
  enabled: false

readinessProbe:
  enabled: false

Accessing Typesense

After installation, follow the instructions in the NOTES output to access your Typesense instance.

Port Forwarding (for ClusterIP service)
kubectl port-forward svc/typesense 8108:8108
curl http://localhost:8108/health
LoadBalancer
kubectl get svc typesense
# Use the EXTERNAL-IP shown
curl http://<EXTERNAL-IP>:8108/health

Troubleshooting

Check pod logs
kubectl logs -l app.kubernetes.io/name=typesense
Check pod status
kubectl get pods -l app.kubernetes.io/name=typesense
Describe the deployment
kubectl describe deployment typesense

Contributing

Contributions are welcome! Please submit pull requests or issues.

License

This Helm chart is provided as-is.

Tag summary

Content type

Helm

Digest

sha256:105d1746b

Size

7 kB

Last updated

about 2 months ago

helm pull oci://registry-1.docker.io/rilusmahmud/typesense --version 1.2.1