Skip to content

Commit

Permalink
feat: attempt to correctly set subnet
Browse files Browse the repository at this point in the history
  • Loading branch information
ckartik committed Sep 5, 2024
1 parent 704930f commit e3048f3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ job "{{ job.name }}" {
unlimited = false
}
{% endif %}

network {
mode = "bridge"

Expand All @@ -36,6 +35,34 @@ job "{{ job.name }}" {
{% endfor %}
}

config {
cni_config = jsonencode({
"cniVersion": "0.4.0", // Updated CNI version
"name": "{{ job.name }}-network",
"plugins": [
{
"type": "bridge", // CNI plugin type
"bridge": "br0",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"subnet": "172.16.30.0/24",
"routes": [
{
"dst": "0.0.0.0/0"
}
]
}
},
{
"type": "portmap",
"capabilities": { "portMappings": true }
}
]
})
}

task "node" {
driver = "exec"

Expand Down
8 changes: 4 additions & 4 deletions infrastructure/nomad/playbooks/variables/profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
env:
ip: 0.0.0.0
public_ip: "{{ ansible_facts['default_ipv4']['address'] }}"
net_restrict: "{{ ansible_facts['default_ipv4']['address'] }}/32"
net_restrict: 172.16.30.0/8
type: bootnode

mev_commit_geth_signer_node1: &mev_commit_geth_signer_node1_job
Expand All @@ -79,7 +79,7 @@ jobs:
static: 30311
env:
ip: 127.0.0.1
net_restrict: "{{ ansible_facts['default_ipv4']['address'] }}/32"
net_restrict: 172.16.30.0/8
type: signer
port: 30311

Expand All @@ -100,7 +100,7 @@ jobs:
static: 30312
env:
ip: 127.0.0.1
net_restrict: "{{ ansible_facts['default_ipv4']['address'] }}/32"
net_restrict: 172.16.30.0/8
type: signer
port: 30312

Expand All @@ -121,7 +121,7 @@ jobs:
static: 30313
env:
ip: 127.0.0.1
net_restrict: "{{ ansible_facts['default_ipv4']['address'] }}/32"
net_restrict: 172.16.30.0/24
type: signer
port: 30313

Expand Down

0 comments on commit e3048f3

Please sign in to comment.