From 26b908e5e751f860a7fbd934a1c73963d07daaae Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sun, 15 Jun 2025 17:43:19 +1000 Subject: [PATCH] feat: add node_pools (#317) - change agentv2 to common node_pool - set default node_pool to default Reviewed-on: https://git.query.consul/unkinben/puppet-prod/pulls/317 --- hieradata/roles/infra/nomad/agentv2.yaml | 1 + site/profiles/manifests/nomad/node.pp | 1 + site/profiles/templates/nomad/config.hcl.erb | 1 + 3 files changed, 3 insertions(+) diff --git a/hieradata/roles/infra/nomad/agentv2.yaml b/hieradata/roles/infra/nomad/agentv2.yaml index 434016a..38c34a8 100644 --- a/hieradata/roles/infra/nomad/agentv2.yaml +++ b/hieradata/roles/infra/nomad/agentv2.yaml @@ -25,6 +25,7 @@ profiles::packages::include: consul-cni: {} profiles::nomad::node::client: true +profiles::nomad::node::node_pool: common profiles::nomad::node::host_volumes: - name: puppetclient_crt path: /etc/puppetlabs/puppet/ssl/certs/%{facts.networking.fqdn}.pem diff --git a/site/profiles/manifests/nomad/node.pp b/site/profiles/manifests/nomad/node.pp index 845c3d2..e00f285 100644 --- a/site/profiles/manifests/nomad/node.pp +++ b/site/profiles/manifests/nomad/node.pp @@ -10,6 +10,7 @@ class profiles::nomad::node ( String $user = 'nomad', String $group = 'nomad', Array $host_volumes = [], + String $node_pool = 'default', ){ if $manage_user { diff --git a/site/profiles/templates/nomad/config.hcl.erb b/site/profiles/templates/nomad/config.hcl.erb index 2298732..d4aea47 100644 --- a/site/profiles/templates/nomad/config.hcl.erb +++ b/site/profiles/templates/nomad/config.hcl.erb @@ -21,6 +21,7 @@ server { # Manage clients/agents client { enabled = true + node_pool = "<%= @node_pool %>" <%- @host_volumes.each do |volume| %> host_volume "<%= volume['name'] %>" {