Skip to content

Commit 172ea18

Browse files
committed
[installer ipi] use IPv6 machineCIDR and VIPs in singlestack ipv6
1 parent 3d7e16d commit 172ea18

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

roles/installer/templates/install-config-virtualmedia.j2

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ proxy:
99
metadata:
1010
name: {{ cluster }}
1111
networking:
12-
{% if not dualstack_baremetal|bool %}
12+
{% if not dualstack_baremetal|bool and not ipv6_enabled|bool %}
1313
machineCIDR: {{ extcidrnet }}
14+
{% elif ipv6_enabled|bool %}
15+
machineCIDR: {{ extcidrnet6 }}
1416
{% endif %}
1517
networkType: {{ network_type }}
1618
{% if ipv6_enabled|bool and not (ipv4_baremetal|bool or dualstack_baremetal|bool) %}
@@ -48,22 +50,22 @@ platform:
4850
baremetal:
4951
{% if ((release_version.split('.')[0]|int == 4) and (release_version.split('.')[1]|int >= 12)) and dualstack_baremetal|bool and dualstack_vips|bool %}
5052
apiVIPs:
51-
{% if apivip is defined and apivip|ipv4 %}
53+
{% if ipv4_baremetal|bool and apivip is defined and apivip|ipv4 %}
5254
- {{ apivip }}
5355
{% endif %}
5456
{% if ipv6_enabled|bool and apivip6 is defined and apivip6|ipv6 %}
5557
- {{ apivip6 }}
5658
{% endif %}
5759
ingressVIPs:
58-
{% if ingressvip is defined and ingressvip|ipv4 %}
60+
{% if ipv4_baremetal|bool and ingressvip is defined and ingressvip|ipv4 %}
5961
- {{ ingressvip }}
6062
{% endif %}
6163
{% if ipv6_enabled|bool and ingressvip6 is defined and ingressvip6|ipv6 %}
6264
- {{ ingressvip6 }}
6365
{% endif %}
6466
{% else %}
65-
apiVIP: {{ apivip }}
66-
ingressVIP: {{ ingressvip }}
67+
apiVIP: {{ (ipv4_baremetal|bool) | ternary(apivip, apivip6) }}
68+
ingressVIP: {{ (ipv4_baremetal|bool) | ternary(ingressvip, ingressvip6) }}
6769
{% endif %}
6870
{% if ((release_version.split('.')[0]|int == 4) and (release_version.split('.')[1]|int < 5)) %}
6971
dnsVIP: {{ dnsvip }}

roles/installer/templates/install-config.j2

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ proxy:
99
metadata:
1010
name: {{ cluster }}
1111
networking:
12-
{% if not dualstack_baremetal|bool %}
12+
{% if not dualstack_baremetal|bool and not ipv6_enabled|bool %}
1313
machineCIDR: {{ extcidrnet }}
14+
{% elif ipv6_enabled|bool %}
15+
machineCIDR: {{ extcidrnet6 }}
1416
{% endif %}
1517
networkType: {{ network_type }}
1618
{% if ipv6_enabled|bool and not (ipv4_baremetal|bool or dualstack_baremetal|bool) %}
@@ -48,22 +50,22 @@ platform:
4850
baremetal:
4951
{% if ((release_version.split('.')[0]|int == 4) and (release_version.split('.')[1]|int >= 12)) and dualstack_baremetal|bool and dualstack_vips|bool %}
5052
apiVIPs:
51-
{% if apivip is defined and apivip|ipv4 %}
53+
{% if ipv4_baremetal|bool and apivip is defined and apivip|ipv4 %}
5254
- {{ apivip }}
5355
{% endif %}
5456
{% if ipv6_enabled|bool and apivip6 is defined and apivip6|ipv6 %}
5557
- {{ apivip6 }}
5658
{% endif %}
5759
ingressVIPs:
58-
{% if ingressvip is defined and ingressvip|ipv4 %}
60+
{% if ipv4_baremetal|bool and ingressvip is defined and ingressvip|ipv4 %}
5961
- {{ ingressvip }}
6062
{% endif %}
6163
{% if ipv6_enabled|bool and ingressvip6 is defined and ingressvip6|ipv6 %}
6264
- {{ ingressvip6 }}
6365
{% endif %}
6466
{% else %}
65-
apiVIP: {{ apivip }}
66-
ingressVIP: {{ ingressvip }}
67+
apiVIP: {{ (ipv4_baremetal|bool) | ternary(apivip, apivip6) }}
68+
ingressVIP: {{ (ipv4_baremetal|bool) | ternary(ingressvip, ingressvip6) }}
6769
{% endif %}
6870
{% if ((release_version.split('.')[0]|int == 4) and (release_version.split('.')[1]|int < 5)) %}
6971
dnsVIP: {{ dnsvip }}

0 commit comments

Comments
 (0)