diff --git a/manifests/healthcheck.pp b/manifests/healthcheck.pp index ac60dc06..247f5e4d 100644 --- a/manifests/healthcheck.pp +++ b/manifests/healthcheck.pp @@ -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, } diff --git a/releasenotes/notes/healthcheck-allowed_source_ranges-26d2985e6329d20b.yaml b/releasenotes/notes/healthcheck-allowed_source_ranges-26d2985e6329d20b.yaml new file mode 100644 index 00000000..5fa03904 --- /dev/null +++ b/releasenotes/notes/healthcheck-allowed_source_ranges-26d2985e6329d20b.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``ironic::healthcheck::allowed_source_ranges`` parameter has been + added. diff --git a/spec/classes/ironic_healthcheck_spec.rb b/spec/classes/ironic_healthcheck_spec.rb index 1ec08996..0f65fb14 100644 --- a/spec/classes/ironic_healthcheck_spec.rb +++ b/spec/classes/ironic_healthcheck_spec.rb @@ -15,6 +15,7 @@ describe 'ironic::healthcheck' do is_expected.to contain_oslo__healthcheck('ironic_config').with( :detailed => '', :backends => '', + :allowed_source_ranges => '', :disable_by_file_path => '', :disable_by_file_paths => '', ) @@ -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'], )