73 lines
No EOL
1.7 KiB
Nix
73 lines
No EOL
1.7 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 = {
|
|
containers = [
|
|
{
|
|
name = "storage-combo";
|
|
image = "docker.io/library/rsshfs-server:latest";
|
|
imagePullPolicy = "Never";
|
|
ports = [
|
|
{
|
|
name = "ssh-port";
|
|
containerPort = 2222;
|
|
}
|
|
];
|
|
volumeMounts = [
|
|
{
|
|
name = "fuse-device";
|
|
mountPath = "/dev/fuse";
|
|
}
|
|
];
|
|
securityContext = {
|
|
capabilities.add = ["SYS_ADMIN"];
|
|
privileged = false;
|
|
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;
|
|
}
|
|
];
|
|
};
|
|
}
|
|
];
|
|
} |