Skip to content

Commit e1bb986

Browse files
committed
Add posibility to pecify node on control plane server if unmanaged_tls
1 parent 335cded commit e1bb986

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

manifests/server.pp

+18-12
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,24 @@
135135
}
136136

137137
if $node_on_server {
138-
$_dir = $k8s::server::tls::cert_path
139-
140-
class { 'k8s::node':
141-
ensure => $ensure,
142-
control_plane_url => "https://localhost:${api_port}",
143-
node_auth => 'cert',
144-
proxy_auth => 'cert',
145-
ca_cert => $ca_cert,
146-
node_cert => "${_dir}/node.pem",
147-
node_key => "${_dir}/node.key",
148-
proxy_cert => "${_dir}/kube-proxy.pem",
149-
proxy_key => "${_dir}/kube-proxy.key",
138+
if $manage_certs {
139+
$_dir = $k8s::server::tls::cert_path
140+
141+
class { 'k8s::node':
142+
ensure => $ensure,
143+
control_plane_url => "https://localhost:${api_port}",
144+
node_auth => 'cert',
145+
proxy_auth => 'cert',
146+
ca_cert => $ca_cert,
147+
node_cert => "${_dir}/node.pem",
148+
node_key => "${_dir}/node.key",
149+
proxy_cert => "${_dir}/kube-proxy.pem",
150+
proxy_key => "${_dir}/kube-proxy.key",
151+
}
152+
} else {
153+
class { 'k8s::node':
154+
ensure => $ensure,
155+
}
150156
}
151157
}
152158
}

0 commit comments

Comments
 (0)