_syncthing.tpl 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {{- define "syncthing.workload" -}}
  2. workload:
  3. syncthing:
  4. enabled: true
  5. primary: true
  6. type: Deployment
  7. podSpec:
  8. securityContext:
  9. fsGroup: {{ .Values.syncthingID.group }}
  10. hostNetwork: {{ .Values.syncthingNetwork.hostNetwork }}
  11. containers:
  12. syncthing:
  13. enabled: true
  14. primary: true
  15. imageSelector: image
  16. securityContext:
  17. runAsUser: 0
  18. runAsGroup: 0
  19. runAsNonRoot: false
  20. readOnlyRootFilesystem: false
  21. # This is needed to allow syncthing assign
  22. # PCAPs to its child processes
  23. allowPrivilegeEscalation: true
  24. capabilities:
  25. add:
  26. - FOWNER
  27. - DAC_OVERRIDE
  28. - CHOWN
  29. - SETUID
  30. - SETGID
  31. - SETFCAP
  32. - SETPCAP
  33. - SYS_ADMIN
  34. env:
  35. STGUIADDRESS: 0.0.0.0:{{ .Values.syncthingNetwork.webPort }}
  36. STNOUPGRADE: "true"
  37. fixedEnv:
  38. PUID: {{ .Values.syncthingID.user }}
  39. {{ with .Values.syncthingConfig.additionalEnvs }}
  40. envList:
  41. {{ range $env := . }}
  42. - name: {{ $env.name }}
  43. value: {{ $env.value }}
  44. {{ end }}
  45. {{ end }}
  46. probes:
  47. liveness:
  48. enabled: true
  49. type: http
  50. path: /rest/noauth/health
  51. port: {{ .Values.syncthingNetwork.webPort }}
  52. readiness:
  53. enabled: true
  54. type: http
  55. path: /rest/noauth/health
  56. port: {{ .Values.syncthingNetwork.webPort }}
  57. startup:
  58. enabled: true
  59. type: http
  60. path: /rest/noauth/health
  61. port: {{ .Values.syncthingNetwork.webPort }}
  62. {{- end -}}