Skip to content

Commit

Permalink
feat(linkding): add snapshots PVC
Browse files Browse the repository at this point in the history
not VolSynced cuz this is more "nice to have" archival data than critical data
  • Loading branch information
JJGadgets committed Jun 2, 2024
1 parent df58e84 commit 611c22f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions kube/deploy/apps/linkding/app/hr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
main:
type: deployment
replicas: 1
strategy: RollingUpdate # only snapshots data might be written to disk directly, external Postgres used
pod:
labels:
ingress.home.arpa/nginx-internal: "allow"
Expand All @@ -32,11 +33,15 @@ spec:
tag: "1.30.0-plus-alpine@sha256:83a77a850a1b61b97b8f1f75b0bf12b0fd0fd7abd232a4a91faf5efdc9168387"
env:
TZ: "${CONFIG_TZ}"
# Security
LD_ENABLE_OIDC: "True"
LD_CSRF_TRUSTED_ORIGINS: "https://${APP_DNS_LINKDING}"
# Options
LD_SERVER_PORT: &http "8080"
LD_LOG_X_FORWARDED_FOR: "true"
LD_FAVICON_PROVIDER: "https://icons.duckduckgo.com/ip3/{domain}.ico"
LD_SINGLEFILE_PATH: &snap "/snapshots" # archive whole page locally
# Database
LD_DB_ENGINE: "postgres"
LD_DB_OPTIONS: |-
{"sslmode": "require"}
Expand Down Expand Up @@ -114,6 +119,11 @@ spec:
- subPath: "tmp"
path: "/tmp"
readOnly: false
snapshots:
existingClaim: linkding-snapshots
globalMounts:
- subPath: "data"
path: *snap
defaultPodOptions:
automountServiceAccountToken: false
enableServiceLinks: false
Expand Down
18 changes: 18 additions & 0 deletions kube/deploy/apps/linkding/app/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: "linkding-snapshots"
namespace: &app "linkding"
annotations:
description: "PVC for saving Linkding page snapshots (similar to Wayback)"
labels:
app.kubernetes.io/name: *app
snapshot.home.arpa/enabled: "true"
kustomize.toolkit.fluxcd.io/prune: "Disabled"
spec:
storageClassName: "file"
accessModes: ["ReadWriteMany"]
resources:
requests:
storage: "100Gi"

0 comments on commit 611c22f

Please sign in to comment.