92 lines
1.7 KiB
YAML
92 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
|