@@ -4870,6 +4870,8 @@ def add_route_public_nad():
4870
4870
]
4871
4871
nad_config_dict_string = json .dumps (nad_config_dict )
4872
4872
logger .info ("Creating Multus public network" )
4873
+ if config .DEPLOYMENT .get ("ipv6" ):
4874
+ constants .MULTUS_PUBLIC_NET_YAML = constants .MULTUS_PUBLIC_NET_IPV6_YAML
4873
4875
public_net_data = templating .load_yaml (constants .MULTUS_PUBLIC_NET_YAML )
4874
4876
public_net_data ["metadata" ]["name" ] = config .ENV_DATA .get ("multus_public_net_name" )
4875
4877
public_net_data ["metadata" ]["namespace" ] = config .ENV_DATA .get (
@@ -4959,6 +4961,15 @@ def configure_node_network_configuration_policy_on_all_worker_nodes():
4959
4961
# This function require changes for compact mode
4960
4962
logger .info ("Configure NodeNetworkConfigurationPolicy on all worker nodes" )
4961
4963
worker_node_names = get_worker_nodes ()
4964
+ ip_version = "ipv4"
4965
+ if (
4966
+ config .DEPLOYMENT .get ("ipv6" )
4967
+ and config .ENV_DATA .get ("platform" ) == constants .VSPHERE_PLATFORM
4968
+ ):
4969
+ constants .NODE_NETWORK_CONFIGURATION_POLICY = (
4970
+ constants .NODE_NETWORK_CONFIGURATION_POLICY_IPV6
4971
+ )
4972
+ ip_version = "ipv6"
4962
4973
interface_num = 0
4963
4974
for worker_node_name in worker_node_names :
4964
4975
node_network_configuration_policy = templating .load_yaml (
@@ -5001,13 +5012,13 @@ def configure_node_network_configuration_policy_on_all_worker_nodes():
5001
5012
] = f"ceph-public-net-shim-{ worker_node_name } "
5002
5013
shim_default_ip = node_network_configuration_policy ["spec" ]["desiredState" ][
5003
5014
"interfaces"
5004
- ][0 ]["ipv4" ]["address" ][0 ]["ip" ]
5015
+ ][0 ][ip_version ]["address" ][0 ]["ip" ]
5005
5016
5006
5017
shim_ip = str (ipaddress .ip_address (shim_default_ip ) + interface_num )
5007
5018
interface_num += 1
5008
5019
5009
5020
node_network_configuration_policy ["spec" ]["desiredState" ]["interfaces" ][0 ][
5010
- "ipv4"
5021
+ ip_version
5011
5022
]["address" ][0 ]["ip" ] = shim_ip
5012
5023
5013
5024
node_network_configuration_policy ["spec" ]["desiredState" ]["interfaces" ][0 ][
0 commit comments