Skip to content

Commit

Permalink
rm "legacy" prometheus firewall exported resource
Browse files Browse the repository at this point in the history
Using 'jump' here was a breaking change anyway, so just get rid of it.
  • Loading branch information
rrotter committed Nov 6, 2024
1 parent 9c7a3fe commit e8d12f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
13 changes: 0 additions & 13 deletions manifests/profile/prometheus.pp
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,6 @@
}
}

# Delete this once nothing is importing it. It's only here for the
# sake of hosts that aren't in production.
# Referenced in branches: fulcrum_demo, tdx_7298538
# ** intentionally retains puppetlabs/firewall v6.0.0 semantics **
@@firewall { "010 prometheus legacy node exporter ${::hostname}":
tag => "${::datacenter}_prometheus_node_exporter",
proto => 'tcp',
dport => 9100,
source => $::ipaddress,
state => 'NEW',
jump => 'accept',
}

case $facts["mlibrary_ip_addresses"] {
Hash[String, Array[String]]: {
$all_public_addresses = $facts["mlibrary_ip_addresses"]["public"]
Expand Down
10 changes: 2 additions & 8 deletions spec/classes/profile/prometheus_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,8 @@
end
end

it 'exports a firewall so that nodes can open 9100' do
expect(exported_resources).to contain_firewall("010 prometheus legacy node exporter #{facts[:hostname]}")
.with_tag('mydatacenter_prometheus_node_exporter')
.with_proto('tcp')
.with_dport(9100)
.with_source(facts[:ipaddress])
.with_state('NEW')
.with_action('accept')
it 'does not export legacy port 9100 firewall resource' do
expect(exported_resources).not_to contain_firewall("010 prometheus legacy node exporter #{facts[:hostname]}")
end

context 'with no mlibrary_ip_addresses fact' do
Expand Down

0 comments on commit e8d12f8

Please sign in to comment.