feat: define node-token from puppet #398

Merged
unkinben merged 1 commits from benvin/k8s_set_token into develop 2025-09-20 22:25:56 +10:00

View File

@ -16,9 +16,6 @@ class rke2::config (
Optional[String[1]] $csi_ceph_poolname = $rke2::csi_ceph_poolname, 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 its not the bootstrap node, add join path to config
if $node_type == 'server' { if $node_type == 'server' {
if $trusted['certname'] != $bootstrap_node { if $trusted['certname'] != $bootstrap_node {
@ -27,7 +24,9 @@ class rke2::config (
token => $node_token, token => $node_token,
} ) } )
}else{ }else{
$config = $config_hash $config = merge($config_hash, {
token => $node_token,
} )
} }
} elsif $node_type == 'agent' { } elsif $node_type == 'agent' {
$config = merge($config_hash, { $config = merge($config_hash, {