feat(helm): get rid of postgres subchart, users should manage it themselves

This commit is contained in:
perf3ct 2025-06-25 01:41:21 +00:00
parent ca25e68d05
commit 102e7d8b3f
4 changed files with 9 additions and 75 deletions

View File

@ -8,17 +8,13 @@ description: |-
Readur is a document management and OCR processing service that automatically processes uploaded documents, extracts text using OCR, and makes content searchable. Readur is a document management and OCR processing service that automatically processes uploaded documents, extracts text using OCR, and makes content searchable.
annotations: annotations:
category: Document Management category: Document Management
version: 0.1.3 version: 0.2.0
appVersion: latest appVersion: latest
kubeVersion: ">= 1.19" kubeVersion: ">= 1.19"
dependencies: dependencies:
- name: common - name: common
repository: https://bjw-s-labs.github.io/helm-charts repository: https://bjw-s-labs.github.io/helm-charts
version: 3.7.3 version: 3.7.3
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 16.7.13
condition: postgresql.enabled
keywords: keywords:
- document-management - document-management
- ocr - ocr

View File

@ -1,11 +1,3 @@
{{- if and (not .Values.postgresql.enabled) (not .Values.externalDatabase.enabled) -}}
{{- fail "Either postgresql.enabled or externalDatabase.enabled must be set to true" -}}
{{- end -}}
{{- if and .Values.postgresql.enabled .Values.externalDatabase.enabled -}}
{{- fail "Only one of postgresql.enabled or externalDatabase.enabled can be set to true" -}}
{{- end -}}
{{- if .Values.persistence.uploads.enabled -}} {{- if .Values.persistence.uploads.enabled -}}
{{- if and (eq .Values.persistence.uploads.type "persistentVolumeClaim") (not .Values.persistence.uploads.existingClaim) -}} {{- if and (eq .Values.persistence.uploads.type "persistentVolumeClaim") (not .Values.persistence.uploads.existingClaim) -}}
{{- $name := .Values.persistence.uploads.existingClaim | required "You need to specify an existing PVC for uploads storage at persistence.uploads.existingClaim or let the chart create one" -}} {{- $name := .Values.persistence.uploads.existingClaim | required "You need to specify an existing PVC for uploads storage at persistence.uploads.existingClaim or let the chart create one" -}}

View File

@ -1,17 +0,0 @@
apiVersion: v1
kind: Secret
metadata:
name: readur-db-secret
labels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
type: Opaque
stringData:
{{- if .Values.postgresql.enabled }}
database-url: "postgresql://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ .Release.Name }}-postgresql:5432/{{ .Values.postgresql.auth.database }}"
{{- else if .Values.externalDatabase.enabled }}
database-url: "postgresql://{{ .Values.externalDatabase.username }}:{{ .Values.externalDatabase.password }}@{{ .Values.externalDatabase.host }}:{{ .Values.externalDatabase.port }}/{{ .Values.externalDatabase.database }}"
{{- end }}

View File

@ -15,36 +15,29 @@ controllers:
# Server Configuration # Server Configuration
SERVER_HOST: "0.0.0.0" SERVER_HOST: "0.0.0.0"
SERVER_PORT: "8000" SERVER_PORT: "8000"
# Security
JWT_SECRET: "changeme-in-production"
# File Management # File Management
UPLOAD_PATH: "/app/uploads" UPLOAD_PATH: "/app/uploads"
WATCH_FOLDER: "/app/watch" WATCH_FOLDER: "/app/watch"
ALLOWED_FILE_TYPES: "pdf,txt,doc,docx,png,jpg,jpeg" ALLOWED_FILE_TYPES: "pdf,txt,doc,docx,png,jpg,jpeg"
MAX_FILE_SIZE_MB: "50" MAX_FILE_SIZE_MB: "50"
MAX_FILE_AGE_HOURS: "24" MAX_FILE_AGE_HOURS: "24"
# OCR Settings # OCR Settings
OCR_LANGUAGE: "eng" OCR_LANGUAGE: "eng"
CONCURRENT_OCR_JOBS: "4" CONCURRENT_OCR_JOBS: "4"
OCR_TIMEOUT_SECONDS: "300" OCR_TIMEOUT_SECONDS: "300"
# Performance # Performance
MEMORY_LIMIT_MB: "512" MEMORY_LIMIT_MB: "512"
CPU_PRIORITY: "normal" CPU_PRIORITY: "normal"
# File Watching # File Watching
WATCH_INTERVAL_SECONDS: "30" WATCH_INTERVAL_SECONDS: "30"
FILE_STABILITY_CHECK_MS: "1000" FILE_STABILITY_CHECK_MS: "1000"
# Database URL will be set automatically when PostgreSQL is enabled # Database URL
DATABASE_URL: DATABASE_URL: ""
valueFrom:
secretKeyRef:
name: readur-db-secret
key: database-url
persistence: persistence:
uploads: uploads:
@ -55,7 +48,7 @@ persistence:
size: 10Gi size: 10Gi
globalMounts: globalMounts:
- path: /app/uploads - path: /app/uploads
watch: watch:
enabled: true enabled: true
type: persistentVolumeClaim type: persistentVolumeClaim
@ -90,33 +83,3 @@ ingress:
identifier: main identifier: main
port: http port: http
tls: [] tls: []
# PostgreSQL subchart configuration
postgresql:
enabled: true
auth:
username: readur
password: readur
database: readur
primary:
persistence:
enabled: true
size: 10Gi
resources:
limits:
memory: 256Mi
requests:
cpu: 250m
memory: 256Mi
# Optional: External PostgreSQL configuration
# Use this if you want to connect to an existing PostgreSQL instance
externalDatabase:
enabled: false
host: ""
port: 5432
username: readur
password: ""
database: readur
# existingSecret: ""
# existingSecretPasswordKey: ""