feat: define node-token from puppet (#398)

- define the token on the bootstrap node too, so node-token is defined
  for new clusters

Reviewed-on: #398
This commit is contained in:
Ben Vincent 2025-09-20 22:25:56 +10:00
parent 571a9b25a7
commit 4c9204858e

View File

@ -16,9 +16,6 @@ class rke2::config (
Optional[String[1]] $csi_ceph_poolname = $rke2::csi_ceph_poolname,
){
# if agent, add token. what other fields should i add?
# how can I add a tls secret using kubectl to add ephemeral certs.
# if its not the bootstrap node, add join path to config
if $node_type == 'server' {
if $trusted['certname'] != $bootstrap_node {
@ -27,7 +24,9 @@ class rke2::config (
token => $node_token,
} )
}else{
$config = $config_hash
$config = merge($config_hash, {
token => $node_token,
} )
}
} elsif $node_type == 'agent' {
$config = merge($config_hash, {