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.
annotations:
category: Document Management
version: 0.1.3
version: 0.2.0
appVersion: latest
kubeVersion: ">= 1.19"
dependencies:
- name: common
repository: https://bjw-s-labs.github.io/helm-charts
version: 3.7.3
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 16.7.13
condition: postgresql.enabled
keywords:
- document-management
- 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 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" -}}

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

@ -16,9 +16,6 @@ controllers:
SERVER_HOST: "0.0.0.0"
SERVER_PORT: "8000"
# Security
JWT_SECRET: "changeme-in-production"
# File Management
UPLOAD_PATH: "/app/uploads"
WATCH_FOLDER: "/app/watch"
@ -39,12 +36,8 @@ controllers:
WATCH_INTERVAL_SECONDS: "30"
FILE_STABILITY_CHECK_MS: "1000"
# Database URL will be set automatically when PostgreSQL is enabled
DATABASE_URL:
valueFrom:
secretKeyRef:
name: readur-db-secret
key: database-url
# Database URL
DATABASE_URL: ""
persistence:
uploads:
@ -90,33 +83,3 @@ ingress:
identifier: main
port: http
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: ""