summaryrefslogtreecommitdiff
path: root/f3s/syncthing/helm-chart/templates/deployment.yaml
blob: f0d55e39db089cf4fe2edba3124196d0c37d6666 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
apiVersion: apps/v1
kind: Deployment
metadata:
  name: syncthing
  namespace: services
spec:
  replicas: 1
  # Use Recreate strategy to avoid file lock conflicts with RWO volumes
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: syncthing
  template:
    metadata:
      labels:
        app: syncthing
    spec:
      containers:
      - name: syncthing
        image: lscr.io/linuxserver/syncthing:latest
        ports:
        - containerPort: 8384
        - containerPort: 22000
        # Startup probe: give syncthing time to initialize (especially if NFS is slow)
        startupProbe:
          httpGet:
            path: /
            port: 8384
          initialDelaySeconds: 10
          periodSeconds: 5
          timeoutSeconds: 3
          failureThreshold: 24  # 120 seconds total (24 * 5s)
        # Liveness probe: restart pod if syncthing becomes unresponsive (stale NFS)
        livenessProbe:
          httpGet:
            path: /
            port: 8384
          periodSeconds: 30
          timeoutSeconds: 5
          failureThreshold: 3  # Restart after 90 seconds of failures
        # Readiness probe: remove from service if not ready
        readinessProbe:
          httpGet:
            path: /
            port: 8384
          periodSeconds: 10
          timeoutSeconds: 3
          failureThreshold: 2
        volumeMounts:
        - name: syncthing-config
          mountPath: /config
        - name: syncthing-data
          mountPath: /data
      volumes:
      - name: syncthing-config
        persistentVolumeClaim:
          claimName: syncthing-config-pvc
      - name: syncthing-data
        persistentVolumeClaim:
          claimName: syncthing-data-pvc