k3s/namespaces/core/syncthing.yaml
Jonathan Leech-Pepin e97111a775
Add pg_dumpall backup and core services
Services are non-kustomize so will likely be rebuilt in the future
2025-02-20 20:29:07 -05:00

91 lines
1.7 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: syncthing
namespace: core
spec:
replicas: 1
selector:
matchLabels:
name: syncthing
template:
metadata:
labels:
name: syncthing
spec:
restartPolicy: Always
containers:
- name: syncthing
image: syncthing/syncthing:latest
ports:
- name: http
containerPort: 8384
protocol: TCP
volumeMounts:
- mountPath: /var/syncthing
name: syncthing-data
subPath: "data"
env:
- name: PUID
value: "976"
- name: PGID
value: "976"
volumes:
- name: syncthing-data
persistentVolumeClaim:
claimName: syncthing-data
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: syncthing-data
namespace: core
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn-private
resources:
requests:
storage: 50Gi
---
apiVersion: v1
kind: Service
metadata:
name: syncthing
namespace: core
spec:
type: ClusterIP
selector:
name: syncthing
ports:
- port: 8384
name: http
targetPort: http
protocol: TCP
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: syncthing
namespace: core
spec:
parentRefs:
- name: homelab-gateway
sectionName: web
kind: Gateway
namespace: homelab
hostnames:
- syncthing.leechpepin.local
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: syncthing
namespace: core
port: 8384