Skip to content

Commit

Permalink
NO-ISSUE: fix for None platform CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tsorya committed Jul 29, 2021
1 parent 85faadc commit ad49308
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions discovery-infra/test_infra/helper_classes/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ def prepare_for_installation(self, static_network_config=None, **kwargs):
main_cidr = self.get_machine_cidr()
ip = Cluster.get_ip_for_single_node(self.api_client, self.id, main_cidr)
self.nodes.controller.set_single_node_ip(ip)
self.nodes.controller.set_dns(api_vip=ip, ingress_vip=ip)

self.set_network_params(
controller=self.nodes.controller,
Expand All @@ -717,21 +718,15 @@ def prepare_for_installation(self, static_network_config=None, **kwargs):
cluster_network_cidr=self._config.cluster_network_cidr,
cluster_network_host_prefix=self._config.cluster_network_host_prefix,
)
self.wait_for_ready_to_install()

if self._config.platform == consts.Platforms.NONE:
self._configure_load_balancer()
self.nodes.controller.set_dns_for_user_managed_network()
elif self._config.masters_count != 1:
vips_info = self.__class__.get_vips_from_cluster(self.api_client, self.id)
self.nodes.controller.set_dns(api_vip=vips_info["api_vip"], ingress_vip=vips_info["ingress_vip"])
else:
main_cidr = self.get_machine_cidr()
master_ips = self.get_master_ips(self.api_client, self.id, main_cidr)
if len(master_ips) != 1:
raise Exception(f"Unexpected master count {len(master_ips)} for single node")
node_ip = master_ips[0]
self.nodes.controller.set_dns(api_vip=node_ip, ingress_vip=node_ip)

self.wait_for_ready_to_install()

def download_kubeconfig_no_ingress(self, kubeconfig_path: str = None):
self.api_client.download_kubeconfig_no_ingress(self.id, kubeconfig_path or self._config.kubeconfig_path)
Expand Down

0 comments on commit ad49308

Please sign in to comment.