From f1e40533f0da1f3c69e134649a8a513f17a49ef8 Mon Sep 17 00:00:00 2001 From: ZaynJarvis Date: Sun, 15 Feb 2026 11:59:43 +0800 Subject: [PATCH] feat: add Kubernetes Helm chart for OpenViking deployment Add a production-ready Helm chart for deploying OpenViking on Kubernetes with support for GCP and AWS cloud providers. Features: - LoadBalancer service with cloud-specific annotations - Support for GCP and AWS via values.yaml cloudProvider setting - Secret management for ov.conf configuration - Health checks (liveness and readiness probes) - Optional HPA for autoscaling - Optional PVC for persistent storage - Uses uv container for streamlined deployment - Comprehensive documentation Usage: helm install openviking ./deploy/helm/openviking \ --set cloudProvider=gcp \ --set openviking.config.embedding.dense.api_key=YOUR_KEY --- examples/k8s-helm/.helmignore | 23 ++ examples/k8s-helm/Chart.yaml | 17 ++ examples/k8s-helm/README.md | 272 ++++++++++++++++++ examples/k8s-helm/templates/NOTES.txt | 53 ++++ examples/k8s-helm/templates/_helpers.tpl | 79 +++++ examples/k8s-helm/templates/deployment.yaml | 107 +++++++ examples/k8s-helm/templates/hpa.yaml | 32 +++ examples/k8s-helm/templates/pvc.yaml | 17 ++ examples/k8s-helm/templates/secret.yaml | 10 + examples/k8s-helm/templates/service.yaml | 17 ++ .../k8s-helm/templates/serviceaccount.yaml | 13 + examples/k8s-helm/values.yaml | 249 ++++++++++++++++ 12 files changed, 889 insertions(+) create mode 100644 examples/k8s-helm/.helmignore create mode 100644 examples/k8s-helm/Chart.yaml create mode 100644 examples/k8s-helm/README.md create mode 100644 examples/k8s-helm/templates/NOTES.txt create mode 100644 examples/k8s-helm/templates/_helpers.tpl create mode 100644 examples/k8s-helm/templates/deployment.yaml create mode 100644 examples/k8s-helm/templates/hpa.yaml create mode 100644 examples/k8s-helm/templates/pvc.yaml create mode 100644 examples/k8s-helm/templates/secret.yaml create mode 100644 examples/k8s-helm/templates/service.yaml create mode 100644 examples/k8s-helm/templates/serviceaccount.yaml create mode 100644 examples/k8s-helm/values.yaml diff --git a/examples/k8s-helm/.helmignore b/examples/k8s-helm/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/examples/k8s-helm/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/examples/k8s-helm/Chart.yaml b/examples/k8s-helm/Chart.yaml new file mode 100644 index 00000000..be7f6635 --- /dev/null +++ b/examples/k8s-helm/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v2 +name: openviking +description: A Helm chart for OpenViking - RAG and semantic search via OpenViking Context Database MCP server +type: application +version: 0.1.0 +appVersion: "0.1.0" +keywords: + - openviking + - rag + - semantic-search + - mcp + - knowledge-base +home: https://github.com/volcengine/OpenViking +sources: + - https://github.com/volcengine/OpenViking +maintainers: + - name: OpenViking Contributors diff --git a/examples/k8s-helm/README.md b/examples/k8s-helm/README.md new file mode 100644 index 00000000..86479be9 --- /dev/null +++ b/examples/k8s-helm/README.md @@ -0,0 +1,272 @@ +# OpenViking Helm Chart + +This Helm chart deploys OpenViking on Kubernetes, providing a scalable and production-ready RAG (Retrieval-Augmented Generation) and semantic search service. + +## Overview + +[OpenViking](https://github.com/volcengine/OpenViking) is an open-source RAG and semantic search engine that serves as a Context Database MCP (Model Context Protocol) server. This Helm chart enables easy deployment on Kubernetes clusters with support for major cloud providers. + +## Prerequisites + +- Kubernetes 1.24+ +- Helm 3.8+ +- A valid Volcengine API key for embedding and VLM services + +## Installation + +### Add the Helm repository (when published) + +```bash +helm repo add openviking https://volcengine.github.io/openviking +helm repo update +``` + +### Install from local chart + +```bash +# Clone the repository +git clone https://github.com/volcengine/OpenViking.git +cd OpenViking/deploy/helm + +# Install with default values +helm install openviking ./openviking + +# Install with custom values +helm install openviking ./openviking -f my-values.yaml +``` + +### Quick Start + +```bash +# GCP deployment +helm install openviking ./openviking \ + --set cloudProvider=gcp \ + --set openviking.config.embedding.dense.api_key=YOUR_API_KEY + +# AWS deployment +helm install openviking ./openviking \ + --set cloudProvider=aws \ + --set openviking.config.embedding.dense.api_key=YOUR_API_KEY +``` + +## Configuration + +### Cloud Provider Support + +The chart supports automatic LoadBalancer annotation configuration for major cloud providers: + +| Provider | Configuration Value | +|----------|-------------------| +| Google Cloud Platform | `cloudProvider: gcp` | +| Amazon Web Services | `cloudProvider: aws` | +| Other/Generic | `cloudProvider: ""` (default) | + +### Key Configuration Options + +| Parameter | Description | Default | +|-----------|-------------|---------| +| `cloudProvider` | Cloud provider for LoadBalancer annotations | `""` | +| `replicaCount` | Number of replicas | `1` | +| `image.repository` | Container image repository | `ghcr.io/astral-sh/uv` | +| `image.tag` | Container image tag | `python3.12-bookworm` | +| `service.type` | Kubernetes service type | `LoadBalancer` | +| `service.port` | Service port | `1933` | +| `openviking.config.server.api_key` | API key for authentication | `null` | +| `openviking.config.embedding.dense.api_key` | Volcengine API key | `null` | + +### OpenViking Configuration + +All OpenViking configuration options from `ov.conf` are available under `openviking.config`. See `values.yaml` for the complete default configuration. + +### Embedding Configuration + +The embedding service requires a Volcengine API key: + +```yaml +openviking: + config: + embedding: + dense: + api_key: "your-api-key-here" + api_base: "https://ark.cn-beijing.volces.com/api/v3" + model: "doubao-embedding-vision-250615" +``` + +### VLM Configuration + +For vision-language model support: + +```yaml +openviking: + config: + vlm: + api_key: "your-api-key-here" + api_base: "https://ark.cn-beijing.volces.com/api/v3" + model: "doubao-seed-1-8-251228" +``` + +## Storage + +### Default (emptyDir) + +By default, the chart uses `emptyDir` volumes for data storage. This is suitable for development and testing but **data will be lost** when pods are restarted. + +### Persistent Storage (Optional) + +To enable persistent storage with PVC: + +```yaml +openviking: + dataVolume: + enabled: true + usePVC: true + size: 50Gi + storageClassName: standard + accessModes: + - ReadWriteOnce +``` + +## Security + +### API Key Authentication + +Enable API key authentication to secure your OpenViking server: + +```yaml +openviking: + config: + server: + api_key: "your-secure-api-key" + cors_origins: + - "https://your-domain.com" +``` + +### Secrets Management + +For production deployments, use Kubernetes secrets or external secret management: + +```bash +# Create secret from literal +kubectl create secret generic openviking-config \ + --from-literal=ov.conf='{"server":{"api_key":"secret"}}' + +# Or mount existing secret +helm install openviking ./openviking \ + --set existingSecret=openviking-config +``` + +## Autoscaling + +Enable Horizontal Pod Autoscaler for production workloads: + +```yaml +autoscaling: + enabled: true + minReplicas: 2 + maxReplicas: 10 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 80 +``` + +## Resource Limits + +Default resource configuration: + +```yaml +resources: + limits: + cpu: 2000m + memory: 4Gi + requests: + cpu: 500m + memory: 1Gi +``` + +Adjust based on your workload requirements. + +## Usage Examples + +### Connect with CLI + +```bash +# Get the LoadBalancer IP +export OPENVIKING_IP=$(kubectl get svc openviking -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + +# Create CLI configuration +cat > ~/.openviking/ovcli.conf <:1933", api_key="your-key") +client.initialize() + +# Add a resource +client.add_resource(path="./document.pdf") +client.wait_processed() + +# Search +results = client.find("your search query") +print(results) + +client.close() +``` + +## Troubleshooting + +### Pod fails to start + +Check the pod logs: +```bash +kubectl logs -l app.kubernetes.io/name=openviking +``` + +### Health check fails + +Verify the configuration: +```bash +kubectl get secret openviking-config -o jsonpath='{.data.ov\.conf}' | base64 -d +``` + +### LoadBalancer not getting IP + +Wait for the cloud provider to provision the load balancer: +```bash +kubectl get svc openviking -w +``` + +Check cloud provider-specific annotations in `values.yaml`. + +## Uninstallation + +```bash +helm uninstall openviking +``` + +To remove persistent data (if PVC was enabled): +```bash +kubectl delete pvc openviking-data +``` + +## Contributing + +Contributions are welcome! Please see the [OpenViking repository](https://github.com/volcengine/OpenViking) for contribution guidelines. + +## License + +This Helm chart is licensed under the Apache License 2.0, matching the OpenViking project license. diff --git a/examples/k8s-helm/templates/NOTES.txt b/examples/k8s-helm/templates/NOTES.txt new file mode 100644 index 00000000..1d312f10 --- /dev/null +++ b/examples/k8s-helm/templates/NOTES.txt @@ -0,0 +1,53 @@ +{{- if not .Values.openviking.config.embedding.dense.api_key -}} +##################################################################################### +### WARNING: No embedding API key configured! ### +##################################################################################### + +The OpenViking server is deployed but no embedding API key is configured. +You need to update the secret with your Volcengine API key: + + kubectl create secret generic {{ include "openviking.fullname" . }}-config \ + --from-literal=ov.conf='{{ toJson .Values.openviking.config }}' \ + --dry-run=client -o yaml | kubectl apply -f - + +Or use: + + helm upgrade {{ .Release.Name }} openviking/openviking \ + --set openviking.config.embedding.dense.api_key=YOUR_API_KEY + +{{- end }} + +OpenViking has been deployed! + +1. Get the application URL by running these commands: +{{- if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status by running: + kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "openviking.fullname" . }} + + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "openviking.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "openviking.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} + +2. Check the health of your deployment: + + kubectl get pods -n {{ .Release.Namespace }} -l app.kubernetes.io/name={{ include "openviking.name" . }} + curl http://$SERVICE_IP:{{ .Values.service.port }}/health + +3. To use the OpenViking CLI with your server: + + Create an ovcli.conf file: + { + "url": "http://$SERVICE_IP:{{ .Values.service.port }}", + "api_key": null, + "output": "table" + } + +4. For more information: + - Documentation: https://github.com/volcengine/OpenViking + - Configuration: Check values.yaml for all available options diff --git a/examples/k8s-helm/templates/_helpers.tpl b/examples/k8s-helm/templates/_helpers.tpl new file mode 100644 index 00000000..a04872df --- /dev/null +++ b/examples/k8s-helm/templates/_helpers.tpl @@ -0,0 +1,79 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "openviking.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "openviking.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "openviking.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "openviking.labels" -}} +helm.sh/chart: {{ include "openviking.chart" . }} +{{ include "openviking.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "openviking.selectorLabels" -}} +app.kubernetes.io/name: {{ include "openviking.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "openviking.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "openviking.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +Get cloud provider specific service annotations +*/}} +{{- define "openviking.serviceAnnotations" -}} +{{- if .Values.cloudProvider }} +{{- $providerConfig := index .Values.cloudProviders .Values.cloudProvider }} +{{- if $providerConfig }} +{{- with $providerConfig.service.annotations }} +{{- toYaml . }} +{{- end }} +{{- end }} +{{- end }} +{{- with .Values.service.annotations }} +{{- toYaml . }} +{{- end }} +{{- end }} diff --git a/examples/k8s-helm/templates/deployment.yaml b/examples/k8s-helm/templates/deployment.yaml new file mode 100644 index 00000000..b105013f --- /dev/null +++ b/examples/k8s-helm/templates/deployment.yaml @@ -0,0 +1,107 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "openviking.fullname" . }} + labels: + {{- include "openviking.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "openviking.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + # Force redeployment when config changes + checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} + {{- end }} + labels: + {{- include "openviking.labels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "openviking.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - /bin/sh + - -c + args: + - | + # Create data directories + mkdir -p /data/vectordb /data/agfs + + # Clone OpenViking if not already present + if [ ! -d /app/openviking ]; then + echo "Installing OpenViking..." + cd /app + uv pip install openviking + fi + + # Start OpenViking server + echo "Starting OpenViking server..." + exec uv run --with openviking openviking serve --config /etc/openviking/ov.conf + ports: + - name: http + containerPort: {{ .Values.openviking.config.server.port }} + protocol: TCP + livenessProbe: + {{- toYaml .Values.livenessProbe | nindent 12 }} + readinessProbe: + {{- toYaml .Values.readinessProbe | nindent 12 }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + env: + - name: OPENVIKING_CONFIG_FILE + value: "/etc/openviking/ov.conf" + {{- with .Values.openviking.env }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + - name: config + mountPath: /etc/openviking + readOnly: true + - name: data + mountPath: /data + {{- if .Values.openviking.config.storage.agfs.backend == "s3" }} + envFrom: + - secretRef: + name: {{ include "openviking.fullname" . }}-s3-credentials + optional: true + {{- end }} + volumes: + - name: config + secret: + secretName: {{ include "openviking.fullname" . }}-config + - name: data + {{- if and .Values.openviking.dataVolume.enabled .Values.openviking.dataVolume.usePVC }} + persistentVolumeClaim: + claimName: {{ include "openviking.fullname" . }}-data + {{- else }} + emptyDir: + sizeLimit: {{ .Values.openviking.dataVolume.size }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/examples/k8s-helm/templates/hpa.yaml b/examples/k8s-helm/templates/hpa.yaml new file mode 100644 index 00000000..a20082b8 --- /dev/null +++ b/examples/k8s-helm/templates/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "openviking.fullname" . }} + labels: + {{- include "openviking.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "openviking.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/examples/k8s-helm/templates/pvc.yaml b/examples/k8s-helm/templates/pvc.yaml new file mode 100644 index 00000000..1c546879 --- /dev/null +++ b/examples/k8s-helm/templates/pvc.yaml @@ -0,0 +1,17 @@ +{{- if and .Values.openviking.dataVolume.enabled .Values.openviking.dataVolume.usePVC }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ include "openviking.fullname" . }}-data + labels: + {{- include "openviking.labels" . | nindent 4 }} +spec: + accessModes: + {{- toYaml .Values.openviking.dataVolume.accessModes | nindent 4 }} + resources: + requests: + storage: {{ .Values.openviking.dataVolume.size }} + {{- if .Values.openviking.dataVolume.storageClassName }} + storageClassName: {{ .Values.openviking.dataVolume.storageClassName }} + {{- end }} +{{- end }} diff --git a/examples/k8s-helm/templates/secret.yaml b/examples/k8s-helm/templates/secret.yaml new file mode 100644 index 00000000..e188f010 --- /dev/null +++ b/examples/k8s-helm/templates/secret.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "openviking.fullname" . }}-config + labels: + {{- include "openviking.labels" . | nindent 4 }} +type: Opaque +stringData: + ov.conf: | +{{ toJson .Values.openviking.config | indent 4 }} diff --git a/examples/k8s-helm/templates/service.yaml b/examples/k8s-helm/templates/service.yaml new file mode 100644 index 00000000..f5dd231a --- /dev/null +++ b/examples/k8s-helm/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "openviking.fullname" . }} + labels: + {{- include "openviking.labels" . | nindent 4 }} + annotations: + {{- include "openviking.serviceAnnotations" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + name: http + selector: + {{- include "openviking.selectorLabels" . | nindent 4 }} diff --git a/examples/k8s-helm/templates/serviceaccount.yaml b/examples/k8s-helm/templates/serviceaccount.yaml new file mode 100644 index 00000000..a2dda077 --- /dev/null +++ b/examples/k8s-helm/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "openviking.serviceAccountName" . }} + labels: + {{- include "openviking.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end }} diff --git a/examples/k8s-helm/values.yaml b/examples/k8s-helm/values.yaml new file mode 100644 index 00000000..9532b9cb --- /dev/null +++ b/examples/k8s-helm/values.yaml @@ -0,0 +1,249 @@ +# Default values for openviking. +# This is a YAML-formatted file. + +# Cloud provider configuration for LoadBalancer annotations +# Supported: "gcp", "aws", "" +cloudProvider: "" + +# Number of replicas +replicaCount: 1 + +image: + # Use ghcr.io/astral-sh/uv as base image for running OpenViking with uv + repository: ghcr.io/astral-sh/uv + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "python3.12-bookworm" + +# Image pull secrets +imagePullSecrets: [] + +nameOverride: "" +fullnameOverride: "" + +# Service account configuration +serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + name: "" + +# Pod annotations +podAnnotations: {} + +# Pod security context +podSecurityContext: + runAsNonRoot: true + runAsUser: 1000 + fsGroup: 1000 + +# Container security context +securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: false + runAsNonRoot: true + runAsUser: 1000 + +# Service configuration +service: + type: LoadBalancer + port: 1933 + targetPort: 1933 + # Additional annotations for the service (merged with cloud provider annotations) + annotations: {} + +# Resource limits and requests +resources: + limits: + cpu: 2000m + memory: 4Gi + requests: + cpu: 500m + memory: 1Gi + +# Liveness probe +livenessProbe: + httpGet: + path: /health + port: http + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + +# Readiness probe +readinessProbe: + httpGet: + path: /health + port: http + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 3 + failureThreshold: 3 + +# Horizontal Pod Autoscaler +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 80 + +# Node selector +nodeSelector: {} + +# Tolerations +tolerations: [] + +# Affinity +affinity: {} + +# OpenViking configuration (ov.conf content) +# This will be stored in a Secret and mounted into the container +openviking: + config: + server: + host: "0.0.0.0" + port: 1933 + api_key: null + cors_origins: + - "*" + storage: + vectordb: + name: "context" + backend: "local" + path: "/data/vectordb" + volcengine: + region: "cn-beijing" + ak: null + sk: null + agfs: + port: 1833 + log_level: "warn" + path: "/data/agfs" + backend: "local" + timeout: 10 + retry_times: 3 + s3_bucket: null + s3_region: null + s3_access_key: null + s3_secret_key: null + embedding: + dense: + model: "doubao-embedding-vision-250615" + api_key: null + api_base: "https://ark.cn-beijing.volces.com/api/v3" + dimension: 1024 + provider: "volcengine" + input: "multimodal" + vlm: + model: "doubao-seed-1-8-251228" + api_key: null + api_base: "https://ark.cn-beijing.volces.com/api/v3" + temperature: 0.0 + max_retries: 2 + provider: "volcengine" + rerank: + ak: null + sk: null + host: "api-vikingdb.vikingdb.cn-beijing.volces.com" + model_name: "doubao-seed-rerank" + model_version: "251028" + threshold: 0.1 + return_directories: false + auto_generate_l0: true + auto_generate_l1: true + default_search_mode: "thinking" + default_search_limit: 3 + enable_memory_decay: true + memory_decay_check_interval: 3600 + log_level: "INFO" + log_format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s" + log_output: "stdout" + parsers: + pdf: + strategy: "auto" + max_content_length: 100000 + max_section_size: 4000 + section_size_flexibility: 0.3 + mineru_endpoint: null + mineru_api_key: null + mineru_timeout: 300.0 + code: + enable_ast: true + extract_functions: true + extract_classes: true + extract_imports: true + include_comments: true + max_line_length: 1000 + max_token_limit: 50000 + truncation_strategy: "head" + warn_on_truncation: true + image: + enable_ocr: false + enable_vlm: true + ocr_lang: "eng" + vlm_model: "gpt-4-vision" + max_dimension: 2048 + audio: + enable_transcription: true + transcription_model: "whisper-large-v3" + language: null + extract_metadata: true + video: + extract_frames: true + frame_interval: 10.0 + enable_transcription: true + enable_vlm_description: false + max_duration: 3600.0 + markdown: + preserve_links: true + extract_frontmatter: true + include_metadata: true + max_heading_depth: 3 + html: + extract_text_only: false + preserve_structure: true + clean_html: true + extract_metadata: true + text: + detect_language: true + split_by_paragraphs: true + max_paragraph_length: 1000 + preserve_line_breaks: false + + # Extra environment variables + env: [] + # - name: OPENVIKING_LOG_LEVEL + # value: "DEBUG" + + # Data volume configuration + # Note: For MVP, data is stored in emptyDir. For production, consider using PVC. + dataVolume: + enabled: true + # Use emptyDir for MVP. Set to true and configure pvc section for persistent storage. + usePVC: false + size: 10Gi + storageClassName: "" + accessModes: + - ReadWriteOnce + +# Cloud provider specific annotations +cloudProviders: + gcp: + service: + annotations: + networking.gke.io/load-balancer-type: "External" + aws: + service: + annotations: + service.beta.kubernetes.io/aws-load-balancer-type: "external" + service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing" + service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "ip"