Migrate syncthing data to longhorn

This commit is contained in:
Pim Kunis 2024-05-23 21:34:29 +02:00
parent 44704472b4
commit 2077f1f9a3
3 changed files with 44 additions and 40 deletions

View file

@ -6,46 +6,51 @@
TZ = "Europe/Amsterdam";
};
# deployments.syncthing = {
# metadata.labels.app = "syncthing";
deployments.syncthing = {
metadata.labels.app = "syncthing";
# spec = {
# selector.matchLabels.app = "syncthing";
spec = {
selector.matchLabels.app = "syncthing";
# template = {
# metadata.labels.app = "syncthing";
template = {
metadata.labels.app = "syncthing";
# spec = {
# containers.syncthing = {
# image = "lscr.io/linuxserver/syncthing:1.23.6";
# envFrom = [{ configMapRef.name = "syncthing"; }];
# ports.web.containerPort = 8384;
spec = {
containers.syncthing = {
image = "lscr.io/linuxserver/syncthing:1.23.6";
envFrom = [{ configMapRef.name = "syncthing"; }];
ports.web.containerPort = 8384;
# volumeMounts = [
# {
# name = "config";
# mountPath = "/config";
# }
# {
# name = "nextcloud-data";
# mountPath = "/data";
# }
# {
# name = "music";
# mountPath = "/music";
# }
# ];
# };
volumeMounts = [
{
name = "config";
mountPath = "/config";
}
{
name = "nextcloud-data";
mountPath = "/data";
}
{
name = "music";
mountPath = "/music";
}
];
};
# volumes = {
# config.persistentVolumeClaim.claimName = "syncthing";
# nextcloud-data.persistentVolumeClaim.claimName = "nextcloud";
# music.persistentVolumeClaim.claimName = "music";
# };
# };
# };
# };
# };
volumes = {
config.persistentVolumeClaim.claimName = "syncthing";
nextcloud-data.persistentVolumeClaim.claimName = "nextcloud";
music.persistentVolumeClaim.claimName = "music";
};
securityContext = {
fsGroup = 33;
fsGroupChangePolicy = "OnRootMismatch";
};
};
};
};
};
services.syncthing.spec = {
selector.app = "syncthing";

View file

@ -5,14 +5,14 @@
# volumeMounts = [
# {
# name = "kitchenowl";
# mountPath = "/kitchenowl";
# name = "syncthing";
# mountPath = "/syncthing";
# }
# ];
# };
# volumes = {
# kitchenowl.persistentVolumeClaim.claimName = "kitchenowl";
# syncthing.persistentVolumeClaim.claimName = "syncthing";
# };
# };
@ -27,6 +27,7 @@
pihole-dnsmasq.storage = "16Mi";
forgejo.storage = "20Gi";
kitchenowl.storage = "100Mi";
syncthing.storage = "400Mi";
};
nfsVolumes = {
@ -40,7 +41,6 @@
sonarr-config.path = "sonarr/config";
bazarr-config.path = "bazarr/config";
atticd.path = "atticd";
syncthing.path = "syncthing/config";
paperless-ngx-redisdata.path = "paperless-ngx/redisdata";
paperless-ngx-data.path = "paperless-ngx/data";
};

View file

@ -3,7 +3,6 @@ let
cfg = config.lab.data-sharing;
nfsShares = [
"/syncthing/config"
"/paperless-ngx/data"
"/paperless-ngx/redisdata"
"/media"