Watch
0
0
Fork
You've already forked hyperhive
0

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:
atlas 2026-11-25 22:36:35 +01:00 • committed by maia
commit 272af0b3e8

View file

@ -6,6 +6,12 @@
packages ? { },
}:
let
# The registry host every image name carries. `.invalid` is reserved by RFC 6761
# and never resolves, so a node that holds no copy of an image, and finds none
# at a peer, fails to pull it instead of asking a public registry for a name
# it does not own. ../host-modules/k8s/node.nix mirrors this host.
registryHost = "registry.hyperhive.invalid";
# The conventional nonroot id. An OCI image has no `config.ids` to take it
# from, so it is defined once here: the image's `User`, the smoke check and
# a pod's `securityContext.runAsUser`/`runAsGroup` must all read this.
@ -31,7 +37,7 @@ let
env ? { },
}:
pkgs.dockerTools.buildLayeredImage {
name = "hyperhive/${name}";
name = "${registryHost}/${name}";
contents = [
package
pkgs.cacert
@ -55,7 +61,7 @@ let
};
in
{
inherit mkServiceImage serviceUser;
inherit mkServiceImage registryHost serviceUser;
images = lib.genAttrs [
"swarm-controller"