mirror of
https://github.com/morten-olsen/homelab-apps.git
synced 2026-02-08 01:36:28 +01:00
add valkey to paperless
This commit is contained in:
@@ -1 +1,17 @@
|
|||||||
{{ include "common.pvc" . }}
|
{{ include "common.pvc" . }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Release.Name }}-valkey-data"
|
||||||
|
labels:
|
||||||
|
{{- include "common.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.valkey.storage.size | default "1Gi" }}
|
||||||
|
{{- if .Values.valkey.storage.storageClassName }}
|
||||||
|
storageClassName: {{ .Values.valkey.storage.storageClassName }}
|
||||||
|
{{- end }}
|
||||||
|
|||||||
63
apps/charts/paperless-ngx/templates/valkey-deployment.yaml
Normal file
63
apps/charts/paperless-ngx/templates/valkey-deployment.yaml
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Release.Name }}-valkey"
|
||||||
|
labels:
|
||||||
|
{{- include "common.labels" . | nindent 4 }}
|
||||||
|
app: "{{ .Release.Name }}-valkey"
|
||||||
|
spec:
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
replicas: 1
|
||||||
|
revisionHistoryLimit: 2
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: "{{ .Release.Name }}-valkey"
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: "{{ .Release.Name }}-valkey"
|
||||||
|
spec:
|
||||||
|
initContainers:
|
||||||
|
- name: fix-permissions
|
||||||
|
image: busybox:latest
|
||||||
|
command: ['sh', '-c']
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
mkdir -p /data
|
||||||
|
chown -R 999:999 /data || chown -R 0:0 /data
|
||||||
|
chmod -R 755 /data
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /data
|
||||||
|
containers:
|
||||||
|
- name: "{{ .Release.Name }}-valkey"
|
||||||
|
image: "{{ .Values.valkey.image.repository }}:{{ .Values.valkey.image.tag }}"
|
||||||
|
imagePullPolicy: "{{ .Values.valkey.image.pullPolicy }}"
|
||||||
|
ports:
|
||||||
|
- name: tcp
|
||||||
|
containerPort: 6379
|
||||||
|
protocol: TCP
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /data
|
||||||
|
command:
|
||||||
|
- valkey-server
|
||||||
|
- --appendonly
|
||||||
|
- "no"
|
||||||
|
- --save
|
||||||
|
- ""
|
||||||
|
- --stop-writes-on-bgsave-error
|
||||||
|
- "no"
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: tcp
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: tcp
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: "{{ .Release.Name }}-valkey-data"
|
||||||
15
apps/charts/paperless-ngx/templates/valkey-service.yaml
Normal file
15
apps/charts/paperless-ngx/templates/valkey-service.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Release.Name }}-valkey"
|
||||||
|
labels:
|
||||||
|
{{- include "common.labels" . | nindent 4 }}
|
||||||
|
app: "{{ .Release.Name }}-valkey"
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 6379
|
||||||
|
targetPort: tcp
|
||||||
|
protocol: TCP
|
||||||
|
name: tcp
|
||||||
|
selector:
|
||||||
|
app: "{{ .Release.Name }}-valkey"
|
||||||
@@ -121,9 +121,9 @@ env:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: "{release}-connection"
|
name: "{release}-connection"
|
||||||
key: password
|
key: password
|
||||||
# Redis configuration (external Redis required)
|
# Redis/Valkey configuration
|
||||||
# Update these values to point to your Redis instance
|
PAPERLESS_REDIS:
|
||||||
PAPERLESS_REDIS: redis://redis.shared.svc.cluster.local:6379
|
value: "redis://{release}-valkey.{namespace}.svc.cluster.local:6379"
|
||||||
# OIDC configuration using django-allauth
|
# OIDC configuration using django-allauth
|
||||||
PAPERLESS_ENABLE_ALLAUTH: "true"
|
PAPERLESS_ENABLE_ALLAUTH: "true"
|
||||||
PAPERLESS_APPS: "allauth.socialaccount.providers.openid_connect"
|
PAPERLESS_APPS: "allauth.socialaccount.providers.openid_connect"
|
||||||
@@ -146,3 +146,13 @@ env:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: "{release}-oidc-credentials"
|
name: "{release}-oidc-credentials"
|
||||||
key: issuer
|
key: issuer
|
||||||
|
|
||||||
|
# Valkey (Redis-compatible) configuration
|
||||||
|
valkey:
|
||||||
|
image:
|
||||||
|
repository: valkey/valkey
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
storage:
|
||||||
|
size: 1Gi
|
||||||
|
storageClassName: persistent
|
||||||
|
|||||||
Reference in New Issue
Block a user