diff --git a/manifests/healthcheck.pp b/manifests/healthcheck.pp index 912ec86..c1dc2fe 100644 --- a/manifests/healthcheck.pp +++ b/manifests/healthcheck.pp @@ -32,6 +32,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'] +# define oslo::healthcheck( $detailed = $facts['os_service_default'], $backends = $facts['os_service_default'], @@ -39,11 +44,13 @@ define oslo::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'], ) { $backends_real = join(any2array($backends), ',') $allowed_source_ranges_real = join(any2array($allowed_source_ranges), ',') $disable_by_file_paths_real = join(any2array($disable_by_file_paths), ',') + $enable_by_file_paths_real = join(any2array($enable_by_file_paths), ',') $healthcheck_options = { 'healthcheck/detailed' => { value => $detailed }, @@ -52,6 +59,7 @@ define oslo::healthcheck( 'healthcheck/ignore_proxied_requests' => { value => $ignore_proxied_requests }, 'healthcheck/disable_by_file_path' => { value => $disable_by_file_path }, 'healthcheck/disable_by_file_paths' => { value => $disable_by_file_paths_real }, + 'healthcheck/enable_by_file_paths' => { value => $enable_by_file_paths_real }, } create_resources($name, $healthcheck_options) } diff --git a/releasenotes/notes/hc-enable_by_file_paths-e5594b85140cf449.yaml b/releasenotes/notes/hc-enable_by_file_paths-e5594b85140cf449.yaml new file mode 100644 index 0000000..5aa7cd8 --- /dev/null +++ b/releasenotes/notes/hc-enable_by_file_paths-e5594b85140cf449.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``oslo::healthcheck::enable_by_file_paths`` parameter has been + added. diff --git a/spec/defines/oslo_healthcheck_spec.rb b/spec/defines/oslo_healthcheck_spec.rb index c299043..dbe4718 100644 --- a/spec/defines/oslo_healthcheck_spec.rb +++ b/spec/defines/oslo_healthcheck_spec.rb @@ -18,6 +18,7 @@ describe 'oslo::healthcheck' do is_expected.to contain_keystone_config('healthcheck/ignore_proxied_requests').with_value('') is_expected.to contain_keystone_config('healthcheck/disable_by_file_path').with_value('') is_expected.to contain_keystone_config('healthcheck/disable_by_file_paths').with_value('') + is_expected.to contain_keystone_config('healthcheck/enable_by_file_paths').with_value('') end end @@ -32,6 +33,10 @@ describe 'oslo::healthcheck' do '5000:/etc/keystone/healthcheck/public-disabled', '35357:/etc/keystone/healthcheck/admin-disabled' ], + :enable_by_file_paths => [ + '/etc/keystone/healthcheck/enabled0', + '/etc/keystone/healthcheck/enabled1' + ], :ignore_proxied_requests => false, } end @@ -51,6 +56,9 @@ describe 'oslo::healthcheck' do is_expected.to contain_keystone_config('healthcheck/disable_by_file_paths').with_value( '5000:/etc/keystone/healthcheck/public-disabled,35357:/etc/keystone/healthcheck/admin-disabled' ) + is_expected.to contain_keystone_config('healthcheck/enable_by_file_paths').with_value( + '/etc/keystone/healthcheck/enabled0,/etc/keystone/healthcheck/enabled1' + ) end end end