initial git commit saving configs

This commit is contained in:
Adrien
2026-03-31 15:30:40 +00:00
commit 7770e9859c
64 changed files with 2866 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
apiVersion: v2
name: immich-postgres
description: CloudNativePG Cluster for Immich with VectorChord
type: application
version: 0.1.0
appVersion: "16"

View File

@@ -0,0 +1,43 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: {{ .Values.cluster.name }}
spec:
instances: {{ .Values.cluster.instances }}
storage:
pvcTemplate:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: postgres-storage
volumeMode: Filesystem
imageName: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
postgresql:
shared_preload_libraries:
- "vchord.so"
# Optional: you can tweak resources, monitoring, etc. here.
# resources:
# requests:
# cpu: 100m
# memory: 512Mi
# limits:
# cpu: 2
# memory: 2Gi
bootstrap:
initdb:
database: {{ .Values.database.name }}
owner: {{ .Values.database.user }}
dataChecksums: true
secret:
name: {{ ternary .Values.database.existingSecret (printf "%s-app" .Values.cluster.name) (ne .Values.database.existingSecret "") }}
postInitApplicationSQL:
- ALTER USER {{ .Values.database.user }} WITH SUPERUSER;
- CREATE EXTENSION vchord CASCADE;
- CREATE EXTENSION earthdistance CASCADE;

View File

@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.cluster.name }}-app
type: kubernetes.io/basic-auth
stringData:
username: {{ .Values.database.user | quote }}
password: {{ .Values.database.password | quote }}
dbname: {{ .Values.database.name | quote }} # handy for Immich env, CNPG ignores this

View File

@@ -0,0 +1,16 @@
cluster:
name: immich-postgres # will also be used for services: immich-postgresql-rw, -ro, ...
instances: 1
storage:
size: 10Gi
image:
repository: ghcr.io/tensorchord/cloudnative-vectorchord
tag: "16.9-0.4.3"
database:
name: immich
user: immich
password: "change-me-immich" # for dev; in prod override via --set or external secret