pod to deployment

This commit is contained in:
NyxErinys 2026-05-27 02:10:33 -05:00
parent 5957426c30
commit d6cca37b8e
2 changed files with 53 additions and 42 deletions

View file

@ -55,7 +55,7 @@ in
systemd.services.k3s = {
restartTriggers = [
(builtins.attrNames config.services.k3s.manifests)
(builtins.toJSON config.services.k3s.manifests)
];
stopIfChanged = false;
after = [ "rpcbind.service" "network-online.target" ];

View file

@ -2,51 +2,62 @@
{
ubuntu-test.content = [
{
apiVersion = "v1";
kind = "Pod";
metadata.name = "ubuntu-test";
apiVersion = "apps/v1";
kind = "Deployment";
metadata = {
name = "ubuntu-test";
labels.app = "ubuntu-test"
};
spec = {
containers = [
{
name = "ubuntu-test";
image = "ubuntu:latest";
command = [ "tail" "-f" "/dev/null" ];
volumeMounts = [
selector.matchLabels.app = "ubuntu-test";
template = {
metadata = {
labels.app = "ubuntu-test";
};
spec = {
containers = [
{
mountPath = "/test";
name = "test";
subPath = "ubuntu-test";
}
{
mountPath = "/test2";
name = "iscsi";
}
{
mountPath = "/test3";
name = "iscsi";
subPath = "test";
name = "ubuntu-test";
image = "ubuntu:26.04";
command = [ "tail" "-f" "/dev/null" ];
volumeMounts = [
{
mountPath = "/test";
name = "test";
subPath = "ubuntu-test";
}
{
mountPath = "/test2";
name = "iscsi";
}
{
mountPath = "/test3";
name = "iscsi";
subPath = "test";
}
];
}
];
}
];
volumes = [
{
name = "test";
persistentVolumeClaim = {
claimName = "nfs-main-pvc";
};
}
{
name = "iscsi";
iscsi = {
targetPortal = "10.5.0.2:3260";
iqn = "iqn.2026-01.dev.nyxerinys:poseidon.authentik";
lun = 0;
fsType = "xfs";
readOnly = false;
};
}
];
volumes = [
{
name = "test";
persistentVolumeClaim = {
claimName = "nfs-main-pvc";
};
}
{
name = "iscsi";
iscsi = {
targetPortal = "10.5.0.2:3260";
iqn = "iqn.2026-01.dev.nyxerinys:poseidon.authentik";
lun = 0;
fsType = "xfs";
readOnly = false;
};
}
];
};
};
};
}
];