From c0a04ac11a4dfd5ab79d776b414f939b2298dd3d Mon Sep 17 00:00:00 2001 From: Salvatore Daniele Date: Thu, 14 Dec 2023 11:03:53 -0500 Subject: [PATCH] Allow user to specify ntp source and dns domain Signed-off-by: Salvatore Daniele --- clusterDeployer.py | 4 ++-- clustersConfig.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/clusterDeployer.py b/clusterDeployer.py index d0764082..9f7f6cf5 100644 --- a/clusterDeployer.py +++ b/clusterDeployer.py @@ -534,8 +534,8 @@ def create_cluster(self) -> None: cfg["api_ip"] = self._cc.api_ip cfg["ingress_ip"] = self._cc.ingress_ip cfg["vip_dhcp_allocation"] = False - cfg["additional_ntp_source"] = "clock.redhat.com" - cfg["base_dns_domain"] = "redhat.com" + cfg["additional_ntp_source"] = self._cc.ntp_source + cfg["base_dns_domain"] = self._cc.base_dns_domain cfg["sno"] = self._cc.is_sno() if self._cc.proxy: cfg["proxy"] = self._cc.proxy diff --git a/clustersConfig.py b/clustersConfig.py index a8130a6d..c5210fd7 100644 --- a/clustersConfig.py +++ b/clustersConfig.py @@ -116,6 +116,8 @@ class ClustersConfig: noproxy: Optional[str] = None preconfig: List[ExtraConfigArgs] = [] postconfig: List[ExtraConfigArgs] = [] + ntp_source: str = "clock.redhat.com" + base_dns_domain: str = "redhat.com" def __init__(self, yaml_path: str): self._cluster_info: Optional[ClusterInfo] = None @@ -150,6 +152,10 @@ def __init__(self, yaml_path: str): self.name = cc["name"] self.api_ip = cc["api_ip"] self.ingress_ip = cc["ingress_ip"] + if "ntp_source" in cc: + self.ntp_source = cc["ntp_source"] + if "base_dns_domain" in cc: + self.base_dns_domain = cc["base_dns_domain"] self.kubeconfig = path.join(getcwd(), f'kubeconfig.{cc["name"]}') if "kubeconfig" in cc: