Refactor paperless-ai Helm chart for improved configuration
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Build Helm Chart / helm-package (push) Failing after 3s
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Build Helm Chart / helm-package (push) Failing after 3s
				
			This update substantially refactors the paperless-ai Helm chart. Key changes include: - Complete removal of outdated files: `.helmignore`, `LICENSE`, `README.adoc`, and several template files like `configfileConfigmap.yaml`, `configmap.yaml`, `dataPvc.yaml`, `envfileSecret.yaml`, `openAiApiSecret.yaml`, `paperlessApiSecret.yaml`, and others. - Introduction of a new Persistent Volume Claim configuration in `pvc.yaml` to simplify storage management. - Significant updates to `Chart.yaml` for better metadata, including a new maintainer and project description in German. - Enhancements to the main deployment template in `deployment.yaml`, focusing on clarity and proper utilization of Kubernetes security contexts, environment variables, and container properties. - Updated service definitions in `service.yaml` with better labels and service properties. - Refined the `ingress.yaml` to improve external service access management, including annotations for potential customization. These changes were implemented to modernize the Helm chart based on the current best practices, improve user experience, and set a foundation for future enhancements. There are no breaking changes to the existing user configurations.
This commit is contained in:
		@@ -1,23 +0,0 @@
 | 
				
			|||||||
# 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/
 | 
					 | 
				
			||||||
@@ -1,26 +1,17 @@
 | 
				
			|||||||
apiVersion: v2
 | 
					apiVersion: v2
 | 
				
			||||||
name: paperless-ai
 | 
					name: paperless-ai
 | 
				
			||||||
description: A Helm chart for deploying clusterzx/paperless-ai on Kubernetes.
 | 
					description: Ein Helm Chart für Paperless AI, basierend auf der Docker Compose Konfiguration.
 | 
				
			||||||
type: application
 | 
					version: 0.1.0
 | 
				
			||||||
home: https://github.com/ChiliChonka/paperless-ai-helm-chart
 | 
					appVersion: 3.0.7
 | 
				
			||||||
keywords:
 | 
					keywords:
 | 
				
			||||||
  - paperless-ngx
 | 
					 | 
				
			||||||
  - paperless
 | 
					 | 
				
			||||||
  - paperless-ai
 | 
					  - paperless-ai
 | 
				
			||||||
  - Content Management System
 | 
					  - document-management
 | 
				
			||||||
  - Document Management System
 | 
					  - ai
 | 
				
			||||||
  - Machine Learning
 | 
					home: https://git.cooltux.net/marko/HelmChartSammlung/src/branch/main/charts/paperless-ai
 | 
				
			||||||
  - Artificial Intelligence
 | 
					 | 
				
			||||||
  - Ollama
 | 
					 | 
				
			||||||
  - OpenAI API
 | 
					 | 
				
			||||||
  - Automated Document Analyzer
 | 
					 | 
				
			||||||
maintainers:
 | 
					 | 
				
			||||||
  - name: ChiliChonka
 | 
					 | 
				
			||||||
    url: https://github.com/ChiliChonka
 | 
					 | 
				
			||||||
sources:
 | 
					sources:
 | 
				
			||||||
  - https://github.com/ChiliChonka/paperless-ai-helm-chart
 | 
					 | 
				
			||||||
  - https://github.com/clusterzx/paperless-ai
 | 
					  - https://github.com/clusterzx/paperless-ai
 | 
				
			||||||
  - https://github.com/paperless-ngx/paperless-ngx
 | 
					  - https://git.cooltux.net/marko/HelmChartSammlung/src/branch/main/charts/paperless-ai
 | 
				
			||||||
  - https://github.com/ChiliChonka/paperless-ngx-helm-chart
 | 
					maintainers:
 | 
				
			||||||
version: 0.7.0
 | 
					  - name: Marko Oldenburg
 | 
				
			||||||
appVersion: "3.0.7"
 | 
					    email: development@cooltux.net
 | 
				
			||||||
 | 
					    url: https://git.cooltux.net/marko
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,21 +0,0 @@
 | 
				
			|||||||
MIT License
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Copyright (c) 2025 Marko Oldenburg
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
					 | 
				
			||||||
of this software and associated documentation files (the "Software"), to deal
 | 
					 | 
				
			||||||
in the Software without restriction, including without limitation the rights
 | 
					 | 
				
			||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
					 | 
				
			||||||
copies of the Software, and to permit persons to whom the Software is
 | 
					 | 
				
			||||||
furnished to do so, subject to the following conditions:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
The above copyright notice and this permission notice shall be included in all
 | 
					 | 
				
			||||||
copies or substantial portions of the Software.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
					 | 
				
			||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
					 | 
				
			||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
					 | 
				
			||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
					 | 
				
			||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
					 | 
				
			||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 | 
					 | 
				
			||||||
SOFTWARE.
 | 
					 | 
				
			||||||
@@ -1,33 +0,0 @@
 | 
				
			|||||||
= paperless-ai-helm-chart
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
A Helm chart for deploying https://github.com/clusterzx/paperless-ai[clusterzx/paperless-ai] on Kubernetes.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
== 🚧 Under Construction 🚧
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Thank you for visiting the *paperless-ai Helm Chart* repository! 🎉
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
This project is currently under construction, and we are actively working on setting it up. 
 | 
					 | 
				
			||||||
Please check back soon for updates, or feel free to follow the repository to stay informed about our progress.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
In the meantime, if you have any questions or suggestions, don't hesitate to open an issue or reach out.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Thank you for your patience and support!
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
The paperless-ai-helm-chart Team ❤️
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
== Helm Chart
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
=== Repository
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
The helm chart is not deployed to a repository yet.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
=== Installation
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
You can define your custom values files based on `paperless-ai/values.yaml`. Just copy and update the values, which should be overwritten and delete the other parts out of your customized values.yaml file.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Install the helm chart with the following command:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
`helm upgrade --install MY-RELEASE ./paperless-ai -f YOUR-CUSTOM-VALUES-FILE.yaml`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Please keep in mind to set the paperless configuration. See current values.yaml file.
 | 
					 | 
				
			||||||
@@ -1,17 +0,0 @@
 | 
				
			|||||||
require('dotenv').config();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
module.exports = {
 | 
					 | 
				
			||||||
  paperless: {
 | 
					 | 
				
			||||||
    apiUrl: process.env.PAPERLESS_API_URL,
 | 
					 | 
				
			||||||
    apiToken: process.env.PAPERLESS_API_TOKEN
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  openai: {
 | 
					 | 
				
			||||||
    apiKey: process.env.OPENAI_API_KEY
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  ollama: {
 | 
					 | 
				
			||||||
    apiUrl: process.env.OLLAMA_API_URL || 'http://localhost:11434',
 | 
					 | 
				
			||||||
    model: process.env.OLLAMA_MODEL || 'llama2'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  aiProvider: process.env.AI_PROVIDER || 'openai',
 | 
					 | 
				
			||||||
  scanInterval: process.env.SCAN_INTERVAL || '*/30 * * * *'
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
@@ -1,22 +0,0 @@
 | 
				
			|||||||
1. Get the application URL by running these commands:
 | 
					 | 
				
			||||||
{{- if .Values.ingress.enabled }}
 | 
					 | 
				
			||||||
{{- range $host := .Values.ingress.hosts }}
 | 
					 | 
				
			||||||
  {{- range .paths }}
 | 
					 | 
				
			||||||
  http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
 | 
					 | 
				
			||||||
  {{- end }}
 | 
					 | 
				
			||||||
{{- end }}
 | 
					 | 
				
			||||||
{{- else if contains "NodePort" .Values.service.type }}
 | 
					 | 
				
			||||||
  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "paperless-ai.fullname" . }})
 | 
					 | 
				
			||||||
  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
 | 
					 | 
				
			||||||
  echo http://$NODE_IP:$NODE_PORT
 | 
					 | 
				
			||||||
{{- else if contains "LoadBalancer" .Values.service.type }}
 | 
					 | 
				
			||||||
     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
 | 
					 | 
				
			||||||
           You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "paperless-ai.fullname" . }}'
 | 
					 | 
				
			||||||
  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "paperless-ai.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 "paperless-ai.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 }}
 | 
					 | 
				
			||||||
@@ -1,79 +1,67 @@
 | 
				
			|||||||
{{/*
 | 
					{{/*
 | 
				
			||||||
Expand the name of the chart.
 | 
					_helpers.tpl
 | 
				
			||||||
 | 
					Enthält nützliche Template-Funktionen, die in anderen Chart-Templates verwendet werden.
 | 
				
			||||||
 | 
					*/}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{{/*
 | 
				
			||||||
 | 
					Erweitert den Namen des Charts.
 | 
				
			||||||
*/}}
 | 
					*/}}
 | 
				
			||||||
{{- define "paperless-ai.name" -}}
 | 
					{{- define "paperless-ai.name" -}}
 | 
				
			||||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
 | 
					{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
 | 
				
			||||||
{{- end }}
 | 
					{{- end -}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{{/*
 | 
					{{/*
 | 
				
			||||||
Create a default fully qualified app name.
 | 
					Erstellt einen vollständig qualifizierten App-Namen.
 | 
				
			||||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
 | 
					Wir kürzen auf 63 Zeichen, da einige Kubernetes-Namenfelder darauf beschränkt sind (gemäß DNS-Namensspezifikation).
 | 
				
			||||||
If release name contains chart name it will be used as a full name.
 | 
					Wenn der Release-Name den Chart-Namen enthält, wird er als vollständiger Name verwendet.
 | 
				
			||||||
*/}}
 | 
					*/}}
 | 
				
			||||||
{{- define "paperless-ai.fullname" -}}
 | 
					{{- define "paperless-ai.fullname" -}}
 | 
				
			||||||
{{- if .Values.fullnameOverride }}
 | 
					{{- if .Values.fullnameOverride -}}
 | 
				
			||||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
 | 
					{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
 | 
				
			||||||
{{- else }}
 | 
					{{- else -}}
 | 
				
			||||||
{{- $name := default .Chart.Name .Values.nameOverride }}
 | 
					{{- $name := default .Chart.Name .Values.nameOverride -}}
 | 
				
			||||||
{{- if contains $name .Release.Name }}
 | 
					{{- if contains $name .Release.Name -}}
 | 
				
			||||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
 | 
					{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
 | 
				
			||||||
{{- else }}
 | 
					{{- else -}}
 | 
				
			||||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
 | 
					{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
 | 
				
			||||||
{{- end }}
 | 
					{{- end -}}
 | 
				
			||||||
{{- end }}
 | 
					{{- end -}}
 | 
				
			||||||
{{- end }}
 | 
					{{- end -}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{{/*
 | 
					{{/*
 | 
				
			||||||
Create chart name and version as used by the chart label.
 | 
					Erstellt den Chart-Namen und die Version, wie sie vom Chart-Label verwendet werden.
 | 
				
			||||||
*/}}
 | 
					*/}}
 | 
				
			||||||
{{- define "paperless-ai.chart" -}}
 | 
					{{- define "paperless-ai.chart" -}}
 | 
				
			||||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
 | 
					{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
 | 
				
			||||||
{{- end }}
 | 
					{{- end -}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{{/*
 | 
					{{/*
 | 
				
			||||||
Common labels
 | 
					Gängige Labels, die allen Ressourcen hinzugefügt werden.
 | 
				
			||||||
*/}}
 | 
					*/}}
 | 
				
			||||||
{{- define "paperless-ai.labels" -}}
 | 
					{{- define "paperless-ai.labels" -}}
 | 
				
			||||||
helm.sh/chart: {{ include "paperless-ai.chart" . }}
 | 
					helm.sh/chart: {{ include "paperless-ai.chart" . }}
 | 
				
			||||||
{{ include "paperless-ai.selectorLabels" . }}
 | 
					{{ include "paperless-ai.selectorLabels" . }}
 | 
				
			||||||
{{- if .Chart.AppVersion }}
 | 
					{{- if .Chart.AppVersion }}
 | 
				
			||||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
 | 
					app.kubernetes.io/app-version: {{ .Chart.AppVersion | quote }}
 | 
				
			||||||
{{- end }}
 | 
					{{- end }}
 | 
				
			||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
 | 
					app.kubernetes.io/managed-by: {{ .Release.Service }}
 | 
				
			||||||
{{- end }}
 | 
					{{- end -}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{{/*
 | 
					{{/*
 | 
				
			||||||
Selector labels
 | 
					Selector-Labels, die für die Auswahl von Pods verwendet werden.
 | 
				
			||||||
*/}}
 | 
					*/}}
 | 
				
			||||||
{{- define "paperless-ai.selectorLabels" -}}
 | 
					{{- define "paperless-ai.selectorLabels" -}}
 | 
				
			||||||
app.kubernetes.io/name: {{ include "paperless-ai.name" . }}
 | 
					app.kubernetes.io/name: {{ include "paperless-ai.name" . }}
 | 
				
			||||||
app.kubernetes.io/instance: {{ .Release.Name }}
 | 
					app.kubernetes.io/instance: {{ .Release.Name }}
 | 
				
			||||||
{{- end }}
 | 
					{{- end -}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{{/*
 | 
					{{/*
 | 
				
			||||||
Create the name of the service account to use
 | 
					Erstellt den Namen des zu verwendenden Service Accounts.
 | 
				
			||||||
*/}}
 | 
					*/}}
 | 
				
			||||||
{{- define "paperless-ai.serviceAccountName" -}}
 | 
					{{- define "paperless-ai.serviceAccountName" -}}
 | 
				
			||||||
{{- if .Values.serviceAccount.create }}
 | 
					{{- if .Values.serviceAccount.create -}}
 | 
				
			||||||
{{- default (include "paperless-ai.fullname" .) .Values.serviceAccount.name }}
 | 
					    {{ default (include "paperless-ai.fullname" .) .Values.serviceAccount.name }}
 | 
				
			||||||
{{- else }}
 | 
					{{- else -}}
 | 
				
			||||||
{{- default "default" .Values.serviceAccount.name }}
 | 
					    {{ default "default" .Values.serviceAccount.name }}
 | 
				
			||||||
{{- end }}
 | 
					{{- end -}}
 | 
				
			||||||
{{- end }}
 | 
					{{- end -}}
 | 
				
			||||||
 | 
					 | 
				
			||||||
{{/*
 | 
					 | 
				
			||||||
Generiert den Inhalt der .env-Datei aus den Werten in .Values.secretEnv
 | 
					 | 
				
			||||||
*/}}
 | 
					 | 
				
			||||||
{{- define "generateEnv" -}}
 | 
					 | 
				
			||||||
{{- if .Values.paperless.apiUrl }}PAPERLESS_API_URL={{ .Values.paperless.apiUrl }}{{ "\n" }}{{- end }}
 | 
					 | 
				
			||||||
{{- if .Values.ai.provider }}AI_PROVIDER={{ .Values.ai.provider }}{{ "\n" }}{{- end }}
 | 
					 | 
				
			||||||
{{- if .Values.ai.addProcessedTag }}ADD_AI_PROCESSED_TAG={{ .Values.ai.addProcessedTag }}{{ "\n" }}{{- end }}
 | 
					 | 
				
			||||||
{{- if .Values.ai.processedTagName }}AI_PROCESSED_TAG_NAME={{ .Values.ai.processedTagName }}{{ "\n" }}{{- end }}
 | 
					 | 
				
			||||||
{{- if .Values.prompt.useTags }}USE_PROMPT_TAGS={{ .Values.prompt.useTags }}{{ "\n" }}{{- end }}
 | 
					 | 
				
			||||||
{{- if .Values.prompt.tags }}PROMPT_TAGS={{ .Values.prompt.tags }}{{ "\n" }}{{- end }}
 | 
					 | 
				
			||||||
{{- if .Values.scanInterval }}SCAN_INTERVAL={{ .Values.scanInterval }}{{ "\n" }}{{- end }}
 | 
					 | 
				
			||||||
{{- if .Values.systemPrompt }}SYSTEM_PROMPT=`{{ .Values.systemPrompt }}`{{ "\n" }}{{- end }}
 | 
					 | 
				
			||||||
{{- if .Values.processPredefinedDocuments }}PROCESS_PREDEFINED_DOCUMENTS={{ .Values.processPredefinedDocuments }}{{ "\n" }}{{- end }}
 | 
					 | 
				
			||||||
TAGS={{ .Values.tags }}{{ "\n" }}
 | 
					 | 
				
			||||||
{{- if .Values.openAi.model }}OPENAI_MODEL={{ .Values.openAi.model }}{{ "\n" }}{{- end }}
 | 
					 | 
				
			||||||
{{- end }}
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +0,0 @@
 | 
				
			|||||||
apiVersion: v1
 | 
					 | 
				
			||||||
kind: ConfigMap
 | 
					 | 
				
			||||||
metadata:
 | 
					 | 
				
			||||||
  name: {{ include "paperless-ai.fullname" . }}-config-file
 | 
					 | 
				
			||||||
  labels:
 | 
					 | 
				
			||||||
    {{- include "paperless-ai.labels" . | nindent 4 }}
 | 
					 | 
				
			||||||
data:
 | 
					 | 
				
			||||||
  config.js: |
 | 
					 | 
				
			||||||
    {{- (.Files.Get "files/config.js") | nindent 4 }}
 | 
					 | 
				
			||||||
@@ -1,22 +0,0 @@
 | 
				
			|||||||
apiVersion: v1
 | 
					 | 
				
			||||||
kind: ConfigMap
 | 
					 | 
				
			||||||
metadata:
 | 
					 | 
				
			||||||
  name: {{ include "paperless-ai.fullname" . }}-config
 | 
					 | 
				
			||||||
  labels:
 | 
					 | 
				
			||||||
    {{- include "paperless-ai.labels" . | nindent 4 }}
 | 
					 | 
				
			||||||
data:
 | 
					 | 
				
			||||||
{{- if .Values.paperless.apiUrl }}
 | 
					 | 
				
			||||||
  PAPERLESS_API_URL: "{{ .Values.paperless.apiUrl }}"
 | 
					 | 
				
			||||||
{{- end }}
 | 
					 | 
				
			||||||
{{- if .Values.aiProvider }}
 | 
					 | 
				
			||||||
  AI_PROVIDER: "{{ .Values.aiProvider }}"
 | 
					 | 
				
			||||||
{{- end }}
 | 
					 | 
				
			||||||
{{- if .Values.ollama.apiUrl }}
 | 
					 | 
				
			||||||
  OLLAMA_API_URL: "{{ .Values.ollama.apiUrl }}"
 | 
					 | 
				
			||||||
{{- end }}
 | 
					 | 
				
			||||||
{{- if .Values.ollama.model }}
 | 
					 | 
				
			||||||
  OLLAMA_MODEL: "{{ .Values.ollama.model }}"
 | 
					 | 
				
			||||||
{{- end }}
 | 
					 | 
				
			||||||
{{- if .Values.scanInterval }}
 | 
					 | 
				
			||||||
  SCAN_INTERVAL: "{{ .Values.scanInterval }}"
 | 
					 | 
				
			||||||
{{- end }}
 | 
					 | 
				
			||||||
@@ -1,15 +0,0 @@
 | 
				
			|||||||
{{- if .Values.persistence.data.enabled }}
 | 
					 | 
				
			||||||
apiVersion: v1
 | 
					 | 
				
			||||||
kind: PersistentVolumeClaim
 | 
					 | 
				
			||||||
metadata:
 | 
					 | 
				
			||||||
  name: {{ include "paperless-ai.fullname" . }}-pvc-data
 | 
					 | 
				
			||||||
  labels:
 | 
					 | 
				
			||||||
    {{- include "paperless-ai.labels" . | nindent 4 }}
 | 
					 | 
				
			||||||
spec:
 | 
					 | 
				
			||||||
  accessModes:
 | 
					 | 
				
			||||||
    - ReadWriteOnce
 | 
					 | 
				
			||||||
  resources:
 | 
					 | 
				
			||||||
    requests:
 | 
					 | 
				
			||||||
      storage: {{ .Values.persistence.data.size }}
 | 
					 | 
				
			||||||
  storageClassName: {{ .Values.persistence.data.storageClass }}
 | 
					 | 
				
			||||||
{{- end }}
 | 
					 | 
				
			||||||
@@ -1,99 +1,76 @@
 | 
				
			|||||||
 | 
					# deployment.yaml
 | 
				
			||||||
 | 
					# Definiert das Kubernetes Deployment für die Paperless AI Anwendung.
 | 
				
			||||||
 | 
					# Ein Deployment verwaltet die Erstellung und Skalierung von Pods.
 | 
				
			||||||
apiVersion: apps/v1
 | 
					apiVersion: apps/v1
 | 
				
			||||||
kind: Deployment
 | 
					kind: Deployment
 | 
				
			||||||
metadata:
 | 
					metadata:
 | 
				
			||||||
  name: {{ include "paperless-ai.fullname" . }}
 | 
					  name: {{ include "paperless-ai.fullname" . }} # Der Name des Deployments, generiert mit dem fullname-Template.
 | 
				
			||||||
  labels:
 | 
					  labels:
 | 
				
			||||||
    {{- include "paperless-ai.labels" . | nindent 4 }}
 | 
					    {{- include "paperless-ai.labels" . | nindent 4 }} # Allgemeine Labels für das Deployment.
 | 
				
			||||||
spec:
 | 
					spec:
 | 
				
			||||||
  replicas: {{ .Values.replicaCount }}
 | 
					  {{- if not .Values.autoscaling.enabled }}
 | 
				
			||||||
 | 
					  replicas: {{ .Values.replicaCount }} # Anzahl der gewünschten Pod-Replikate, wenn Autoscaling deaktiviert ist.
 | 
				
			||||||
 | 
					  {{- end }}
 | 
				
			||||||
  selector:
 | 
					  selector:
 | 
				
			||||||
    matchLabels:
 | 
					    matchLabels:
 | 
				
			||||||
      {{- include "paperless-ai.selectorLabels" . | nindent 6 }}
 | 
					      {{- include "paperless-ai.selectorLabels" . | nindent 6 }} # Selector, um die Pods zu finden, die zu diesem Deployment gehören.
 | 
				
			||||||
  template:
 | 
					  template:
 | 
				
			||||||
    metadata:
 | 
					    metadata:
 | 
				
			||||||
      {{- with .Values.podAnnotations }}
 | 
					      {{- with .Values.podAnnotations }}
 | 
				
			||||||
      annotations:
 | 
					      annotations:
 | 
				
			||||||
        {{- toYaml . | nindent 8 }}
 | 
					        {{- toYaml . | nindent 8 }} # Zusätzliche Anmerkungen für den Pod.
 | 
				
			||||||
      {{- end }}
 | 
					      {{- end }}
 | 
				
			||||||
      labels:
 | 
					      labels:
 | 
				
			||||||
        {{- include "paperless-ai.labels" . | nindent 8 }}
 | 
					        {{- include "paperless-ai.selectorLabels" . | nindent 8 }} # Labels für den Pod.
 | 
				
			||||||
        {{- with .Values.podLabels }}
 | 
					 | 
				
			||||||
        {{- toYaml . | nindent 8 }}
 | 
					 | 
				
			||||||
        {{- end }}
 | 
					 | 
				
			||||||
    spec:
 | 
					    spec:
 | 
				
			||||||
      {{- with .Values.imagePullSecrets }}
 | 
					      {{- with .Values.imagePullSecrets }}
 | 
				
			||||||
      imagePullSecrets:
 | 
					      imagePullSecrets:
 | 
				
			||||||
        {{- toYaml . | nindent 8 }}
 | 
					        {{- toYaml . | nindent 8 }} # Secrets für den Image-Pull, falls private Registries verwendet werden.
 | 
				
			||||||
      {{- end }}
 | 
					      {{- end }}
 | 
				
			||||||
 | 
					      serviceAccountName: {{ include "paperless-ai.serviceAccountName" . }} # Der zu verwendende Service Account.
 | 
				
			||||||
 | 
					      {{- if .Values.securityContext.enabled }}
 | 
				
			||||||
      securityContext:
 | 
					      securityContext:
 | 
				
			||||||
        {{- toYaml .Values.podSecurityContext | nindent 8 }}
 | 
					        {{- toYaml .Values.securityContext.pod | nindent 8 }} # Sicherheitskontext-Einstellungen für den gesamten Pod.
 | 
				
			||||||
 | 
					      {{- end }}
 | 
				
			||||||
      containers:
 | 
					      containers:
 | 
				
			||||||
        - name: {{ .Chart.Name }}
 | 
					        - name: {{ .Chart.Name }} # Name des Containers.
 | 
				
			||||||
 | 
					          {{- if .Values.securityContext.enabled }}
 | 
				
			||||||
          securityContext:
 | 
					          securityContext:
 | 
				
			||||||
            {{- toYaml .Values.securityContext | nindent 12 }}
 | 
					            {{- toYaml .Values.securityContext.container | nindent 12 }} # Sicherheitskontext-Einstellungen für diesen Container.
 | 
				
			||||||
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
 | 
					          {{- end }}
 | 
				
			||||||
          imagePullPolicy: {{ .Values.image.pullPolicy }}
 | 
					          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" # Das zu verwendende Image.
 | 
				
			||||||
 | 
					          imagePullPolicy: {{ .Values.image.pullPolicy }} # Die Image-Pull-Policy.
 | 
				
			||||||
          ports:
 | 
					          ports:
 | 
				
			||||||
            - name: http
 | 
					            - name: http # Name des Ports.
 | 
				
			||||||
              containerPort: {{ .Values.service.port }}
 | 
					              containerPort: {{ .Values.service.targetPort }} # Der Port, der im Container geöffnet ist.
 | 
				
			||||||
              protocol: TCP
 | 
					              protocol: TCP # Das Protokoll des Ports.
 | 
				
			||||||
          livenessProbe:
 | 
					          env:
 | 
				
			||||||
            {{- toYaml .Values.livenessProbe | nindent 12 }}
 | 
					            {{- range $key, $value := .Values.env }}
 | 
				
			||||||
          readinessProbe:
 | 
					            - name: {{ $key }} # Name der Umgebungsvariable.
 | 
				
			||||||
            {{- toYaml .Values.readinessProbe | nindent 12 }}
 | 
					              value: {{ $value | quote }} # Wert der Umgebungsvariable.
 | 
				
			||||||
          resources:
 | 
					            {{- end }}
 | 
				
			||||||
            {{- toYaml .Values.resources | nindent 12 }}
 | 
					          {{- if .Values.persistence.enabled }}
 | 
				
			||||||
          {{- with .Values.envs }}
 | 
					 | 
				
			||||||
          envs:
 | 
					 | 
				
			||||||
            {{- toYaml . | nindent 12 }}
 | 
					 | 
				
			||||||
          {{- end }}
 | 
					 | 
				
			||||||
          envFrom:
 | 
					 | 
				
			||||||
#            - configMapRef:
 | 
					 | 
				
			||||||
#                name: {{ include "paperless-ai.fullname" . }}-config
 | 
					 | 
				
			||||||
          {{- if .Values.openAi.apiKey }}
 | 
					 | 
				
			||||||
            - secretRef:
 | 
					 | 
				
			||||||
                name: {{ include "paperless-ai.fullname" . }}-open-ai-api
 | 
					 | 
				
			||||||
          {{- end }}
 | 
					 | 
				
			||||||
          {{- if .Values.paperless.apiToken }}
 | 
					 | 
				
			||||||
            - secretRef:
 | 
					 | 
				
			||||||
                name: {{ include "paperless-ai.fullname" . }}-paperless-api
 | 
					 | 
				
			||||||
          {{- end }}
 | 
					 | 
				
			||||||
          {{- if or .Values.persistence.config.enabled .Values.persistence.data.enabled }}
 | 
					 | 
				
			||||||
          volumeMounts:
 | 
					          volumeMounts:
 | 
				
			||||||
            - name: {{ include "paperless-ai.fullname" . }}-volume-config
 | 
					            - name: paperless-ai-data # Name des Volumes, das gemountet werden soll.
 | 
				
			||||||
              mountPath: {{ .Values.persistence.config.mountPath }}
 | 
					              mountPath: /app/data # Der Pfad im Container, an dem das Volume gemountet wird.
 | 
				
			||||||
              subPath: {{ .Values.persistence.config.subPath }}
 | 
					 | 
				
			||||||
            - name: {{ include "paperless-ai.fullname" . }}-volume-envfile
 | 
					 | 
				
			||||||
              mountPath: {{ .Values.persistence.envfile.mountPath }}
 | 
					 | 
				
			||||||
              subPath: {{ .Values.persistence.envfile.subPath }}
 | 
					 | 
				
			||||||
          {{- if .Values.persistence.data.enabled }}
 | 
					 | 
				
			||||||
            - name: {{ include "paperless-ai.fullname" . }}-volume-data
 | 
					 | 
				
			||||||
              mountPath: {{ .Values.persistence.data.mountPath }}
 | 
					 | 
				
			||||||
          {{- end }}
 | 
					          {{- end }}
 | 
				
			||||||
          {{- end }}
 | 
					          resources:
 | 
				
			||||||
      {{- if or .Values.persistence.config.enabled .Values.persistence.data.enabled }}
 | 
					            {{- toYaml .Values.resources | nindent 12 }} # Ressourcenanforderungen und -limits für den Container.
 | 
				
			||||||
      volumes:
 | 
					 | 
				
			||||||
        - name: {{ include "paperless-ai.fullname" . }}-volume-config
 | 
					 | 
				
			||||||
          configMap:
 | 
					 | 
				
			||||||
            name: {{ include "paperless-ai.fullname" . }}-config-file
 | 
					 | 
				
			||||||
        - name: {{ include "paperless-ai.fullname" . }}-volume-envfile
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "paperless-ai.fullname" . }}-env-file
 | 
					 | 
				
			||||||
      {{- if .Values.persistence.data.enabled }}
 | 
					 | 
				
			||||||
        - name: {{ include "paperless-ai.fullname" . }}-volume-data
 | 
					 | 
				
			||||||
          persistentVolumeClaim:
 | 
					 | 
				
			||||||
            claimName: {{ include "paperless-ai.fullname" . }}-pvc-data
 | 
					 | 
				
			||||||
      {{- end }}
 | 
					 | 
				
			||||||
      {{- end }}
 | 
					 | 
				
			||||||
      {{- with .Values.nodeSelector }}
 | 
					      {{- with .Values.nodeSelector }}
 | 
				
			||||||
      nodeSelector:
 | 
					      nodeSelector:
 | 
				
			||||||
        {{- toYaml . | nindent 8 }}
 | 
					        {{- toYaml . | nindent 8 }} # Node-Selector-Regeln für die Pod-Platzierung.
 | 
				
			||||||
      {{- end }}
 | 
					      {{- end }}
 | 
				
			||||||
      {{- with .Values.affinity }}
 | 
					      {{- with .Values.affinity }}
 | 
				
			||||||
      affinity:
 | 
					      affinity:
 | 
				
			||||||
        {{- toYaml . | nindent 8 }}
 | 
					        {{- toYaml . | nindent 8 }} # Affinitätsregeln für die Pod-Platzierung.
 | 
				
			||||||
      {{- end }}
 | 
					      {{- end }}
 | 
				
			||||||
      {{- with .Values.tolerations }}
 | 
					      {{- with .Values.tolerations }}
 | 
				
			||||||
      tolerations:
 | 
					      tolerations:
 | 
				
			||||||
        {{- toYaml . | nindent 8 }}
 | 
					        {{- toYaml . | nindent 8 }} # Toleranzen für die Pod-Platzierung auf Tainted Nodes.
 | 
				
			||||||
 | 
					      {{- end }}
 | 
				
			||||||
 | 
					      {{- if .Values.persistence.enabled }}
 | 
				
			||||||
 | 
					      volumes:
 | 
				
			||||||
 | 
					        - name: paperless-ai-data # Definiert ein Volume mit dem Namen 'paperless-ai-data'.
 | 
				
			||||||
 | 
					          persistentVolumeClaim:
 | 
				
			||||||
 | 
					            claimName: {{ include "paperless-ai.fullname" . }}-data # Verweist auf den Persistent Volume Claim.
 | 
				
			||||||
      {{- end }}
 | 
					      {{- end }}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +0,0 @@
 | 
				
			|||||||
apiVersion: v1
 | 
					 | 
				
			||||||
kind: Secret
 | 
					 | 
				
			||||||
type: Opaque
 | 
					 | 
				
			||||||
metadata:
 | 
					 | 
				
			||||||
  name: {{ include "paperless-ai.fullname" . }}-env-file
 | 
					 | 
				
			||||||
  labels:
 | 
					 | 
				
			||||||
    {{- include "paperless-ai.labels" . | nindent 4 }}
 | 
					 | 
				
			||||||
data:
 | 
					 | 
				
			||||||
  .env: {{ include "generateEnv" . | b64enc }}
 | 
					 | 
				
			||||||
@@ -1,43 +1,38 @@
 | 
				
			|||||||
{{- if .Values.ingress.enabled -}}
 | 
					# ingress.yaml
 | 
				
			||||||
 | 
					# Definiert einen Kubernetes Ingress, um externen Zugriff auf den Service zu ermöglichen.
 | 
				
			||||||
 | 
					# Standardmäßig ist dieser Ingress deaktiviert und muss in 'values.yaml' aktiviert werden.
 | 
				
			||||||
 | 
					{{- if .Values.ingress.enabled -}} # Dieses Template wird nur gerendert, wenn 'ingress.enabled' true ist.
 | 
				
			||||||
apiVersion: networking.k8s.io/v1
 | 
					apiVersion: networking.k8s.io/v1
 | 
				
			||||||
kind: Ingress
 | 
					kind: Ingress
 | 
				
			||||||
metadata:
 | 
					metadata:
 | 
				
			||||||
  name: {{ include "paperless-ai.fullname" . }}
 | 
					  name: {{ include "paperless-ai.fullname" . }} # Der Name des Ingress.
 | 
				
			||||||
  labels:
 | 
					  labels:
 | 
				
			||||||
    {{- include "paperless-ai.labels" . | nindent 4 }}
 | 
					    {{- include "paperless-ai.labels" . | nindent 4 }} # Allgemeine Labels für den Ingress.
 | 
				
			||||||
  {{- with .Values.ingress.annotations }}
 | 
					  {{- with .Values.ingress.annotations }}
 | 
				
			||||||
  annotations:
 | 
					  annotations:
 | 
				
			||||||
    {{- toYaml . | nindent 4 }}
 | 
					    {{- toYaml . | nindent 4 }} # Zusätzliche Anmerkungen für den Ingress (z.B. für Cert-Manager oder Nginx-Controller).
 | 
				
			||||||
  {{- end }}
 | 
					  {{- end }}
 | 
				
			||||||
spec:
 | 
					spec:
 | 
				
			||||||
  {{- with .Values.ingress.className }}
 | 
					  {{- if .Values.ingress.className }}
 | 
				
			||||||
  ingressClassName: {{ . }}
 | 
					  ingressClassName: {{ .Values.ingress.className }} # Der Name der Ingress-Klasse.
 | 
				
			||||||
  {{- end }}
 | 
					  {{- end }}
 | 
				
			||||||
  {{- if .Values.ingress.tls }}
 | 
					  {{- if .Values.ingress.tls }}
 | 
				
			||||||
  tls:
 | 
					  tls:
 | 
				
			||||||
    {{- range .Values.ingress.tls }}
 | 
					    {{- toYaml .Values.ingress.tls | nindent 4 }} # TLS-Konfiguration für HTTPS.
 | 
				
			||||||
    - hosts:
 | 
					 | 
				
			||||||
        {{- range .hosts }}
 | 
					 | 
				
			||||||
        - {{ . | quote }}
 | 
					 | 
				
			||||||
        {{- end }}
 | 
					 | 
				
			||||||
      secretName: {{ .secretName }}
 | 
					 | 
				
			||||||
    {{- end }}
 | 
					 | 
				
			||||||
  {{- end }}
 | 
					  {{- end }}
 | 
				
			||||||
  rules:
 | 
					  rules:
 | 
				
			||||||
    {{- range .Values.ingress.hosts }}
 | 
					    {{- range .Values.ingress.hosts }}
 | 
				
			||||||
    - host: {{ .host | quote }}
 | 
					    - host: {{ .host | quote }} # Der Hostname für den Ingress.
 | 
				
			||||||
      http:
 | 
					      http:
 | 
				
			||||||
        paths:
 | 
					        paths:
 | 
				
			||||||
          {{- range .paths }}
 | 
					          {{- range .paths }}
 | 
				
			||||||
          - path: {{ .path }}
 | 
					          - path: {{ .path }} # Der Pfad, der weitergeleitet werden soll.
 | 
				
			||||||
            {{- with .pathType }}
 | 
					            pathType: {{ .pathType }} # Der Typ des Pfades (Prefix, Exact, ImplementationSpecific).
 | 
				
			||||||
            pathType: {{ . }}
 | 
					 | 
				
			||||||
            {{- end }}
 | 
					 | 
				
			||||||
            backend:
 | 
					            backend:
 | 
				
			||||||
              service:
 | 
					              service:
 | 
				
			||||||
                name: {{ include "paperless-ai.fullname" $ }}
 | 
					                name: {{ include "paperless-ai.fullname" $ }} # Name des Services, an den weitergeleitet wird.
 | 
				
			||||||
                port:
 | 
					                port:
 | 
				
			||||||
                  number: {{ $.Values.service.port }}
 | 
					                  number: {{ $.Values.service.port }} # Port des Services.
 | 
				
			||||||
          {{- end }}
 | 
					          {{- end }}
 | 
				
			||||||
    {{- end }}
 | 
					    {{- end }}
 | 
				
			||||||
{{- end }}
 | 
					{{- end }}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,11 +0,0 @@
 | 
				
			|||||||
{{- if .Values.openAi.apiKey }}
 | 
					 | 
				
			||||||
apiVersion: v1
 | 
					 | 
				
			||||||
kind: Secret
 | 
					 | 
				
			||||||
metadata:
 | 
					 | 
				
			||||||
  name: {{ include "paperless-ai.fullname" . }}-open-ai-api
 | 
					 | 
				
			||||||
  labels:
 | 
					 | 
				
			||||||
    {{- include "paperless-ai.labels" . | nindent 4 }}
 | 
					 | 
				
			||||||
type: Opaque
 | 
					 | 
				
			||||||
data:
 | 
					 | 
				
			||||||
  OPENAI_API_KEY: {{ .Values.openAi.apiKey  | b64enc | quote }}
 | 
					 | 
				
			||||||
{{- end }}
 | 
					 | 
				
			||||||
@@ -1,11 +0,0 @@
 | 
				
			|||||||
{{- if .Values.paperless.apiToken }}
 | 
					 | 
				
			||||||
apiVersion: v1
 | 
					 | 
				
			||||||
kind: Secret
 | 
					 | 
				
			||||||
metadata:
 | 
					 | 
				
			||||||
  name: {{ include "paperless-ai.fullname" . }}-paperless-api
 | 
					 | 
				
			||||||
  labels:
 | 
					 | 
				
			||||||
    {{- include "paperless-ai.labels" . | nindent 4 }}
 | 
					 | 
				
			||||||
type: Opaque
 | 
					 | 
				
			||||||
data:
 | 
					 | 
				
			||||||
  PAPERLESS_API_TOKEN: {{ .Values.paperless.apiToken  | b64enc | quote }}
 | 
					 | 
				
			||||||
{{- end }}
 | 
					 | 
				
			||||||
							
								
								
									
										20
									
								
								charts/paperless-ai/templates/pvc.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								charts/paperless-ai/templates/pvc.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					# pvc.yaml
 | 
				
			||||||
 | 
					# Definiert einen Persistent Volume Claim (PVC) für die Paperless AI Anwendung.
 | 
				
			||||||
 | 
					# Ein PVC fordert persistenten Speicher vom Kubernetes-Cluster an.
 | 
				
			||||||
 | 
					{{- if .Values.persistence.enabled }} # Dieses Template wird nur gerendert, wenn 'persistence.enabled' true ist.
 | 
				
			||||||
 | 
					apiVersion: v1
 | 
				
			||||||
 | 
					kind: PersistentVolumeClaim
 | 
				
			||||||
 | 
					metadata:
 | 
				
			||||||
 | 
					  name: {{ include "paperless-ai.fullname" . }}-data # Der Name des PVCs.
 | 
				
			||||||
 | 
					  labels:
 | 
				
			||||||
 | 
					    {{- include "paperless-ai.labels" . | nindent 4 }} # Allgemeine Labels für den PVC.
 | 
				
			||||||
 | 
					spec:
 | 
				
			||||||
 | 
					  accessModes:
 | 
				
			||||||
 | 
					    - {{ .Values.persistence.accessMode }} # Der Zugriffsmodus für das Volume.
 | 
				
			||||||
 | 
					  {{- if .Values.persistence.storageClassName }}
 | 
				
			||||||
 | 
					  storageClassName: {{ .Values.persistence.storageClassName }} # Die StorageClass, die für die Bereitstellung des Volumes verwendet werden soll.
 | 
				
			||||||
 | 
					  {{- end }}
 | 
				
			||||||
 | 
					  resources:
 | 
				
			||||||
 | 
					    requests:
 | 
				
			||||||
 | 
					      storage: {{ .Values.persistence.size }} # Die angeforderte Größe des Speichers.
 | 
				
			||||||
 | 
					{{- end }}
 | 
				
			||||||
@@ -1,15 +1,15 @@
 | 
				
			|||||||
 | 
					# service.yaml
 | 
				
			||||||
 | 
					# Definiert einen Kubernetes Service, der den Zugriff auf die Pods des Deployments ermöglicht.
 | 
				
			||||||
apiVersion: v1
 | 
					apiVersion: v1
 | 
				
			||||||
kind: Service
 | 
					kind: Service
 | 
				
			||||||
metadata:
 | 
					metadata:
 | 
				
			||||||
  name: {{ include "paperless-ai.fullname" . }}
 | 
					  name: { { include "paperless-ai.fullname" . } } # Der Name des Services.
 | 
				
			||||||
  labels:
 | 
					  labels: { { - include "paperless-ai.labels" . | nindent 4 } } # Allgemeine Labels für den Service.
 | 
				
			||||||
    {{- include "paperless-ai.labels" . | nindent 4 }}
 | 
					 | 
				
			||||||
spec:
 | 
					spec:
 | 
				
			||||||
  type: {{ .Values.service.type }}
 | 
					  type: { { .Values.service.type } } # Der Typ des Services (z.B. ClusterIP, NodePort, LoadBalancer).
 | 
				
			||||||
  ports:
 | 
					  ports:
 | 
				
			||||||
    - port: {{ .Values.service.port }}
 | 
					    - port: { { .Values.service.port } } # Der Port, auf dem der Service Anfragen empfängt.
 | 
				
			||||||
      targetPort: http
 | 
					      targetPort: { { .Values.service.targetPort } } # Der Port des Pods, an den der Service weiterleitet.
 | 
				
			||||||
      protocol: TCP
 | 
					      protocol: TCP # Das Protokoll des Ports.
 | 
				
			||||||
      name: http
 | 
					      name: http # Name des Service-Ports.
 | 
				
			||||||
  selector:
 | 
					  selector: { { - include "paperless-ai.selectorLabels" . | nindent 4 } } # Selector, um die Pods zu finden, die dieser Service bedient.
 | 
				
			||||||
    {{- include "paperless-ai.selectorLabels" . | nindent 4 }}
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,15 +0,0 @@
 | 
				
			|||||||
apiVersion: v1
 | 
					 | 
				
			||||||
kind: Pod
 | 
					 | 
				
			||||||
metadata:
 | 
					 | 
				
			||||||
  name: "{{ include "paperless-ai.fullname" . }}-test-connection"
 | 
					 | 
				
			||||||
  labels:
 | 
					 | 
				
			||||||
    {{- include "paperless-ai.labels" . | nindent 4 }}
 | 
					 | 
				
			||||||
  annotations:
 | 
					 | 
				
			||||||
    "helm.sh/hook": test
 | 
					 | 
				
			||||||
spec:
 | 
					 | 
				
			||||||
  containers:
 | 
					 | 
				
			||||||
    - name: wget
 | 
					 | 
				
			||||||
      image: busybox
 | 
					 | 
				
			||||||
      command: ['wget']
 | 
					 | 
				
			||||||
      args: ['{{ include "paperless-ai.fullname" . }}:{{ .Values.service.port }}']
 | 
					 | 
				
			||||||
  restartPolicy: Never
 | 
					 | 
				
			||||||
@@ -1,73 +1,60 @@
 | 
				
			|||||||
# Default values for paperless-ai.
 | 
					 | 
				
			||||||
# This is a YAML-formatted file.
 | 
					 | 
				
			||||||
# Declare variables to be passed into your templates.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/
 | 
					 | 
				
			||||||
# Please keep this value to 1, while many instances running a crontab could lead to unknown results.
 | 
					 | 
				
			||||||
replicaCount: 1
 | 
					replicaCount: 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/
 | 
					 | 
				
			||||||
image:
 | 
					image:
 | 
				
			||||||
  repository: clusterzx/paperless-ai
 | 
					  repository: clusterzx/paperless-ai
 | 
				
			||||||
  # This sets the pull policy for images.
 | 
					 | 
				
			||||||
  pullPolicy: IfNotPresent
 | 
					  pullPolicy: IfNotPresent
 | 
				
			||||||
  # Overrides the image tag whose default is the chart appVersion.
 | 
					 | 
				
			||||||
  # Use latest or nightly to be up2date.
 | 
					 | 
				
			||||||
  tag: ""
 | 
					  tag: ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# This is for the secretes for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
 | 
					serviceAccount:
 | 
				
			||||||
imagePullSecrets: []
 | 
					  create: true
 | 
				
			||||||
# This is to override the chart name.
 | 
					 | 
				
			||||||
nameOverride: ""
 | 
					 | 
				
			||||||
fullnameOverride: ""
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# This is for setting Kubernetes Annotations to a Pod.
 | 
					 | 
				
			||||||
# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ 
 | 
					 | 
				
			||||||
podAnnotations: {}
 | 
					 | 
				
			||||||
# This is for setting Kubernetes Labels to a Pod.
 | 
					 | 
				
			||||||
# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
 | 
					 | 
				
			||||||
podLabels: {}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
podSecurityContext: {}
 | 
					 | 
				
			||||||
  # fsGroup: 2000
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
securityContext: {}
 | 
					 | 
				
			||||||
  # capabilities:
 | 
					 | 
				
			||||||
  #   drop:
 | 
					 | 
				
			||||||
  #   - ALL
 | 
					 | 
				
			||||||
  # readOnlyRootFilesystem: true
 | 
					 | 
				
			||||||
  # runAsNonRoot: true
 | 
					 | 
				
			||||||
  # runAsUser: 1000
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/
 | 
					 | 
				
			||||||
service:
 | 
					 | 
				
			||||||
  # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
 | 
					 | 
				
			||||||
  type: ClusterIP
 | 
					 | 
				
			||||||
  # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
 | 
					 | 
				
			||||||
  port: 3000
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/
 | 
					 | 
				
			||||||
ingress:
 | 
					 | 
				
			||||||
  enabled: false
 | 
					 | 
				
			||||||
  className: ""
 | 
					 | 
				
			||||||
  annotations: {}
 | 
					  annotations: {}
 | 
				
			||||||
    # kubernetes.io/ingress.class: nginx
 | 
					  name: ""
 | 
				
			||||||
    # kubernetes.io/tls-acme: "true"
 | 
					 | 
				
			||||||
  hosts:
 | 
					 | 
				
			||||||
    - host: chart-example.local
 | 
					 | 
				
			||||||
      paths:
 | 
					 | 
				
			||||||
        - path: /
 | 
					 | 
				
			||||||
          pathType: ImplementationSpecific
 | 
					 | 
				
			||||||
  tls: []
 | 
					 | 
				
			||||||
  #  - secretName: chart-example-tls
 | 
					 | 
				
			||||||
  #    hosts:
 | 
					 | 
				
			||||||
  #      - chart-example.local
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
resources: {}
 | 
					service:
 | 
				
			||||||
  # We usually recommend not to specify default resources and to leave this as a conscious
 | 
					  type: ClusterIP
 | 
				
			||||||
  # choice for the user. This also increases chances charts run on environments with little
 | 
					  port: 30000
 | 
				
			||||||
  # resources, such as Minikube. If you do want to specify resources, uncomment the following
 | 
					  targetPort: 30000
 | 
				
			||||||
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  PUID: 1027
 | 
				
			||||||
 | 
					  PGID: 100
 | 
				
			||||||
 | 
					  PAPERLESS_AI_PORT: 30000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Konfiguration für persistente Speicherung (Persistent Volume Claim).
 | 
				
			||||||
 | 
					persistence:
 | 
				
			||||||
 | 
					  enabled: true
 | 
				
			||||||
 | 
					  storageClassName: ""
 | 
				
			||||||
 | 
					  accessMode: ReadWriteOnce
 | 
				
			||||||
 | 
					  size: 1Gi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Sicherheitskontext-Einstellungen für Pod und Container.
 | 
				
			||||||
 | 
					securityContext:
 | 
				
			||||||
 | 
					  enabled: true
 | 
				
			||||||
 | 
					  pod:
 | 
				
			||||||
 | 
					    runAsUser: 1027
 | 
				
			||||||
 | 
					    runAsGroup: 100
 | 
				
			||||||
 | 
					    fsGroup: 100
 | 
				
			||||||
 | 
					  container:
 | 
				
			||||||
 | 
					    allowPrivilegeEscalation: false
 | 
				
			||||||
 | 
					    capabilities:
 | 
				
			||||||
 | 
					      drop:
 | 
				
			||||||
 | 
					        - ALL
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Konfiguration für Horizontal Pod Autoscaling (HPA).
 | 
				
			||||||
 | 
					autoscaling:
 | 
				
			||||||
 | 
					  enabled: false
 | 
				
			||||||
 | 
					  minReplicas: 1
 | 
				
			||||||
 | 
					  maxReplicas: 10
 | 
				
			||||||
 | 
					  targetCPUUtilizationPercentage: 80
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Ressourcenanforderungen und -limits für den Container.
 | 
				
			||||||
 | 
					resources:
 | 
				
			||||||
 | 
					  {}
 | 
				
			||||||
 | 
					  # Wir empfehlen in der Regel, keine Standardressourcen anzugeben und dies
 | 
				
			||||||
 | 
					  # dem Benutzer zu überlassen. Dies erhöht auch die Chancen, dass Charts
 | 
				
			||||||
 | 
					  # in Umgebungen mit geringen Ressourcen, wie Minikube, laufen.
 | 
				
			||||||
 | 
					  # Wenn du Ressourcen angeben möchtest, kommentiere die folgenden Zeilen aus,
 | 
				
			||||||
 | 
					  # passe sie bei Bedarf an und entferne die geschweiften Klammern nach 'resources:'.
 | 
				
			||||||
  # limits:
 | 
					  # limits:
 | 
				
			||||||
  #   cpu: 100m
 | 
					  #   cpu: 100m
 | 
				
			||||||
  #   memory: 128Mi
 | 
					  #   memory: 128Mi
 | 
				
			||||||
@@ -75,78 +62,26 @@ resources: {}
 | 
				
			|||||||
  #   cpu: 100m
 | 
					  #   cpu: 100m
 | 
				
			||||||
  #   memory: 128Mi
 | 
					  #   memory: 128Mi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
 | 
					# Node-Selector für die Pod-Platzierung.
 | 
				
			||||||
livenessProbe:
 | 
					 | 
				
			||||||
  initialDelaySeconds: 90
 | 
					 | 
				
			||||||
  httpGet:
 | 
					 | 
				
			||||||
    path: /
 | 
					 | 
				
			||||||
#    path: /health
 | 
					 | 
				
			||||||
    port: http
 | 
					 | 
				
			||||||
readinessProbe:
 | 
					 | 
				
			||||||
  initialDelaySeconds: 90
 | 
					 | 
				
			||||||
  httpGet:
 | 
					 | 
				
			||||||
    path: /
 | 
					 | 
				
			||||||
#    path: /health
 | 
					 | 
				
			||||||
    port: http
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# paperless-ai config 
 | 
					 | 
				
			||||||
paperless:
 | 
					 | 
				
			||||||
  apiUrl: "http://paperless-ngx:8000"
 | 
					 | 
				
			||||||
  apiToken:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
ai:
 | 
					 | 
				
			||||||
  provider: "openai"
 | 
					 | 
				
			||||||
  addProcessedTag: yes
 | 
					 | 
				
			||||||
  processedTagName: ai-processed
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
prompt:
 | 
					 | 
				
			||||||
  useTags: yes
 | 
					 | 
				
			||||||
  tags: Rechnung,Kontoauszug,Vertrag,Arbeitgeber
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
openAi:
 | 
					 | 
				
			||||||
  apiKey: 
 | 
					 | 
				
			||||||
  model: "gpt-4o-mini"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
ollama:
 | 
					 | 
				
			||||||
  apiUrl: ""
 | 
					 | 
				
			||||||
  model: ""
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
scanInterval: "*/30 * * * *"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
systemPrompt: |-
 | 
					 | 
				
			||||||
  Return the result EXCLUSIVELY as a JSON object. The Tags and Title MUST be in the language that is used in the document.:
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    "title": "xxxxx",
 | 
					 | 
				
			||||||
    "correspondent": "xxxxxxxx",
 | 
					 | 
				
			||||||
    "tags": ["Tag1", "Tag2", "Tag3", "Tag4"],
 | 
					 | 
				
			||||||
    "document_date": "YYYY-MM-DD",
 | 
					 | 
				
			||||||
    "language": "en/de/es/..."
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
processPredefinedDocuments: "no"
 | 
					 | 
				
			||||||
tags: "indexed,indexed2"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# additional envs, if neccessary
 | 
					 | 
				
			||||||
envs: []
 | 
					 | 
				
			||||||
#  - name: CONFIG_PATH
 | 
					 | 
				
			||||||
#    value: "/app/config"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
nodeSelector: {}
 | 
					nodeSelector: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Toleranzen für die Pod-Platzierung auf Tainted Nodes.
 | 
				
			||||||
tolerations: []
 | 
					tolerations: []
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Affinitätsregeln für die Pod-Platzierung.
 | 
				
			||||||
affinity: {}
 | 
					affinity: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# persistence volumes needed for configuration and processing data directory
 | 
					# Ingress-Konfiguration (optional, aber üblich für Webanwendungen).
 | 
				
			||||||
persistence:
 | 
					ingress:
 | 
				
			||||||
  config:
 | 
					  enabled: false
 | 
				
			||||||
    mountPath: "/app/config/config.js"
 | 
					  className: "" # Der Ingress-Klassenname (z.B. nginx, traefik).
 | 
				
			||||||
    subPath: "config.js"
 | 
					  annotations: {}
 | 
				
			||||||
  envfile:
 | 
					  hosts:
 | 
				
			||||||
    mountPath: "app/.env"
 | 
					    - host: chart-example.local # Beispiel-Hostname.
 | 
				
			||||||
    subPath: ".env"
 | 
					      paths:
 | 
				
			||||||
  data:
 | 
					        - path: / # Der Pfad, der weitergeleitet werden soll.
 | 
				
			||||||
    enabled: true
 | 
					          pathType: ImplementationSpecific # Der Typ des Pfades (Prefix, Exact, ImplementationSpecific).
 | 
				
			||||||
    size: 1Gi
 | 
					  tls: [] # TLS-Konfiguration für den Ingress.
 | 
				
			||||||
    storageClass: standard
 | 
					  #  - secretName: chart-example-tls # Name des Secrets, das das TLS-Zertifikat enthält.
 | 
				
			||||||
    mountPath: "/app/data"
 | 
					  #    hosts:
 | 
				
			||||||
 | 
					  #      - chart-example.local # Hostnamen, für die das Zertifikat gültig ist.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user