74 lines
No EOL
1.8 KiB
Nix
74 lines
No EOL
1.8 KiB
Nix
{ ... }:
|
|
{
|
|
storage-combo.content = [
|
|
{
|
|
apiVersion = "apps/v1";
|
|
kind = "Deployment";
|
|
metadata = {
|
|
name = "storage-combo";
|
|
labels.app = "storage-combo";
|
|
};
|
|
spec = {
|
|
selector.matchLabels.app = "storage-combo";
|
|
template = {
|
|
metadata = {
|
|
labels.app = "storage-combo";
|
|
};
|
|
spec = {
|
|
hostUsers = false;
|
|
containers = [
|
|
{
|
|
name = "storage-combo";
|
|
image = "docker.io/library/rsshfs-server:latest";
|
|
imagePullPolicy = "Never";
|
|
ports = [
|
|
{
|
|
name = "ssh-port";
|
|
containerPort = 2222;
|
|
}
|
|
];
|
|
resources.limits."devic.es/fuse" = 1;
|
|
# volumeMounts = [
|
|
# {
|
|
# name = "fuse-device";
|
|
# mountPath = "/dev/fuse";
|
|
# }
|
|
# ];
|
|
securityContext = {
|
|
capabilities.add = ["SYS_ADMIN"];
|
|
runAsUser = 0;
|
|
runAsGroup = 0;
|
|
};
|
|
}
|
|
];
|
|
# volumes = [
|
|
# {
|
|
# name = "fuse-device";
|
|
# hostPath = {
|
|
# path = "/dev/fuse";
|
|
# type = "CharDevice";
|
|
# };
|
|
# }
|
|
# ];
|
|
};
|
|
};
|
|
};
|
|
}
|
|
{
|
|
apiVersion = "v1";
|
|
kind = "Service";
|
|
metadata.name = "rsshfs-server";
|
|
spec = {
|
|
selector.app = "storage-combo";
|
|
ports = [
|
|
{
|
|
name = "ssh-port";
|
|
protocol = "TCP";
|
|
port = 22;
|
|
targetPort = 2222;
|
|
}
|
|
];
|
|
};
|
|
}
|
|
];
|
|
} |