Add support for [healthcheck] enable_by_file_paths

Depends-on: https://review.opendev.org/923648
Change-Id: I964ac7cc60c0a83dc800cde1e67b524cd64f2023
This commit is contained in:
Takashi Kajinami 2024-07-25 22:44:33 +09:00
parent 264251d0b5
commit 51da4c48b8
3 changed files with 15 additions and 0 deletions

View File

@ -36,6 +36,11 @@
# is running on a port. Expects a "port:path" list of strings.
# Defaults to $facts['os_service_default']
#
# [*enable_by_file_paths*]
# (Optional) Check the presence of files. Used by EnableByFilesHealthcheck
# plugin.
# Defaults to $facts['os_service_default']
#
class mistral::healthcheck (
$enabled = $facts['os_service_default'],
$detailed = $facts['os_service_default'],
@ -44,6 +49,7 @@ class mistral::healthcheck (
$ignore_proxied_requests = $facts['os_service_default'],
$disable_by_file_path = $facts['os_service_default'],
$disable_by_file_paths = $facts['os_service_default'],
$enable_by_file_paths = $facts['os_service_default'],
) {
include mistral::deps
@ -59,5 +65,6 @@ class mistral::healthcheck (
ignore_proxied_requests => $ignore_proxied_requests,
disable_by_file_path => $disable_by_file_path,
disable_by_file_paths => $disable_by_file_paths,
enable_by_file_paths => $enable_by_file_paths,
}
}

View File

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

View File

@ -19,6 +19,7 @@ describe 'mistral::healthcheck' do
:ignore_proxied_requests => '<SERVICE DEFAULT>',
:disable_by_file_path => '<SERVICE DEFAULT>',
:disable_by_file_paths => '<SERVICE DEFAULT>',
:enable_by_file_paths => '<SERVICE DEFAULT>',
)
end
end
@ -33,6 +34,7 @@ describe 'mistral::healthcheck' do
:ignore_proxied_requests => false,
:disable_by_file_path => '/etc/mistral/healthcheck/disabled',
:disable_by_file_paths => ['8989:/etc/mistral/healthcheck/disabled'],
:enable_by_file_paths => ['/etc/mistral/healthcheck/enabled'],
}
end
@ -46,6 +48,7 @@ describe 'mistral::healthcheck' do
:ignore_proxied_requests => false,
:disable_by_file_path => '/etc/mistral/healthcheck/disabled',
:disable_by_file_paths => ['8989:/etc/mistral/healthcheck/disabled'],
:enable_by_file_paths => ['/etc/mistral/healthcheck/enabled'],
)
end
end