diff --git a/jobs/cloud_controller_clock/templates/cloud_controller_ng.yml.erb b/jobs/cloud_controller_clock/templates/cloud_controller_ng.yml.erb index b61d5c7077..de212cd730 100644 --- a/jobs/cloud_controller_clock/templates/cloud_controller_ng.yml.erb +++ b/jobs/cloud_controller_clock/templates/cloud_controller_ng.yml.erb @@ -347,6 +347,9 @@ credhub_api: credential_references: interpolate_service_bindings: <%= p("cc.credential_references.interpolate_service_bindings") %> +statsd_host: <%= link("cloud_controller_internal").p("cc.statsd_host") %> +statsd_port: <%= link("cloud_controller_internal").p("cc.statsd_port") %> + max_labels_per_resource: <%= link("cloud_controller_internal").p("cc.max_labels_per_resource") %> max_annotations_per_resource: <%= link("cloud_controller_internal").p("cc.max_annotations_per_resource") %> custom_metric_tag_prefix_list: <%= link("cloud_controller_internal").p("cc.custom_metric_tag_prefix_list") %> diff --git a/spec/cloud_controller_clock/cloud_controller_clock_spec.rb b/spec/cloud_controller_clock/cloud_controller_clock_spec.rb index 7b79c41941..110e65a7f1 100644 --- a/spec/cloud_controller_clock/cloud_controller_clock_spec.rb +++ b/spec/cloud_controller_clock/cloud_controller_clock_spec.rb @@ -71,6 +71,8 @@ module Test 'current_key_label' => 'encryption_key_0', :keys => { 'encryption_key_0' => '((cc_db_encryption_key))' } }, + 'statsd_host' => '127.0.0.1', + 'statsd_port' => 8125, 'max_labels_per_resource' => true, 'max_annotations_per_resource' => 'yus', 'disable_private_domain_cross_space_context_path_route_sharing' => false, @@ -131,6 +133,14 @@ module Test end end end + + describe 'statsd' do + it 'renders statsd_host and statsd_port from cloud_controller_internal link' do + template_hash = YAML.safe_load(template.render(manifest_properties, consumes: links)) + expect(template_hash['statsd_host']).to eq(properties['cc']['statsd_host']) + expect(template_hash['statsd_port']).to eq(properties['cc']['statsd_port']) + end + end end end end