110 lines
2.1 KiB
YAML
110 lines
2.1 KiB
YAML
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Namespace
|
||
|
metadata:
|
||
|
name: syncthing
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: PersistentVolumeClaim
|
||
|
metadata:
|
||
|
name: syncthing-data
|
||
|
namespace: syncthing
|
||
|
spec:
|
||
|
accessModes:
|
||
|
- ReadWriteOnce
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: 5Gi
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: PersistentVolume
|
||
|
metadata:
|
||
|
name: syncthing-share-pv
|
||
|
spec:
|
||
|
capacity:
|
||
|
storage: 1000Gi
|
||
|
accessModes:
|
||
|
- ReadWriteOnce
|
||
|
persistentVolumeReclaimPolicy: Retain
|
||
|
hostPath:
|
||
|
path: /dpool/files
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: PersistentVolumeClaim
|
||
|
metadata:
|
||
|
name: syncthing-share
|
||
|
namespace: syncthing
|
||
|
spec:
|
||
|
accessModes:
|
||
|
- ReadWriteOnce
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: 1000Gi
|
||
|
volumeName: syncthing-share-pv
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: syncthing
|
||
|
namespace: syncthing
|
||
|
spec:
|
||
|
replicas: 1
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: syncthing
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: syncthing
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: syncthing
|
||
|
image: syncthing/syncthing:latest
|
||
|
ports:
|
||
|
- containerPort: 8384
|
||
|
- containerPort: 22000
|
||
|
- containerPort: 21027
|
||
|
protocol: UDP
|
||
|
volumeMounts:
|
||
|
- name: syncthing-data
|
||
|
mountPath: /var/syncthing
|
||
|
- name: syncthing-share
|
||
|
mountPath: /shared
|
||
|
securityContext:
|
||
|
runAsUser: 1000
|
||
|
runAsGroup: 1000
|
||
|
fsGroup: 1000
|
||
|
volumes:
|
||
|
- name: syncthing-data
|
||
|
persistentVolumeClaim:
|
||
|
claimName: syncthing-data
|
||
|
- name: syncthing-share
|
||
|
persistentVolumeClaim:
|
||
|
claimName: syncthing-share
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: syncthing
|
||
|
namespace: syncthing
|
||
|
spec:
|
||
|
selector:
|
||
|
app: syncthing
|
||
|
ports:
|
||
|
- name: web-ui
|
||
|
port: 8384
|
||
|
targetPort: 8384
|
||
|
- name: sync-tcp
|
||
|
port: 22000
|
||
|
targetPort: 22000
|
||
|
- name: sync-udp
|
||
|
port: 22000
|
||
|
protocol: UDP
|
||
|
targetPort: 22000
|
||
|
- name: discovery
|
||
|
port: 21027
|
||
|
protocol: UDP
|
||
|
targetPort: 21027
|
||
|
type: ClusterIP
|
||
|
|