rilusmahmud/spl-search-api

By rilusmahmud

Updated 7 days ago

search & reverse API app

Helm
Image
0

1.3K

rilusmahmud/spl-search-api repository overview

SPL Search API Helm Chart

A Helm chart for deploying SPL Search API - a FastAPI-based geospatial search service.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.0+
  • PV provisioner support in the underlying infrastructure (for persistent volumes)
  • MongoDB instance (deployed separately)
  • Typesense instance (deployed separately)

Installing the Chart

To install the chart with the release name spl-search-api:

helm install spl-search-api ./spl-search-api

To install with custom values:

helm install spl-search-api ./spl-search-api -f custom-values.yaml

Uninstalling the Chart

To uninstall the spl-search-api deployment:

helm uninstall spl-search-api

Configuration

The following table lists the configurable parameters of the SPL Search API chart and their default values.

Common Parameters
ParameterDescriptionDefault
replicaCountNumber of replicas1
image.repositoryImage repositoryrilusmahmud/spl-search-api
image.tagImage tagv0.1
image.pullPolicyImage pull policyAlways
nameOverrideOverride chart name""
fullnameOverrideOverride full name""
Service Parameters
ParameterDescriptionDefault
service.typeKubernetes service typeLoadBalancer
service.portService port8080
service.targetPortContainer port8101
Resource Parameters
ParameterDescriptionDefault
resources.limits.cpuCPU limit2000m
resources.limits.memoryMemory limit4Gi
resources.requests.cpuCPU request500m
resources.requests.memoryMemory request512Mi
Persistence Parameters
ParameterDescriptionDefault
persistence.enabledEnable persistencetrue
persistence.storageClassNameStorage class namestandard-rwo
persistence.accessModeAccess modeReadWriteOnce
persistence.sizeVolume size5Gi
persistence.mountPathMount path/app/logs
Autoscaling Parameters
ParameterDescriptionDefault
autoscaling.enabledEnable HPAfalse
autoscaling.minReplicasMinimum replicas1
autoscaling.maxReplicasMaximum replicas10
autoscaling.targetCPUUtilizationPercentageTarget CPU %80
autoscaling.targetMemoryUtilizationPercentageTarget Memory %80
Application Configuration
ParameterDescriptionDefault
config.appNameApplication nameGeoSearch API
config.debugDebug modefalse
config.typesenseHostTypesense hosttypesense
config.typesensePortTypesense port8108
config.mongoHostMongoDB hostmongodb-0.mongodb
config.mongoPortMongoDB port27017
Secrets
ParameterDescriptionDefault
secrets.typesenseApiKeyTypesense API keyM@aps4world!
secrets.secretKeyJWT secret key2v6udemsno3b0dwa2ui3b8ddnarou3k
secrets.mongoUsernameMongoDB usernamedbadmin
secrets.mongoPasswordMongoDB passwordHxPlsytQ3Rt

IMPORTANT: Do not use the default secrets in production. Override them using one of these methods:

  1. Using --set flag:

    helm install spl-search-api ./spl-search-api \
      --set secrets.secretKey=your-secret-key \
      --set secrets.mongoPassword=your-password
    
  2. Using a custom values file:

    helm install spl-search-api ./spl-search-api -f custom-values.yaml
    
  3. Using external secret management (recommended for production):

    • Sealed Secrets
    • External Secrets Operator
    • HashiCorp Vault
    • Cloud provider secret managers

Examples

Basic Installation
helm install spl-search-api ./spl-search-api
Installation with Custom Configuration
helm install spl-search-api ./spl-search-api \
  --set replicaCount=3 \
  --set service.type=ClusterIP \
  --set autoscaling.enabled=true \
  --set autoscaling.minReplicas=2 \
  --set autoscaling.maxReplicas=5
Installation with Custom Secrets
helm install spl-search-api ./spl-search-api \
  --set secrets.secretKey="$(openssl rand -base64 32)" \
  --set secrets.typesenseApiKey="your-typesense-key" \
  --set secrets.mongoUsername="produser" \
  --set secrets.mongoPassword="prodpassword"
Upgrade Existing Release
helm upgrade spl-search-api ./spl-search-api -f custom-values.yaml
Dry Run (test installation without applying)
helm install spl-search-api ./spl-search-api --dry-run --debug

Verifying the Installation

After installation, verify the deployment:

# Check deployment status
kubectl get deployment spl-search-api

# Check pods
kubectl get pods -l app.kubernetes.io/name=spl-search-api

# Check service
kubectl get svc spl-search-api

# View logs
kubectl logs -f deployment/spl-search-api

Accessing the API

LoadBalancer (default)
export SERVICE_IP=$(kubectl get svc spl-search-api -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo "API URL: http://$SERVICE_IP:8080"
echo "API Docs: http://$SERVICE_IP:8080/docs"
ClusterIP (port-forward)
kubectl port-forward svc/spl-search-api 8080:8080
# Access at http://localhost:8080

Dependencies

This chart requires the following external services:

  • MongoDB: For data persistence
  • Typesense: For search functionality

Make sure these services are deployed and accessible before installing this chart.

Troubleshooting

Pods not starting
# Check pod events
kubectl describe pod <pod-name>

# Check logs
kubectl logs <pod-name>
Connection issues with MongoDB or Typesense
  1. Verify service names and ports in values.yaml
  2. Check network policies
  3. Verify credentials in secrets
PVC issues
# Check PVC status
kubectl get pvc

# Check storage class
kubectl get storageclass

License

This chart is provided as-is for deploying the SPL Search API.

Tag summary

Content type

Image

Digest

sha256:50ec4f929

Size

119.6 MB

Last updated

7 days ago

docker pull rilusmahmud/spl-search-api:1.8.3