All checks were successful
Build Helm Chart / helm-package (push) Successful in 3s
This commit introduces several significant changes to the Paperless AI Helm chart: - Updated the version from 0.5.0 to 0.6.0 in `Chart.yaml` to reflect the new additions. - Added a new template `paperlessApiSecret.yaml` to define a Kubernetes Secret for the Paperless API token. This allows secure storage of the API token, which is now a required value for communication with the Paperless application. - Introduced a new function in `_helpers.tpl` called `generateEnv` that dynamically generates a `.env` file from various configuration values in `values.yaml`. This includes settings for the Paperless API URL, AI provider, tagging options, scanning intervals, and more. - Updated `values.yaml` to include necessary configurations for the Paperless API, OpenAI, and other related settings, making it easier for users to configure the chart per their requirements. - Adjusted resource limits and initial probe delays for improved performance and quicker health checks. These enhancements provide better configurability and facilitate secure management of sensitive credentials, thereby improving user experience and application reliability.
84 lines
3.2 KiB
Smarty
84 lines
3.2 KiB
Smarty
{{/*
|
|
_helpers.tpl
|
|
Enthält nützliche Template-Funktionen, die in anderen Chart-Templates verwendet werden.
|
|
*/}}
|
|
|
|
{{/*
|
|
Erweitert den Namen des Charts.
|
|
*/}}
|
|
{{- define "paperless-ai.name" -}}
|
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Erstellt einen vollständig qualifizierten App-Namen.
|
|
Wir kürzen auf 63 Zeichen, da einige Kubernetes-Namenfelder darauf beschränkt sind (gemäß DNS-Namensspezifikation).
|
|
Wenn der Release-Name den Chart-Namen enthält, wird er als vollständiger Name verwendet.
|
|
*/}}
|
|
{{- define "paperless-ai.fullname" -}}
|
|
{{- if .Values.fullnameOverride -}}
|
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
|
{{- else -}}
|
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
|
{{- if contains $name .Release.Name -}}
|
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
|
{{- else -}}
|
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Erstellt den Chart-Namen und die Version, wie sie vom Chart-Label verwendet werden.
|
|
*/}}
|
|
{{- define "paperless-ai.chart" -}}
|
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Gängige Labels, die allen Ressourcen hinzugefügt werden.
|
|
*/}}
|
|
{{- define "paperless-ai.labels" -}}
|
|
helm.sh/chart: {{ include "paperless-ai.chart" . }}
|
|
{{ include "paperless-ai.selectorLabels" . }}
|
|
{{- if .Chart.AppVersion }}
|
|
app.kubernetes.io/app-version: {{ .Chart.AppVersion | quote }}
|
|
{{- end }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Selector-Labels, die für die Auswahl von Pods verwendet werden.
|
|
*/}}
|
|
{{- define "paperless-ai.selectorLabels" -}}
|
|
app.kubernetes.io/name: {{ include "paperless-ai.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Erstellt den Namen des zu verwendenden Service Accounts.
|
|
*/}}
|
|
{{- define "paperless-ai.serviceAccountName" -}}
|
|
{{- if .Values.serviceAccount.create -}}
|
|
{{ default (include "paperless-ai.fullname" .) .Values.serviceAccount.name }}
|
|
{{- else -}}
|
|
{{ default "default" .Values.serviceAccount.name }}
|
|
{{- 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 }} |