Skip to content

Commit

Permalink
Merge pull request #52 from ananace/expand-sensitive
Browse files Browse the repository at this point in the history
Expand use of Sensitive to match node tokens
  • Loading branch information
ananace authored Jul 5, 2023
2 parents 0474d93 + e778c13 commit bacc877
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ Default value: `undef`

##### <a name="-k8s--node--node_token"></a>`node_token`

Data type: `Optional[String[1]]`
Data type: `Optional[Sensitive[String]]`

k8s token to join a cluster

Expand Down Expand Up @@ -879,7 +879,7 @@ Default value: `undef`

##### <a name="-k8s--node--proxy_token"></a>`proxy_token`

Data type: `Optional[String[1]]`
Data type: `Optional[Sensitive[String]]`

k8s token for kube-proxy

Expand Down Expand Up @@ -1011,7 +1011,7 @@ Default value: `$k8s::node::proxy_key`

##### <a name="-k8s--node--kube_proxy--token"></a>`token`

Data type: `Optional[String[1]]`
Data type: `Optional[Sensitive[String]]`



Expand Down Expand Up @@ -1218,7 +1218,7 @@ Default value: `$k8s::cluster_cidr =~ Array[Data, 2]`

##### <a name="-k8s--node--kubelet--token"></a>`token`

Data type: `Optional[String[1]]`
Data type: `Optional[Sensitive[String]]`

k8s token to join a cluster

Expand Down
4 changes: 2 additions & 2 deletions manifests/node.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
Optional[Stdlib::Unixpath] $proxy_key = undef,

# For token and bootstrap auth
Optional[String[1]] $node_token = undef,
Optional[String[1]] $proxy_token = undef,
Optional[Sensitive[String]] $node_token = undef,
Optional[Sensitive[String]] $proxy_token = undef,

Optional[K8s::Firewall] $firewall_type = $k8s::firewall_type,
) {
Expand Down
4 changes: 2 additions & 2 deletions manifests/node/kube_proxy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Optional[Stdlib::Unixpath] $key = $k8s::node::proxy_key,

# For token and bootstrap auth
Optional[String[1]] $token = $k8s::node::proxy_token,
Optional[Sensitive[String]] $token = $k8s::node::proxy_token,
) {
assert_private()

Expand All @@ -43,7 +43,7 @@
owner => $k8s::user,
group => $k8s::group,
server => $control_plane_url,
token => $token,
token => $token.unwrap,
current_context => 'default',
ca_cert => $ca_cert,
notify => Service['kube-proxy'],
Expand Down
6 changes: 3 additions & 3 deletions manifests/node/kubelet.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
Optional[Stdlib::Unixpath] $key = $k8s::node::node_key,

# For token and bootstrap auth
Optional[String[1]] $token = $k8s::node::node_token,
Optional[Sensitive[String]] $token = $k8s::node::node_token,

Optional[K8s::Firewall] $firewall_type = $k8s::node::firewall_type,
) {
Expand Down Expand Up @@ -93,7 +93,7 @@
group => $k8s::group,
server => $control_plane_url,
current_context => 'default',
token => $token,
token => $token.unwrap,

ca_cert => $_ca_cert,

Expand All @@ -115,7 +115,7 @@
group => $k8s::group,
server => $control_plane_url,
current_context => 'default',
token => $token,
token => $token.unwrap,
notify => Service['kubelet'],
}
$_authentication_hash = {}
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/node/kube_proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class { '::k8s::node':
{
auth: 'token',
ca_cert: '/tmp/ca.pem',
token: 'blah',
token: sensitive('blah'),
}
end

Expand Down

0 comments on commit bacc877

Please sign in to comment.