m/node: pass node identity into k8s
This plumbs through the node identity to K8s as an identity.Node
object and gets rid of the os.Hostname invocation that passed around
this data out-of-band. It also changes everything in its path to use
the newer identity.Node object instead of a plain string so that the
Metropolis Identity CA is more accessible.
Change-Id: I6db8e1db7e333c0ea364aefd61c27bf50acc25f3
Reviewed-on: https://review.monogon.dev/c/monogon/+/505
Reviewed-by: Sergiusz Bazanski <serge@monogon.tech>
diff --git a/metropolis/node/core/main.go b/metropolis/node/core/main.go
index 0a63d48..afe1d7b 100644
--- a/metropolis/node/core/main.go
+++ b/metropolis/node/core/main.go
@@ -203,7 +203,7 @@
StorageRoot: root,
Network: networkSvc,
KPKI: kpki,
- NodeID: status.Credentials.ID(),
+ Node: &status.Credentials.Node,
})
if err := supervisor.Run(ctx, "role", rs.Run); err != nil {
close(trapdoor)