k8s: the controller pod keeps no volume; the state gate goes
This commit is contained in:
parent
140ee7f38a
commit
4ea3b0e10d
1 changed files with 233 additions and 1110 deletions
|
|
@ -635,17 +635,15 @@ in
|
|||
The pod needs the TCP listener
|
||||
({option}`services.hyperhive.swarm.controller.tcp.enable`): the host
|
||||
cannot reach a unix socket inside a pod, so the gateway dials the
|
||||
listener on {option}`tcp.hostAddress`. The pod's state is its own
|
||||
volume, which starts empty: nothing moves the host's state directory
|
||||
into it, and the pod does not start on it until `swarmctl migrate`
|
||||
marks it or
|
||||
{option}`services.hyperhive.deploy.swarm-controller.k8s.freshState`
|
||||
is set.
|
||||
listener on {option}`tcp.hostAddress`. The pod's state directory is an
|
||||
`emptyDir`: the operator grant record is in the queue's key-value
|
||||
store, and what is left in the directory (the forge avatar markers, the
|
||||
legacy webhook secret the store also holds) is made again at start. A
|
||||
host's legacy grant file is imported into the store by the first start
|
||||
of the controller on the host, so run it there once before the switch.
|
||||
'';
|
||||
};
|
||||
|
||||
k8s.freshState = import ./lib/fresh-state-option.nix { inherit lib; } "swarm-controller";
|
||||
|
||||
unit = lib.mkOption {
|
||||
type = lib.types.raw;
|
||||
readOnly = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue