diff --git a/apps/rss/ingress.yaml b/apps/rss/ingress.yaml index 7248766..29f3225 100644 --- a/apps/rss/ingress.yaml +++ b/apps/rss/ingress.yaml @@ -14,4 +14,3 @@ spec: port: 80 tls: certResolver: default-tls - \ No newline at end of file diff --git a/apps/syncthing/deployment.yaml b/apps/syncthing/deployment.yaml new file mode 100644 index 0000000..322b7d4 --- /dev/null +++ b/apps/syncthing/deployment.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: syncthing +spec: + selector: + matchLabels: + app: syncthing + template: + metadata: + labels: + app: syncthing + spec: + containers: + - name: syncthing + image: syncthing + resources: + limits: + memory: "256Mi" + cpu: "500m" + ports: + - containerPort: 8384 + name: syncthing-web + protocol: TCP + - containerPort: 22000 + protocol: TCP + name: syncthing-listen + - containerPort: 22000 + protocol: UDP + name: syncthing-discover + volumeMounts: + - name: persistence + mountPath: /var/syncthing + volumes: + - name: persistence + persistentVolumeClaim: + claimName: syncthing-claim diff --git a/apps/syncthing/ingress.yaml b/apps/syncthing/ingress.yaml new file mode 100644 index 0000000..62166e3 --- /dev/null +++ b/apps/syncthing/ingress.yaml @@ -0,0 +1,16 @@ +apiVersion: traefik.containo.us/v1alpha1 +kind: IngressRoute +metadata: + name: rss-ingressroute + +spec: + entryPoints: + - websecure + routes: + - match: Host(`syncthing.kluster.moll.re`) + kind: Rule + services: + - name: syncthing-web + port: 8384 + tls: + certResolver: default-tls diff --git a/apps/syncthing/kustomization.yaml b/apps/syncthing/kustomization.yaml new file mode 100644 index 0000000..12915c8 --- /dev/null +++ b/apps/syncthing/kustomization.yaml @@ -0,0 +1,16 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: syncthing + +resources: + - namespace.yaml + - pvc.yaml + - deployment.yaml + - service.yaml + - ingress.yaml + +images: + - name: syncthing + newName: syncthing + newTag: v1.27 diff --git a/apps/syncthing/namespace.yaml b/apps/syncthing/namespace.yaml new file mode 100644 index 0000000..0a074bd --- /dev/null +++ b/apps/syncthing/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: placeholder diff --git a/apps/syncthing/pvc.yaml b/apps/syncthing/pvc.yaml new file mode 100644 index 0000000..5a1de47 --- /dev/null +++ b/apps/syncthing/pvc.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: syncthing-claim +spec: + storageClassName: nfs-client + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi diff --git a/apps/syncthing/service.yaml b/apps/syncthing/service.yaml new file mode 100644 index 0000000..c0746e3 --- /dev/null +++ b/apps/syncthing/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: syncthing +spec: + selector: + app: syncthing + type: LoadBalancer + LoadBalancerIP: 192.168.3.4 + ports: + - port: 8384 + targetPort: 8384 + name: syncthing-web + - port: 22000 + targetPort: 22000 + name: syncthing-listen + - port: 22000 + targetPort: 22000 + name: syncthing-discover diff --git a/kluster-deployments/kustomization.yaml b/kluster-deployments/kustomization.yaml index 11f4730..4ca45a0 100644 --- a/kluster-deployments/kustomization.yaml +++ b/kluster-deployments/kustomization.yaml @@ -21,6 +21,7 @@ resources: # simple apps + - monitoring/ - homarr/ - whoami/ - journal/ @@ -31,4 +32,4 @@ resources: - adguard/ - media/ - nextcloud/ - - monitoring/ + - syncthing/ \ No newline at end of file diff --git a/kluster-deployments/syncthing/application.yaml b/kluster-deployments/syncthing/application.yaml new file mode 100644 index 0000000..4f2070b --- /dev/null +++ b/kluster-deployments/syncthing/application.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: syncthing-application + namespace: argocd + +spec: + project: apps + source: + repoURL: ssh://git@git.kluster.moll.re:2222/remoll/k3s-infra.git + targetRevision: main + path: apps/syncthing + destination: + server: https://kubernetes.default.svc + namespace: syncthing + syncPolicy: + automated: + prune: true + selfHeal: true diff --git a/kluster-deployments/syncthing/kustomization.yaml b/kluster-deployments/syncthing/kustomization.yaml new file mode 100644 index 0000000..977dcfe --- /dev/null +++ b/kluster-deployments/syncthing/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - application.yaml