Skip to content

Commit b0b1549

Browse files
committed
fix: fd limit parameter and documentation
Signed-off-by: Jeremy HERGAULT <jeremy.hergault@worldline.com>
1 parent 086d9a2 commit b0b1549

5 files changed

Lines changed: 29 additions & 40 deletions

File tree

REFERENCE.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
### Defined types
2020

2121
* [`prosa::proc`](#prosa--proc): Allows specialised configurations for ProSA processors
22+
Use the `prosa::processors` defined type if you want to create processors
2223

2324
### Data types
2425

@@ -237,7 +238,7 @@ Default value: `$prosa::params::telemetry_level`
237238
Data type: `Optional[Hash[String, String]]`
238239

239240
Configures the ProSA [Telemetry Attributes](https://docs.rs/prosa-utils/latest/prosa_utils/config/observability/struct.Observability.html) directive
240-
which allows to add custom attributes to telemetry messages.
241+
which allows to add custom attributes to telemetry messages.<br />
241242
Refer to the [ProSA book](https://worldline.github.io/ProSA/ch01-02-01-observability.html) for more details on how to configure this directive.
242243

243244
Default value: `undef`
@@ -247,7 +248,7 @@ Default value: `undef`
247248
Data type: `Hash[String, Hash[String, Hash[String, String]]]`
248249

249250
Configures the ProSA [Observability](https://docs.rs/prosa-utils/latest/prosa_utils/config/observability/struct.Observability.html) directive
250-
which configure metrics, traces and logs export.
251+
which configure metrics, traces and logs export.<br />
251252
Refer to the [ProSA book](https://worldline.github.io/ProSA/ch01-02-01-observability.html) for more details on how to configure this directive.
252253

253254
Default value: `$prosa::params::observability`
@@ -295,17 +296,7 @@ Default value: `{}`
295296
### <a name="prosa--proc"></a>`prosa::proc`
296297

297298
Allows specialised configurations for ProSA processors
298-
299-
#### Examples
300-
301-
#####
302-
303-
```puppet
304-
class { 'prosa':
305-
default_vhost => false,
306-
default_ssl_vhost => false,
307-
}
308-
```
299+
Use the `prosa::processors` defined type if you want to create processors
309300

310301
#### Parameters
311302

manifests/init.pp

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
#
7171
# @param telemetry_attributes
7272
# Configures the ProSA [Telemetry Attributes](https://docs.rs/prosa-utils/latest/prosa_utils/config/observability/struct.Observability.html) directive
73-
# which allows to add custom attributes to telemetry messages.
73+
# which allows to add custom attributes to telemetry messages.<br />
7474
# Refer to the [ProSA book](https://worldline.github.io/ProSA/ch01-02-01-observability.html) for more details on how to configure this directive.
7575
#
7676
# @example Setting custom telemetry attributes
@@ -83,7 +83,7 @@
8383
#
8484
# @param observability
8585
# Configures the ProSA [Observability](https://docs.rs/prosa-utils/latest/prosa_utils/config/observability/struct.Observability.html) directive
86-
# which configure metrics, traces and logs export.
86+
# which configure metrics, traces and logs export.<br />
8787
# Refer to the [ProSA book](https://worldline.github.io/ProSA/ch01-02-01-observability.html) for more details on how to configure this directive.
8888
#
8989
# @example Setting custom observability configuration
@@ -178,14 +178,15 @@
178178

179179
# Declare ProSA service
180180
class { 'prosa::service':
181-
prosa_name => $prosa_name,
182-
service_name => $service_name,
183-
service_binary => $bin_path,
184-
app_conf => $conf_dir,
185-
user => $user,
186-
group => $group,
187-
service_enable => $service_enable,
188-
service_ensure => $service_ensure,
189-
service_manage => $service_manage,
181+
prosa_name => $prosa_name,
182+
service_name => $service_name,
183+
service_binary => $bin_path,
184+
app_conf => $conf_dir,
185+
user => $user,
186+
group => $group,
187+
service_enable => $service_enable,
188+
service_ensure => $service_ensure,
189+
service_manage => $service_manage,
190+
service_limit_nofile => $service_limit_nofile,
190191
}
191192
}

manifests/proc.pp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# @summary
22
# Allows specialised configurations for ProSA processors
3-
#
4-
# @example
5-
# class { 'prosa':
6-
# default_vhost => false,
7-
# default_ssl_vhost => false,
8-
# }
3+
# Use the `prosa::processors` defined type if you want to create processors
94
#
105
# @param adaptor_config_path
116
# For some ProSA adaptor, they need to have a configuration in addition to processor.

manifests/service.pp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
String $group = $prosa::params::group,
1212
Boolean $service_enable = true,
1313
Variant[Boolean, String] $service_ensure = 'running',
14-
Boolean $service_manage = true
14+
Boolean $service_manage = true,
15+
Optional[Integer] $service_limit_nofile = undef
1516
) {
1617
# The base class must be included first because parameter defaults depend on it
1718
if ! defined(Class['prosa::params']) {
@@ -36,11 +37,12 @@
3637
group => $prosa::params::root_group,
3738
mode => '0644',
3839
content => epp('prosa/service.epp', {
39-
'prosa_name' => $prosa_name,
40-
'user' => $user,
41-
'group' => $group,
42-
'bin_path' => $service_binary,
43-
'conf_path' => $app_conf,
40+
'prosa_name' => $prosa_name,
41+
'user' => $user,
42+
'group' => $group,
43+
'bin_path' => $service_binary,
44+
'conf_path' => $app_conf,
45+
'limit_nofile' => $service_limit_nofile,
4446
}),
4547
replace => true,
4648
}

spec/acceptance/processors_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616

1717
pp = <<-MANIFEST
1818
class { 'prosa':
19-
prosa_name => #{prosa_hash['prosa_name']},
20-
service_manage => false,
21-
telemetry_level => 'warn',
19+
prosa_name => #{prosa_hash['prosa_name']},
20+
service_manage => false,
21+
telemetry_level => 'warn',
2222
telemetry_attributes => {
2323
'service.name' => 'prosa-service',
2424
'host.id' => 'fdbf79e8af94cb7f9e8df36789187052',
2525
},
26-
observability => {
26+
observability => {
2727
'metrics' => {
2828
'prometheus' => {
2929
'endpoint' => '0.0.0.0:9090',

0 commit comments

Comments
 (0)