Skip to content

Commit

Permalink
(site/dev) allow ruka to scrape dev node_exporter instances
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Apr 23, 2024
1 parent 352ed54 commit 7f85442
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
6 changes: 6 additions & 0 deletions hieradata/site/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,11 @@ profile::core::firewall::firewall:
ipset: "ayekan src"
dport: "9100"
action: "accept"
"101 accept node_exporter":
proto: "tcp"
state: "NEW"
ipset: "dev src" # allow ruka to access node_exporter
dport: "9100"
action: "accept"

profile::core::docker::version: "24.0.9"
22 changes: 21 additions & 1 deletion spec/support/spec/firewall.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,27 @@

shared_examples 'firewall node_exporter scraping' do |site:|
case site
when 'dev', 'ls'
when 'dev'
it do
is_expected.to contain_firewall('100 accept node_exporter').with(
proto: 'tcp',
state: 'NEW',
ipset: 'ayekan src',
dport: '9100',
action: 'accept',
)
end

it do
is_expected.to contain_firewall('101 accept node_exporter').with(
proto: 'tcp',
state: 'NEW',
ipset: 'dev src',
dport: '9100',
action: 'accept',
)
end
when 'ls'
it do
is_expected.to contain_firewall('100 accept node_exporter').with(
proto: 'tcp',
Expand Down

0 comments on commit 7f85442

Please sign in to comment.