Helm chartv0.4.14App 0.2.0-stagv1.2Verified publisher

A Helm chart to install Hunting Server

About this chart

Hunting Helm Chart

A Helm chart for Hunting Server - A data processing and analysis platform that provides APIs for data manipulation, transformation, and machine learning workflows.

Overview

Hunting Server is a FastAPI-based application designed for data processing and analysis tasks. It provides a comprehensive platform for:

  • Data Processing: Handle various data formats and transformations
  • API Services: RESTful APIs for data manipulation and analysis
  • Task Management: Celery-based distributed task processing with Redis broker
  • Monitoring: Flower integration for task monitoring and management
  • Database Integration: MongoDB support for data persistence
  • Scalability: Horizontal pod autoscaling and worker management

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure (if persistence is enabled for dependencies)

Installation

Add Helm Repository

helm repo add factly https://factly.github.io/helm-charts
helm repo update

Install Chart

# Install with default values
helm install hunting factly/hunting

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

# Install in specific namespace
helm install hunting factly/hunting --namespace hunting --create-namespace

Uninstallation

helm uninstall hunting

Configuration

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

Global Parameters

ParameterDescriptionDefault
nameOverrideString to partially override hunting.fullname""
fullnameOverrideString to fully override hunting.fullname""
imagePullSecretsGlobal Docker registry secret names as an array[]

Image Parameters

ParameterDescriptionDefault
image.repositoryHunting image repositoryfactly/hunting
image.pullPolicyImage pull policyIfNotPresent
image.tagHunting image tag (overrides the image tag whose default is the chart appVersion)""

Deployment Parameters

ParameterDescriptionDefault
replicaCountNumber of Hunting replicas1
autoscaling.enabledEnable horizontal pod autoscalerfalse
autoscaling.minReplicasMinimum number of replicas2
autoscaling.maxReplicasMaximum number of replicas10
autoscaling.targetCPUUtilizationPercentageTarget CPU utilization percentage80
autoscaling.targetMemoryUtilizationPercentageTarget memory utilization percentage80

Environment Variables

ParameterDescriptionDefault
envArray of environment variables for Hunting configurationSee values.yaml

Core Environment Variables

Environment VariableDescriptionDefault
PROJECT_NAMEProject name for the application"Hunting Server"
API_V1_STRAPI version string prefix"/api/v1"
MODEApplication mode"production"
EXAMPLE_URLExample dataset URL for testing"https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv"

Database Configuration

Environment VariableDescriptionDefault
MONGODB_HOSTMongoDB host address"hunting-mongodb.default.svc.cluster.local"
MONGODB_PORTMongoDB port"27017"
MONGODB_DATABASEMongoDB database name"hunting"
MONGODB_USERMongoDB username"root"
MONGODB_PASSWORDMongoDB password"password"

Optional S3 Configuration

The chart supports S3 storage configuration through environment variables (commented by default):

  • S3_ENDPOINT: S3 endpoint URL
  • S3_BUCKET: S3 bucket name
  • S3_KEY: S3 access key
  • S3_SECRET: S3 secret key
  • S3_SECURE: Enable secure S3 connection
  • S3_ENDPOINT_TARGET: Target S3 endpoint for data transfer
  • S3_BUCKET_TARGET: Target S3 bucket
  • S3_KEY_TARGET: Target S3 access key
  • S3_SECRET_TARGET: Target S3 secret key
  • S3_SECURE_TARGET: Enable secure connection for target S3

Service Parameters

ParameterDescriptionDefault
service.typeKubernetes service typeClusterIP
service.portService port8000
service.additionalLabelsAdditional labels for service{}

ServiceAccount Parameters

ParameterDescriptionDefault
serviceAccount.createSpecifies whether a service account should be createdtrue
serviceAccount.annotationsAnnotations to add to the service account{}
serviceAccount.nameThe name of the service account to use"hunting"

Ingress Parameters

ParameterDescriptionDefault
ingress.enabledEnable ingress controller resourcefalse
ingress.classNameIngress class name""
ingress.annotationsIngress annotations{}
ingress.hostsIngress hostnames[{host: "chart-example.local", paths: [{path: "/", pathType: "ImplementationSpecific"}]}]
ingress.tlsIngress TLS configuration[]

Worker Configuration

ParameterDescriptionDefault
worker.enabledEnable Celery worker deploymentfalse
worker.replicaCountNumber of worker replicas1
worker.autoscaling.enabledEnable worker autoscalingfalse
worker.autoscaling.minReplicasMinimum worker replicas2
worker.autoscaling.maxReplicasMaximum worker replicas10
worker.autoscaling.targetCPUUtilizationPercentageWorker target CPU utilization80
worker.autoscaling.targetMemoryUtilizationPercentageWorker target memory utilization80
worker.resources.limits.cpuWorker CPU limit1
worker.resources.limits.memoryWorker memory limit4096Mi
worker.resources.requests.cpuWorker CPU request100m
worker.resources.requests.memoryWorker memory request128Mi

Flower Configuration (Task Monitoring)

ParameterDescriptionDefault
flower.enabledEnable Flower for task monitoringfalse
flower.replicaCountNumber of Flower replicas1
flower.autoscaling.enabledEnable Flower autoscalingfalse
flower.envEnvironment variables for Flower[]
flower.service.typeFlower service typeClusterIP
flower.service.portFlower service port5555
flower.resources.limits.cpuFlower CPU limit0.5
flower.resources.limits.memoryFlower memory limit2Gi
flower.resources.requests.cpuFlower CPU request25m
flower.resources.requests.memoryFlower memory request100Mi
flower.ingress.enabledEnable Flower ingressfalse
flower.ingress.hostsFlower ingress hosts[{host: "chart-example.local", paths: [{path: "/", pathType: "ImplementationSpecific"}]}]

Resource Parameters

ParameterDescriptionDefault
resources.limits.cpuCPU limit1
resources.limits.memoryMemory limit2048Mi
resources.requests.cpuCPU request100m
resources.requests.memoryMemory request128Mi
nodeSelectorNode labels for pod assignment{}
tolerationsTolerations for pod assignment[]
affinityAffinity settings for pod assignment{}
podAnnotationsAnnotations to add to pods{}
podSecurityContextSecurity context for pods{}
securityContextSecurity context for containers{}

Dependencies

MongoDB

ParameterDescriptionDefault
mongodb.enabledEnable MongoDB dependencyfalse
mongodb.auth.enabledEnable MongoDB authenticationtrue
mongodb.auth.rootPasswordMongoDB root password"password"

Redis

ParameterDescriptionDefault
redis.enabledEnable Redis dependencyfalse
redis.architectureRedis architecture"standalone"
redis.auth.passwordRedis authentication password"password"

Examples

Basic Installation

# values.yaml
env:
  - name: PROJECT_NAME
    value: "My Hunting Server"
  - name: MONGODB_HOST
    value: "my-mongodb.default.svc.cluster.local"
  - name: MONGODB_PASSWORD
    value: "my-secure-password"

ingress:
  enabled: true
  hosts:
    - host: hunting.mydomain.com
      paths:
        - path: /
          pathType: ImplementationSpecific

Installation with MongoDB and Redis Dependencies

# values.yaml
mongodb:
  enabled: true
  auth:
    enabled: true
    rootPassword: "secure-mongo-password"

redis:
  enabled: true
  auth:
    password: "secure-redis-password"

env:
  - name: MONGODB_PASSWORD
    value: "secure-mongo-password"

Installation with Worker and Flower

# values.yaml
worker:
  enabled: true
  replicaCount: 3
  autoscaling:
    enabled: true
    minReplicas: 2
    maxReplicas: 10

flower:
  enabled: true
  ingress:
    enabled: true
    hosts:
      - host: flower.mydomain.com
        paths:
          - path: /
            pathType: ImplementationSpecific

redis:
  enabled: true
  auth:
    password: "redis-password"

Installation with S3 Configuration

# values.yaml
env:
  - name: S3_ENDPOINT
    value: "s3.amazonaws.com"
  - name: S3_BUCKET
    value: "my-hunting-bucket"
  - name: S3_KEY
    value: "AKIAIOSFODNN7EXAMPLE"
  - name: S3_SECRET
    value: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
  - name: S3_SECURE
    value: "True"

Architecture

The Hunting chart can deploy the following components:

  1. Main Application: FastAPI-based server handling HTTP requests
  2. Celery Workers: Distributed task processing (optional)
  3. Flower: Web-based tool for monitoring Celery tasks (optional)
  4. MongoDB: Document database for data persistence (optional dependency)
  5. Redis: In-memory data store used as Celery broker (optional dependency)

Security Considerations

  1. Database Passwords: Always change default passwords for MongoDB and Redis
  2. S3 Credentials: Store S3 credentials securely using Kubernetes secrets
  3. Service Account: The chart creates a dedicated service account for the application
  4. Network Policies: Consider implementing network policies to restrict inter-pod communication

Troubleshooting

Common Issues

  1. MongoDB Connection Issues: Ensure MongoDB is accessible and credentials are correct
  2. Redis Connection Issues: Verify Redis is running and authentication is properly configured
  3. Worker Tasks Not Processing: Check Redis connectivity and worker logs
  4. S3 Upload Failures: Verify S3 credentials and bucket permissions

Logs

To view application logs:

# Main application logs
kubectl logs -f deployment/hunting

# Worker logs (if enabled)
kubectl logs -f deployment/hunting-celery

# Flower logs (if enabled)
kubectl logs -f deployment/hunting-flower

Health Checks

The application exposes health check endpoints that can be used for monitoring:

  • Main application health: http://hunting:8000/health
  • Flower monitoring: http://hunting-flower:5555 (if enabled)

Links

License

This Helm chart is licensed under the MIT License.

Deploy hunting with OpenTenant

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