Files
HelmChartSammlung/charts/paperless-ai/templates/_helpers.tpl
Marko Oldenburg ba732eb734
Some checks failed
Build Helm Chart / helm-package (push) Failing after 3s
Refactor paperless-ai Helm chart for improved configuration
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.
2025-07-06 09:02:17 +02:00

68 lines
2.1 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 -}}