All checks were successful
Build Helm Chart / helm-package (push) Successful in 5s
Updated the appVersion in Chart.yaml from 3.0.9 to 3.0.10 to reflect the latest version of Paperless AI. In the deployment.yaml, added a new volume mount for a public images directory at '/app/public/images' with a size limit of 100Mi. This change ensures that the application has a dedicated space for public images, which can help in organizing image storage and manage resources more effectively. No breaking changes are introduced with this update.
94 lines
4.1 KiB
YAML
94 lines
4.1 KiB
YAML
# deployment.yaml
|
|
# Definiert das Kubernetes Deployment für die Paperless AI Anwendung.
|
|
# Ein Deployment verwaltet die Erstellung und Skalierung von Pods.
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "paperless-ai.fullname" . }} # Der Name des Deployments, generiert mit dem fullname-Template.
|
|
labels:
|
|
{{- include "paperless-ai.labels" . | nindent 4 }} # Allgemeine Labels für das Deployment.
|
|
spec:
|
|
{{- if not .Values.autoscaling.enabled }}
|
|
replicas: {{ .Values.replicaCount }} # Anzahl der gewünschten Pod-Replikate, wenn Autoscaling deaktiviert ist.
|
|
{{- end }}
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
{{- include "paperless-ai.selectorLabels" . | nindent 6 }} # Selector, um die Pods zu finden, die zu diesem Deployment gehören.
|
|
template:
|
|
metadata:
|
|
{{- with .Values.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }} # Zusätzliche Anmerkungen für den Pod.
|
|
{{- end }}
|
|
labels:
|
|
{{- include "paperless-ai.selectorLabels" . | nindent 8 }} # Labels für den Pod.
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }} # Secrets für den Image-Pull, falls private Registries verwendet werden.
|
|
{{- end }}
|
|
serviceAccountName: {{ include "paperless-ai.serviceAccountName" . }} # Der zu verwendende Service Account.
|
|
{{- if .Values.securityContext.enabled }}
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext.pod | nindent 8 }} # Sicherheitskontext-Einstellungen für den gesamten Pod.
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ .Chart.Name }} # Name des Containers.
|
|
{{- if .Values.securityContext.enabled }}
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext.container | nindent 12 }} # Sicherheitskontext-Einstellungen für diesen Container.
|
|
{{- end }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" # Das zu verwendende Image.
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }} # Die Image-Pull-Policy.
|
|
ports:
|
|
- name: http # Name des Ports.
|
|
containerPort: {{ .Values.service.targetPort }} # Der Port, der im Container geöffnet ist.
|
|
protocol: TCP # Das Protokoll des Ports.
|
|
livenessProbe:
|
|
{{- toYaml .Values.livenessProbe | nindent 12 }}
|
|
readinessProbe:
|
|
{{- toYaml .Values.readinessProbe | nindent 12 }}
|
|
env:
|
|
{{- range $key, $value := .Values.env }}
|
|
- name: {{ $key }} # Name der Umgebungsvariable.
|
|
value: {{ $value | quote }} # Wert der Umgebungsvariable.
|
|
{{- end }}
|
|
volumeMounts:
|
|
- name: logs-dir
|
|
mountPath: /app/logs
|
|
- name: public-images-dir
|
|
mountPath: /app/public/images
|
|
{{- if .Values.persistence.enabled }}
|
|
- name: paperless-ai-data # Name des Volumes, das gemountet werden soll.
|
|
mountPath: /app/data # Der Pfad im Container, an dem das Volume gemountet wird.
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }} # Ressourcenanforderungen und -limits für den Container.
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }} # Node-Selector-Regeln für die Pod-Platzierung.
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }} # Affinitätsregeln für die Pod-Platzierung.
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }} # Toleranzen für die Pod-Platzierung auf Tainted Nodes.
|
|
{{- end }}
|
|
|
|
volumes:
|
|
- name: public-images-dir
|
|
emptyDir:
|
|
sizeLimit: 100Mi
|
|
- name: logs-dir
|
|
emptyDir:
|
|
sizeLimit: 100Mi
|
|
{{- if .Values.persistence.enabled }}
|
|
- 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 }}
|