From 9f83c8161bc35d21f0cf0505218c95d4e1b29500 Mon Sep 17 00:00:00 2001 From: JJGadgets Date: Thu, 17 Jul 2025 23:51:38 +0800 Subject: [PATCH] fix(linkding): correct env for snapshot dest, separate deploy --- kube/deploy/apps/linkding/app/pvc.yaml | 2 +- kube/deploy/apps/linkding/ks.yaml | 30 +++++++++++++++++++ .../cilium/netpols/labelled-allow-egress.yaml | 24 +++++++-------- 3 files changed, 43 insertions(+), 13 deletions(-) diff --git a/kube/deploy/apps/linkding/app/pvc.yaml b/kube/deploy/apps/linkding/app/pvc.yaml index 6c8d4478..156d9fe5 100644 --- a/kube/deploy/apps/linkding/app/pvc.yaml +++ b/kube/deploy/apps/linkding/app/pvc.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: "linkding-snapshots" + name: "linkding-misc" namespace: &app "linkding" annotations: description: "PVC for saving Linkding page snapshots (similar to Wayback)" diff --git a/kube/deploy/apps/linkding/ks.yaml b/kube/deploy/apps/linkding/ks.yaml index 4e853d88..906e1477 100644 --- a/kube/deploy/apps/linkding/ks.yaml +++ b/kube/deploy/apps/linkding/ks.yaml @@ -17,6 +17,7 @@ spec: - name: crds namespace: flux-system - name: linkding-pvc + - name: linkding-snapshots-pvc --- apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization @@ -46,3 +47,32 @@ spec: RUID: &uid "1000" RGID: *uid RFSG: *uid +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: linkding-snapshots-pvc + namespace: flux-system + labels: &l + app.kubernetes.io/name: linkding + pvc.home.arpa/volsync: "true" +spec: + targetNamespace: linkding + commonMetadata: + labels: *l + path: ./kube/deploy/core/storage/volsync/template + dependsOn: + - name: crds + namespace: flux-system + postBuild: + substitute: + PVC: "linkding-snapshots" + SIZE: "100Gi" + SC: &sc "file-ec-2-1" + SNAP: *sc + ACCESSMODE: "ReadWriteMany" + SNAP_ACCESSMODE: "ReadOnlyMany" + VS_APP_CURRENT_VERSION: "ghcr.io/sissbruecker/linkding:1.41.0-plus@sha256:a222fb777e1fade891eabfa037e67ff4514f96b87be746060b027b5c84a8e1ce" + RUID: &uid "1000" + RGID: *uid + RFSG: *uid diff --git a/kube/deploy/core/_networking/cilium/netpols/labelled-allow-egress.yaml b/kube/deploy/core/_networking/cilium/netpols/labelled-allow-egress.yaml index e464f136..4ff8735f 100644 --- a/kube/deploy/core/_networking/cilium/netpols/labelled-allow-egress.yaml +++ b/kube/deploy/core/_networking/cilium/netpols/labelled-allow-egress.yaml @@ -1,15 +1,15 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/cilium.io/ciliumnetworkpolicy_v2.json -apiVersion: cilium.io/v2 -kind: CiliumNetworkPolicy -metadata: - name: apiserver - namespace: default -spec: - endpointSelector: - matchLabels: - component: apiserver - provider: kubernetes +# --- +# # yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/cilium.io/ciliumnetworkpolicy_v2.json +# apiVersion: cilium.io/v2 +# kind: CiliumNetworkPolicy +# metadata: +# name: apiserver +# namespace: default +# spec: +# endpointSelector: +# matchLabels: +# component: apiserver +# provider: kubernetes --- # yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/cilium.io/ciliumclusterwidenetworkpolicy_v2.json apiVersion: cilium.io/v2