Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/paperless-gpt/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sources:
- https://github.com/taskmedia/helm
icon: https://media.task.media/images/logo.png
type: application
version: 0.1.0
version: 0.2.0
# upstream image tag without the leading v
appVersion: "0.29.0"

Expand All @@ -31,4 +31,4 @@ annotations:
image: icereed/paperless-gpt:v0.29.0
artifacthub.io/changes: |
- kind: added
description: Initial chart for paperless-gpt
description: Optional ingress (ingress.*) for cert-manager and authenticating proxy integration
22 changes: 20 additions & 2 deletions charts/paperless-gpt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Helm chart for [paperless-gpt](https://github.com/icereed/paperless-gpt), an LLM
metadata assistant for [paperless-ngx](https://docs.paperless-ngx.com/). It uses the official
upstream image `icereed/paperless-gpt`.

> **paperless-gpt has no built-in authentication.** The chart creates a `ClusterIP` service only;
> put an authenticating proxy (e.g. forward-auth) in front of any ingress.
> **paperless-gpt has no built-in authentication.** The ingress is disabled by default; always put
> an authenticating proxy (e.g. forward-auth) in front of it.

## Usage

Expand Down Expand Up @@ -56,6 +56,24 @@ config:
Any upstream [environment variable](https://github.com/icereed/paperless-gpt#configuration) can be
set via `config` (plain), `secretConfig` (stored in a chart-managed secret) or `existingSecret`.

## Ingress

Optional standard `Ingress`; with the cert-manager annotation the TLS certificate is created
automatically (example for Traefik, cert-manager and an authentik forward-auth middleware):

```yaml
ingress:
enabled: true
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
traefik.ingress.kubernetes.io/router.middlewares: authentik-proxy@kubernetescrd
host: gpt.example.com
tls:
secretName: paperless-gpt-tls
```

## Notes

- Runs a single replica with the `Recreate` strategy: state is a local SQLite database.
Expand Down
33 changes: 33 additions & 0 deletions charts/paperless-gpt/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "{{ include "paperlessgpt.fullname" . }}"
labels:
{{- include "paperlessgpt.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.ingress.className }}
ingressClassName: {{ . }}
{{- end }}
{{- with .Values.ingress.tls.secretName }}
tls:
- secretName: {{ . }}
hosts:
- {{ required "ingress.host is required" $.Values.ingress.host | quote }}
{{- end }}
rules:
- host: {{ required "ingress.host is required" .Values.ingress.host | quote }}
http:
paths:
- path: {{ .Values.ingress.path }}
pathType: {{ .Values.ingress.pathType }}
backend:
service:
name: "{{ include "paperlessgpt.fullname" . }}"
port:
name: http
{{- end }}
23 changes: 23 additions & 0 deletions charts/paperless-gpt/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,29 @@ service:
port: 8080
annotations: {}

# ingress exposes the service. paperless-gpt has no built-in authentication:
# always add an authenticating proxy (e.g. forward-auth middleware) in front.
# Example (Traefik + cert-manager + authentik):
# enabled: true
# annotations:
# cert-manager.io/cluster-issuer: letsencrypt-prod
# traefik.ingress.kubernetes.io/router.entrypoints: websecure
# traefik.ingress.kubernetes.io/router.tls: "true"
# traefik.ingress.kubernetes.io/router.middlewares: authentik-proxy@kubernetescrd
# host: gpt.example.com
# tls:
# secretName: paperless-gpt-tls
ingress:
enabled: false
className: ""
annotations: {}
host: ""
path: /
pathType: Prefix
tls:
# secretName enables TLS for ingress.host (certificate e.g. created by cert-manager)
secretName: ""

# runs as non-root; the entrypoint then skips PUID/PGID handling
podSecurityContext:
runAsNonRoot: true
Expand Down
Loading