Merge "healthcheck: Expose ignore_proxied_requests parameter"

This commit is contained in:
Zuul 2024-02-26 02:49:22 +00:00 committed by Gerrit Code Review
commit 68d5e14c16
3 changed files with 39 additions and 25 deletions

View File

@ -18,6 +18,10 @@
# healthcheck information.
# Defaults to $facts['os_service_default']
#
# [*ignore_proxied_requests*]
# (Optional) Ignore requests with proxy headers
# 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.
@ -32,6 +36,7 @@ class magnum::healthcheck (
$detailed = $facts['os_service_default'],
$backends = $facts['os_service_default'],
$allowed_source_ranges = $facts['os_service_default'],
$ignore_proxied_requests = $facts['os_service_default'],
$disable_by_file_path = $facts['os_service_default'],
$disable_by_file_paths = $facts['os_service_default'],
) {
@ -42,6 +47,7 @@ class magnum::healthcheck (
detailed => $detailed,
backends => $backends,
allowed_source_ranges => $allowed_source_ranges,
ignore_proxied_requests => $ignore_proxied_requests,
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 ``magnum::healthcheck::ignore_proxied_requests`` parameter has been
added.

View File

@ -14,6 +14,7 @@ describe 'magnum::healthcheck' do
:detailed => '<SERVICE DEFAULT>',
:backends => '<SERVICE DEFAULT>',
:allowed_source_ranges => '<SERVICE DEFAULT>',
:ignore_proxied_requests => '<SERVICE DEFAULT>',
:disable_by_file_path => '<SERVICE DEFAULT>',
:disable_by_file_paths => '<SERVICE DEFAULT>',
)
@ -26,6 +27,7 @@ describe 'magnum::healthcheck' do
:detailed => true,
:backends => ['disable_by_file'],
:allowed_source_ranges => ['10.0.0.0/24', '10.0.1.0/24'],
:ignore_proxied_requests => false,
:disable_by_file_path => '/etc/magnum/healthcheck/disabled',
:disable_by_file_paths => ['9511:/etc/magnum/healthcheck/disabled'],
}
@ -36,6 +38,7 @@ describe 'magnum::healthcheck' do
:detailed => true,
:backends => ['disable_by_file'],
:allowed_source_ranges => ['10.0.0.0/24', '10.0.1.0/24'],
:ignore_proxied_requests => false,
:disable_by_file_path => '/etc/magnum/healthcheck/disabled',
:disable_by_file_paths => ['9511:/etc/magnum/healthcheck/disabled'],
)