pod to deployment
This commit is contained in:
parent
5957426c30
commit
d6cca37b8e
2 changed files with 53 additions and 42 deletions
|
|
@ -55,7 +55,7 @@ in
|
||||||
|
|
||||||
systemd.services.k3s = {
|
systemd.services.k3s = {
|
||||||
restartTriggers = [
|
restartTriggers = [
|
||||||
(builtins.attrNames config.services.k3s.manifests)
|
(builtins.toJSON config.services.k3s.manifests)
|
||||||
];
|
];
|
||||||
stopIfChanged = false;
|
stopIfChanged = false;
|
||||||
after = [ "rpcbind.service" "network-online.target" ];
|
after = [ "rpcbind.service" "network-online.target" ];
|
||||||
|
|
|
||||||
|
|
@ -2,51 +2,62 @@
|
||||||
{
|
{
|
||||||
ubuntu-test.content = [
|
ubuntu-test.content = [
|
||||||
{
|
{
|
||||||
apiVersion = "v1";
|
apiVersion = "apps/v1";
|
||||||
kind = "Pod";
|
kind = "Deployment";
|
||||||
metadata.name = "ubuntu-test";
|
metadata = {
|
||||||
|
name = "ubuntu-test";
|
||||||
|
labels.app = "ubuntu-test"
|
||||||
|
};
|
||||||
spec = {
|
spec = {
|
||||||
containers = [
|
selector.matchLabels.app = "ubuntu-test";
|
||||||
{
|
template = {
|
||||||
name = "ubuntu-test";
|
metadata = {
|
||||||
image = "ubuntu:latest";
|
labels.app = "ubuntu-test";
|
||||||
command = [ "tail" "-f" "/dev/null" ];
|
};
|
||||||
volumeMounts = [
|
spec = {
|
||||||
|
containers = [
|
||||||
{
|
{
|
||||||
mountPath = "/test";
|
name = "ubuntu-test";
|
||||||
name = "test";
|
image = "ubuntu:26.04";
|
||||||
subPath = "ubuntu-test";
|
command = [ "tail" "-f" "/dev/null" ];
|
||||||
}
|
volumeMounts = [
|
||||||
{
|
{
|
||||||
mountPath = "/test2";
|
mountPath = "/test";
|
||||||
name = "iscsi";
|
name = "test";
|
||||||
}
|
subPath = "ubuntu-test";
|
||||||
{
|
}
|
||||||
mountPath = "/test3";
|
{
|
||||||
name = "iscsi";
|
mountPath = "/test2";
|
||||||
subPath = "test";
|
name = "iscsi";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mountPath = "/test3";
|
||||||
|
name = "iscsi";
|
||||||
|
subPath = "test";
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
volumes = [
|
||||||
];
|
{
|
||||||
volumes = [
|
name = "test";
|
||||||
{
|
persistentVolumeClaim = {
|
||||||
name = "test";
|
claimName = "nfs-main-pvc";
|
||||||
persistentVolumeClaim = {
|
};
|
||||||
claimName = "nfs-main-pvc";
|
}
|
||||||
};
|
{
|
||||||
}
|
name = "iscsi";
|
||||||
{
|
iscsi = {
|
||||||
name = "iscsi";
|
targetPortal = "10.5.0.2:3260";
|
||||||
iscsi = {
|
iqn = "iqn.2026-01.dev.nyxerinys:poseidon.authentik";
|
||||||
targetPortal = "10.5.0.2:3260";
|
lun = 0;
|
||||||
iqn = "iqn.2026-01.dev.nyxerinys:poseidon.authentik";
|
fsType = "xfs";
|
||||||
lun = 0;
|
readOnly = false;
|
||||||
fsType = "xfs";
|
};
|
||||||
readOnly = false;
|
}
|
||||||
};
|
];
|
||||||
}
|
};
|
||||||
];
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue