Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new data type for db options #40

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 23 additions & 11 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Configures IcingaDB
* `icingadb::redis::service`: Manage IcingaDB Redis server service
* `icingadb::service`: Manage IcingaDB service

### Data types

* [`IcingaDB::DBOptions`](#IcingaDB--DBOptions): Data type for options to connect the IcingaDB database.

## Classes

### <a name="icingadb"></a>`icingadb`
Expand Down Expand Up @@ -328,17 +332,7 @@ Default value: `undef`

##### <a name="-icingadb--db_options"></a>`db_options`

Data type:

```puppet
Hash[Enum[
'max_connections',
'max_connections_per_table',
'max_placeholders_per_statement',
'max_rows_per_transaction',
'wsrep_sync_wait'
], Integer[1]]
```
Data type: `IcingaDB::DBOptions`

List of low-level database options that can be set to influence some
Icinga DB internal default behaviours.
Expand Down Expand Up @@ -759,3 +753,21 @@ Data type: `Stdlib::Absolutepath`



## Data types

### <a name="IcingaDB--DBOptions"></a>`IcingaDB::DBOptions`

Data type for options to connect the IcingaDB database.

Alias of

```puppet
Hash[Enum[
'max_connections',
'max_connections_per_table',
'max_placeholders_per_statement',
'max_rows_per_transaction',
'wsrep_sync_wait'
], Integer[1]]
```

8 changes: 1 addition & 7 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,7 @@
Optional[Stdlib::Absolutepath] $db_tls_cert_file = undef,
Optional[Stdlib::Absolutepath] $db_tls_key_file = undef,
Optional[Stdlib::Absolutepath] $db_tls_cacert_file = undef,
Hash[Enum[
'max_connections',
'max_connections_per_table',
'max_placeholders_per_statement',
'max_rows_per_transaction',
'wsrep_sync_wait'
], Integer[1]] $db_options = {},
IcingaDB::DBOptions $db_options = {},
Stdlib::Host $redis_host = 'localhost',
Stdlib::Port $redis_port = 6380,
Optional[Icinga::Secret] $redis_password = undef,
Expand Down
12 changes: 12 additions & 0 deletions types/dboptions.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# @summary
# Data type for options to connect the IcingaDB database.
#
type IcingaDB::DBOptions = Hash[
Enum[
'max_connections',
'max_connections_per_table',
'max_placeholders_per_statement',
'max_rows_per_transaction',
'wsrep_sync_wait'
], Integer[1]
]
Loading