Skip to content

Commit c667049

Browse files
authored
Merge pull request #223 from dulek/helper-dns
Add ability to configure multiple DNS in DSAL helper
2 parents e3c82e1 + a29df91 commit c667049

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

tools/dsal/dsal_helper/dsal_helper.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ def _get_arg_parser(self):
114114
help='external network to use for '
115115
'FIPs, defaults to "external"',
116116
default='external')
117+
openshift_install_cfg.add_argument('--external-dns',
118+
help='external DNS address to use, '
119+
'use lab one if in doubt, '
120+
'defaults to 1.1.1.1',
121+
action='append')
117122
openshift_install_cfg.add_argument('--api-fip',
118123
help='FIP to use for API, if not '
119124
'set will try to find or '
@@ -176,6 +181,9 @@ def openshift_install_cfg(self, args):
176181
content = f.read()
177182
vars[key] = content.strip()
178183

184+
if not vars['external_dns']:
185+
vars['external_dns'] = ['1.1.1.1']
186+
179187
fips = self.neutron.ips(port_id=None)
180188
for key in ('api_fip', 'ingress_fip'):
181189
if not vars[key]:

tools/dsal/dsal_helper/templates/install-config.yaml.tpl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,17 @@ networking:
2727
platform:
2828
openstack:
2929
cloud: "{{ cloud }}"
30-
externalNetwork: "external"
30+
externalNetwork: "{{ external_network }}"
3131
region: "regionOne"
3232
computeFlavor: "m1.xlarge"
3333
lbFloatingIP: "{{ api_fip }}"
3434
ingressFloatingIP: "{{ ingress_fip }}"
35-
externalDNS: ["1.1.1.1"]
35+
{%- if external_dns %}
36+
externalDNS:
37+
{%- for dns in external_dns %}
38+
- {{ dns }}
39+
{%- endfor %}
40+
{%- endif %}
3641
clusterOSImage: "rhcos"
3742
pullSecret: |
3843
{{ pull_secret }}

0 commit comments

Comments
 (0)