feat: define node-token from puppet
All checks were successful
Build / precommit (pull_request) Successful in 3m56s

- define the token on the bootstrap node too, so node-token is defined
  for new clusters
This commit is contained in:
Ben Vincent 2025-09-20 18:30:45 +10:00
parent 762f415d2d
commit f4f17cbdc9

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, {