feat: add haproxy2 role (#322)

- add basic haproxy2 role
- add peers and resolvers
- add haproxy2+ metrics frontend

Reviewed-on: https://git.query.consul/unkinben/puppet-prod/pulls/322
This commit was merged in pull request #322.
This commit is contained in:
2025-06-28 16:20:06 +10:00
parent bd9e08dc24
commit 770fd643ac
9 changed files with 529 additions and 21 deletions
+24
View File
@@ -0,0 +1,24 @@
# profiles::haproxy::peers
class profiles::haproxy::peers (
Boolean $enable = false,
){
if $enable {
$peer_tag = "${facts['country']}-${facts['region']}-${facts['environment']}"
@@haproxy::peer { "${peer_tag}_${facts['networking']['fqdn']}":
peers_name => $facts['networking']['fqdn'],
port => 10000,
tag => $peer_tag,
}
# collect exported resources
Haproxy::Peer <<| tag == $peer_tag |>>
haproxy::peers { $peer_tag:
collect_exported => true
}
}
}