Skip to content

Commit

Permalink
T6701 Added ability to disables the container DNS
Browse files Browse the repository at this point in the history
Add ability to set the container network with a disable-dns setting
to disable the DNS plugin that is on be default.

T6701: Containers - disable container network built in DNS plugin
  • Loading branch information
dvogel-fp committed Sep 5, 2024
1 parent c78c5bd commit bc4c9c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions interface-definitions/container.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,12 @@
<multi/>
</properties>
</leafNode>
<leafNode name="disable-dns">
<properties>
<help>Disables the DNS plugin for this network</help>
<valueless/>
</properties>
</leafNode>
#include <include/interface/vrf.xml.i>
</children>
</tagNode>
Expand Down
4 changes: 4 additions & 0 deletions src/conf_mode/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,10 @@ def generate(container):
'driver': 'host-local'
}
}

if 'disable_dns' in network_config:
tmp['dns_enabled'] = False

for prefix in network_config['prefix']:
net = {'subnet': prefix, 'gateway': inc_ip(prefix, 1)}
tmp['subnets'].append(net)
Expand Down

0 comments on commit bc4c9c9

Please sign in to comment.