k8s: the queue's pod mounts the host unit's store in place
This commit is contained in:
parent
a793df9708
commit
140ee7f38a
1 changed files with 267 additions and 155 deletions
|
|
@ -169,8 +169,7 @@ let
|
|||
# a pod holds more than the daemon, a function of the daemon's container
|
||||
# (its environment, mounts and security context) giving the rest: further
|
||||
# containers, init containers, volumes, host aliases, pod settings, objects and
|
||||
# images, and `state`, the `volume` and mount `path` of a state volume the
|
||||
# pod makes itself, which the state gate checks. An `otlp` of `"none"` is a daemon that pushes no telemetry of its
|
||||
# and images. An `otlp` of `"none"` is a daemon that pushes no telemetry of its
|
||||
# own.
|
||||
services = {
|
||||
swarm-controller = {
|
||||
|
|
@ -213,7 +212,6 @@ let
|
|||
etcFiles = [ ];
|
||||
publicCredentials."bao-ca.pem" = baoServerCaKey;
|
||||
otlp = "none";
|
||||
fresh = freshOf "nats" natsCfg;
|
||||
switch = {
|
||||
inherit (natsCfg) runtime;
|
||||
hostUnit = "container@swarm-nats.service";
|
||||
|
|
@ -779,21 +777,15 @@ let
|
|||
bin = leafIssueBin;
|
||||
};
|
||||
# The volume the state gate checks, and where it is mounted: that of a
|
||||
# service with a `fresh` option, none for the rest. A pod that makes its
|
||||
# own volume names it in `state`.
|
||||
# service with a `fresh` option, none for the rest.
|
||||
stateVolume =
|
||||
if !(svc ? fresh) then
|
||||
null
|
||||
if svc ? fresh && stateDir != null then
|
||||
{
|
||||
volume = "state";
|
||||
path = stateDir;
|
||||
}
|
||||
else
|
||||
extra.state or (
|
||||
if stateDir != null then
|
||||
{
|
||||
volume = "state";
|
||||
path = stateDir;
|
||||
}
|
||||
else
|
||||
null
|
||||
);
|
||||
null;
|
||||
|
||||
stateGate = lib.optionalAttrs (stateVolume != null) {
|
||||
name = "state-gate";
|
||||
|
|
|
|||
Loading…
Reference in a new issue