let a second machine join the main node's k3s and run pods from images only the main node holds
This commit is contained in:
parent
9d9757c153
commit
6be1b59ffc
1 changed files with 1106 additions and 96 deletions
|
|
@ -841,8 +841,9 @@ let
|
|||
container = {
|
||||
inherit name volumeMounts;
|
||||
image = "${image.imageName}:${image.imageTag}";
|
||||
# The node imports the image tarball; there is no registry to pull from.
|
||||
imagePullPolicy = "Never";
|
||||
# A node without the image pulls it from a peer that holds it
|
||||
# (the mirror in ./node.nix); the name's host resolves nowhere else.
|
||||
imagePullPolicy = "IfNotPresent";
|
||||
env = lib.mapAttrsToList (n: v: {
|
||||
name = n;
|
||||
value = v;
|
||||
|
|
@ -907,7 +908,7 @@ let
|
|||
leafContainer = {
|
||||
name = "tls-issue";
|
||||
image = "${leafImage.imageName}:${leafImage.imageTag}";
|
||||
imagePullPolicy = "Never";
|
||||
imagePullPolicy = "IfNotPresent";
|
||||
env =
|
||||
lib.mapAttrsToList
|
||||
(n: v: {
|
||||
|
|
@ -1143,8 +1144,8 @@ in
|
|||
}
|
||||
// lib.concatMapAttrs (_: w: w.objects) enabled;
|
||||
|
||||
# The image each enabled service's pod runs: what a node has to hold,
|
||||
# since there is no registry to pull from.
|
||||
# The image each enabled service's pod runs: what the main node imports,
|
||||
# for the others to pull from it.
|
||||
images = lib.unique (lib.concatMap (w: [ w.image ] ++ w.extraImages) (lib.attrValues enabled));
|
||||
|
||||
# What ./runtime.nix moves services with. `switches` holds the services that
|
||||
|
|
|
|||
Loading…
Reference in a new issue