Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add statsd_host + statsd_port to cloud_controller_clock job #359

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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") %>
2 changes: 1 addition & 1 deletion spec/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require:
- rubocop-rspec

AllCops:
TargetRubyVersion: 3.1
TargetRubyVersion: 3.2

Bundler/DuplicatedGem:
Enabled: true
Expand Down
10 changes: 10 additions & 0 deletions spec/cloud_controller_clock/cloud_controller_clock_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down