diff --git a/kubernetes/talos-flux/apps/productivity/kustomization.yaml b/kubernetes/talos-flux/apps/productivity/kustomization.yaml index 6be7d287d..b854461de 100644 --- a/kubernetes/talos-flux/apps/productivity/kustomization.yaml +++ b/kubernetes/talos-flux/apps/productivity/kustomization.yaml @@ -6,3 +6,4 @@ resources: - ./namespace.yaml - ./excalidraw/flux-sync.yaml - ./scanservjs/flux-sync.yaml + - ./syncthing/flux-sync.yaml diff --git a/kubernetes/talos-flux/apps/productivity/syncthing/app/helm-release.yaml b/kubernetes/talos-flux/apps/productivity/syncthing/app/helm-release.yaml new file mode 100644 index 000000000..c4fc27219 --- /dev/null +++ b/kubernetes/talos-flux/apps/productivity/syncthing/app/helm-release.yaml @@ -0,0 +1,95 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2beta2.json +apiVersion: helm.toolkit.fluxcd.io/v2beta2 +kind: HelmRelease +metadata: + name: syncthing +spec: + interval: 15m + chart: + spec: + chart: app-template + version: 2.5.0 + sourceRef: + kind: HelmRepository + name: bjw-s-charts + namespace: flux-system + interval: 15m + install: + createNamespace: true + remediation: + retries: 5 + upgrade: + remediation: + retries: 5 + values: + controllers: + main: + containers: + main: + image: + repository: syncthing/syncthing + tag: 1.27.2 + resources: + requests: + cpu: 15m + memory: 249Mi + limits: + memory: 265Mi + env: + PUID: "1000" + PGID: "1000" + service: + main: + ports: + http: + port: 8384 + listdisc: + enabled: true + controller: main + type: LoadBalancer + ports: + discovery: + enabled: true + port: 21027 + protocol: UDP + listen: + enabled: true + port: 22000 + protocol: TCP + + ingress: + main: + enabled: true + primary: true + className: traefik + annotations: + cert-manager.io/cluster-issuer: letsencrypt-production + kubernetes.io/tls-acme: "true" + traefik.ingress.kubernetes.io/router.middlewares: traefik-ingress-sso@kubernetescrd + traefik.ingress.kubernetes.io/router.entrypoints: websecure + traefik.ingress.kubernetes.io/affinity: "true" + traefik.ingress.kubernetes.io/router.tls: "true" + hajimari.io/appName: syncthing + hajimari.io/enable: "true" + hajimari.io/icon: folder-sync + hosts: + - host: &host "{{ .Release.Name }}.${SECRET_DOMAIN}" + paths: + - path: / + service: + name: main + port: http + tls: + - hosts: + - *host + secretName: "{{ .Release.Name }}-tls" + + persistence: + config: + enabled: true + type: persistentVolumeClaim + size: 10Gi + storageClass: nfs-csi + globalMounts: + - path: /var/syncthing diff --git a/kubernetes/talos-flux/apps/productivity/syncthing/app/kustomization.yaml b/kubernetes/talos-flux/apps/productivity/syncthing/app/kustomization.yaml new file mode 100644 index 000000000..95f5e22fa --- /dev/null +++ b/kubernetes/talos-flux/apps/productivity/syncthing/app/kustomization.yaml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: productivity +resources: + - ./helm-release.yaml diff --git a/kubernetes/talos-flux/apps/productivity/syncthing/flux-sync.yaml b/kubernetes/talos-flux/apps/productivity/syncthing/flux-sync.yaml new file mode 100644 index 000000000..10efdeb3b --- /dev/null +++ b/kubernetes/talos-flux/apps/productivity/syncthing/flux-sync.yaml @@ -0,0 +1,19 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1beta2.json +apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +kind: Kustomization +metadata: + name: apps-syncthing + namespace: flux-system + labels: + substitution.flux.home.arpa/enabled: "true" +spec: + interval: 30m + retryInterval: 15s + timeout: 3m + path: ./kubernetes/talos-flux/apps/productivity/syncthing/app + prune: true + wait: true + sourceRef: + kind: GitRepository + name: home-ops