healthcheck: Expose allowed_source_ranges

... which was added to puppet-oslo recently.

Depends-on: https://review.opendev.org/905557
Change-Id: Ie089505d31cc5481e446d74fd299ffed6809d613
This commit is contained in:
Takashi Kajinami 2024-01-17 15:07:03 +09:00
parent d51f55b237
commit 39c8e50eab
3 changed files with 15 additions and 0 deletions

View File

@ -17,6 +17,11 @@
# that information back as part of a request.
# Defaults to $facts['os_service_default']
#
# [*allowed_source_ranges*]
# (Optional) A list of network addresses to limit source ip allowed to access
# healthcheck information.
# Defaults to $facts['os_service_default']
#
# [*disable_by_file_path*]
# (Optional) Check the presence of a file to determine if an application
# is running on a port.
@ -31,6 +36,7 @@ class ironic::healthcheck (
$enabled = $facts['os_service_default'],
$detailed = $facts['os_service_default'],
$backends = $facts['os_service_default'],
$allowed_source_ranges = $facts['os_service_default'],
$disable_by_file_path = $facts['os_service_default'],
$disable_by_file_paths = $facts['os_service_default'],
) {
@ -44,6 +50,7 @@ class ironic::healthcheck (
oslo::healthcheck { 'ironic_config':
detailed => $detailed,
backends => $backends,
allowed_source_ranges => $allowed_source_ranges,
disable_by_file_path => $disable_by_file_path,
disable_by_file_paths => $disable_by_file_paths,
}

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``ironic::healthcheck::allowed_source_ranges`` parameter has been
added.

View File

@ -15,6 +15,7 @@ describe 'ironic::healthcheck' do
is_expected.to contain_oslo__healthcheck('ironic_config').with(
:detailed => '<SERVICE DEFAULT>',
:backends => '<SERVICE DEFAULT>',
:allowed_source_ranges => '<SERVICE DEFAULT>',
:disable_by_file_path => '<SERVICE DEFAULT>',
:disable_by_file_paths => '<SERVICE DEFAULT>',
)
@ -27,6 +28,7 @@ describe 'ironic::healthcheck' do
:enabled => true,
:detailed => true,
:backends => ['disable_by_file'],
:allowed_source_ranges => ['10.0.0.0/24', '10.0.1.0/24'],
:disable_by_file_path => '/etc/ironic/healthcheck/disabled',
:disable_by_file_paths => ['8042:/etc/ironic/healthcheck/disabled'],
}
@ -38,6 +40,7 @@ describe 'ironic::healthcheck' do
is_expected.to contain_oslo__healthcheck('ironic_config').with(
:detailed => true,
:backends => ['disable_by_file'],
:allowed_source_ranges => ['10.0.0.0/24', '10.0.1.0/24'],
:disable_by_file_path => '/etc/ironic/healthcheck/disabled',
:disable_by_file_paths => ['8042:/etc/ironic/healthcheck/disabled'],
)