Skip to content

Commit

Permalink
do not show error if already exists, we expect that
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch committed Oct 15, 2023
1 parent 826ea56 commit 220e88b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kubescaler/scaler/aws/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def create_cluster_nodes(self, machine_types=None):
# group name.
self.wait_for_nodes()
print(f"🦊️ Writing config file to {self.kube_config_file}")
print(f" Usage: kubectl --kubeconfig={self.kube_config_file} get nodes")
print(f" Usage: kubectl --kubeconfig={self.kube_config_file} get nodes")
return self.cluster

def load_cluster_info(self):
Expand Down Expand Up @@ -315,7 +315,7 @@ def wait_for_nodes(self):
start = time.time()
kubectl = self.get_k8s_client()
while True:
print(f"⏱️ Waiting for {self.node_count} nodes to be Ready...")
print(f"⏱️ Waiting for {self.node_count} nodes to be Ready...")
time.sleep(5)
nodes = kubectl.list_node()
ready_count = 0
Expand Down Expand Up @@ -398,6 +398,9 @@ def create_auth_config(self):
try:
k8sutils.create_from_yaml(kubectl.api_client, self.auth_config_file)
except Exception as e:
# Don't print the "this already exists error" we might be re-using it
if "already exists" in str(e):
pass
print(f"😭️ Kubectl create from yaml returns in error: {e}")

def ensure_kube_config(self):
Expand Down

0 comments on commit 220e88b

Please sign in to comment.