keep the pods' runtime volume in memory
A service's RuntimeDirectory is a /run, which never reaches a disk; the pod's volume for it was an emptyDir on the node's disk.
This commit is contained in:
parent
0998c82555
commit
b1b95b5407
2 changed files with 10 additions and 7 deletions
|
|
@ -812,7 +812,9 @@ let
|
|||
}
|
||||
++ lib.optional (runtimeDir != null) {
|
||||
name = "runtime";
|
||||
emptyDir = { };
|
||||
# In memory, as the `/run` it stands for is: what a service keeps there
|
||||
# never reaches the node's disk.
|
||||
emptyDir.medium = "Memory";
|
||||
}
|
||||
++ lib.optional (stateDir != null) (
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1700,15 +1700,15 @@ let
|
|||
&& lib.elem "bao-token" (mountsOf main)
|
||||
&&
|
||||
# In memory, so the leaf's key never reaches the node's disk. The
|
||||
# runtime volume beside it is the control that the lookup finds a
|
||||
# `tmp` volume beside it is the control that the lookup finds a
|
||||
# plain one.
|
||||
(lib.findFirst (v: v.name == "tls") null spec.volumes) == {
|
||||
name = "tls";
|
||||
emptyDir.medium = "Memory";
|
||||
}
|
||||
&&
|
||||
(lib.findFirst (v: v.name == "runtime") null spec.volumes) == {
|
||||
name = "runtime";
|
||||
(lib.findFirst (v: v.name == "tmp") null spec.volumes) == {
|
||||
name = "tmp";
|
||||
emptyDir = { };
|
||||
}
|
||||
&& lib.any (e: e.name == "BAO_ADDR") init.env
|
||||
|
|
|
|||
Loading…
Reference in a new issue