Skip to content

Commit

Permalink
Merge pull request #359 from sap-contributions/statsd-conf-for-clock
Browse files Browse the repository at this point in the history
Add statsd_host + statsd_port to cloud_controller_clock job
  • Loading branch information
philippthun authored Nov 29, 2023
2 parents 29d4e4e + 4627e71 commit 364dbe7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
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

0 comments on commit 364dbe7

Please sign in to comment.