Skip to content

Commit 335cded

Browse files
committed
Move user admin cert and key path definition to prams
1 parent f0fda60 commit 335cded

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

REFERENCE.md

+18
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,8 @@ Sets up a Kubernetes server instance
10041004

10051005
The following parameters are available in the `k8s::server` class:
10061006

1007+
* [`admin_cert`](#-k8s--server--admin_cert)
1008+
* [`admin_key`](#-k8s--server--admin_key)
10071009
* [`aggregator_ca_cert`](#-k8s--server--aggregator_ca_cert)
10081010
* [`aggregator_ca_key`](#-k8s--server--aggregator_ca_key)
10091011
* [`api_port`](#-k8s--server--api_port)
@@ -1031,6 +1033,22 @@ The following parameters are available in the `k8s::server` class:
10311033
* [`node_on_server`](#-k8s--server--node_on_server)
10321034
* [`puppetdb_discovery_tag`](#-k8s--server--puppetdb_discovery_tag)
10331035

1036+
##### <a name="-k8s--server--admin_cert"></a>`admin_cert`
1037+
1038+
Data type: `Stdlib::Unixpath`
1039+
1040+
path to the admin cert
1041+
1042+
Default value: `"${cert_path}/admin.pem"`
1043+
1044+
##### <a name="-k8s--server--admin_key"></a>`admin_key`
1045+
1046+
Data type: `Stdlib::Unixpath`
1047+
1048+
path to the admin key
1049+
1050+
Default value: `"${cert_path}/admin.key"`
1051+
10341052
##### <a name="-k8s--server--aggregator_ca_cert"></a>`aggregator_ca_cert`
10351053

10361054
Data type: `Stdlib::Unixpath`

manifests/server.pp

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# @summary Sets up a Kubernetes server instance
22
#
3+
# @param admin_cert path to the admin cert
4+
# @param admin_key path to the admin key
35
# @param aggregator_ca_cert path to the aggregator ca cert
46
# @param aggregator_ca_key path to the aggregator ca key
57
# @param api_port Cluster API port
@@ -42,6 +44,8 @@
4244
Stdlib::Unixpath $ca_cert = "${cert_path}/ca.pem",
4345
Stdlib::Unixpath $aggregator_ca_key = "${cert_path}/aggregator-ca.key",
4446
Stdlib::Unixpath $aggregator_ca_cert = "${cert_path}/aggregator-ca.pem",
47+
Stdlib::Unixpath $admin_cert = "${cert_path}/admin.pem",
48+
Stdlib::Unixpath $admin_key = "${cert_path}/admin.key",
4549

4650
Boolean $generate_ca = false,
4751
Boolean $manage_etcd = $k8s::manage_etcd,
@@ -126,8 +130,8 @@
126130
current_context => 'default',
127131

128132
ca_cert => $ca_cert,
129-
client_cert => "${cert_path}/admin.pem",
130-
client_key => "${cert_path}/admin.key",
133+
client_cert => $admin_cert,
134+
client_key => $admin_key,
131135
}
132136

133137
if $node_on_server {

0 commit comments

Comments
 (0)