From a7a2271da6dc803b5f1da776dc09fa2c063d04d2 Mon Sep 17 00:00:00 2001 From: Malar Invention Date: Thu, 31 Oct 2024 23:27:02 +0530 Subject: [PATCH] fix bug --- node_external_ip_controller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node_external_ip_controller.py b/node_external_ip_controller.py index 41f5d32..d368d91 100644 --- a/node_external_ip_controller.py +++ b/node_external_ip_controller.py @@ -1,5 +1,6 @@ from kubernetes import client, config, watch import os +import time # Load in-cluster config config.load_incluster_config() @@ -40,7 +41,7 @@ def main(): # Extract the external IP if it exists external_ip = None for address in node.status.addresses: - if address.type == "ExternalIP" and is_gateway == True: + if address.type == "ExternalIP": external_ip = address.address break