From c2cdc2d5c1807f73df504316c93e95e22d61110d Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Sat, 21 Nov 2026 16:47:03 -0500 Subject: [PATCH] apps(osint): move osint-db onto a linode-local PVC osint-db (TimescaleDB+PostGIS) moves from siriussec's local-path PV to a new 15Gi local-path-linode claim restored from a pg_dump (44,120,765 bytes, sha256 d74afa6d...30da). The Deployment gets a required linode nodeAffinity plus an amd64 arch selector; the old osint-pgdata claim and its PV are left untouched so rollback is one revert of claimName + scheduling. --- apps/base/osint/kustomization.yaml | 1 + apps/base/osint/postgres-deployment.yaml | 16 ++++++++++++++-- apps/base/osint/postgres-pvc-linode.yaml | 16 ++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 apps/base/osint/postgres-pvc-linode.yaml diff --git a/apps/base/osint/kustomization.yaml b/apps/base/osint/kustomization.yaml index e002a5c..02eb79c 100644 --- a/apps/base/osint/kustomization.yaml +++ b/apps/base/osint/kustomization.yaml @@ -4,6 +4,7 @@ resources: - namespace.yaml - configmap.yaml - postgres-pvc.yaml + - postgres-pvc-linode.yaml - postgres-deployment.yaml - postgres-service.yaml - nats-deployment.yaml diff --git a/apps/base/osint/postgres-deployment.yaml b/apps/base/osint/postgres-deployment.yaml index 936873b..2c84ab7 100644 --- a/apps/base/osint/postgres-deployment.yaml +++ b/apps/base/osint/postgres-deployment.yaml @@ -27,8 +27,20 @@ spec: - key: dedicated operator: Exists effect: PreferNoSchedule + # Local-path volume: the claim (osint-pgdata-linode) is pinned to linode by + # its PV, so the pod must be too. arch selector documents why: the image is + # amd64-only, as on every other node this can land on. nodeSelector: - kubernetes.io/hostname: siriussec + kubernetes.io/arch: amd64 + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - linode containers: - name: postgres image: forgejo.siriusdevops.com/sirius/osint-dashboard-pg:amd64-c48788d4b614-r2 @@ -79,4 +91,4 @@ spec: volumes: - name: pgdata persistentVolumeClaim: - claimName: osint-pgdata + claimName: osint-pgdata-linode diff --git a/apps/base/osint/postgres-pvc-linode.yaml b/apps/base/osint/postgres-pvc-linode.yaml new file mode 100644 index 0000000..a7dc02b --- /dev/null +++ b/apps/base/osint/postgres-pvc-linode.yaml @@ -0,0 +1,16 @@ +# Post-migration home for osint-db: a linode-local volume. +# Kept separate from postgres-pvc.yaml (osint-pgdata, on siriussec) so a +# rollback is one revert of the Deployment's claimName; the old claim and its +# PV stay untouched and Bound. +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: osint-pgdata-linode + namespace: osint +spec: + accessModes: + - ReadWriteOnce + storageClassName: local-path-linode + resources: + requests: + storage: 15Gi