fix bug
parent
17b90e18ca
commit
a7a2271da6
|
|
@ -1,5 +1,6 @@
|
||||||
from kubernetes import client, config, watch
|
from kubernetes import client, config, watch
|
||||||
import os
|
import os
|
||||||
|
import time
|
||||||
|
|
||||||
# Load in-cluster config
|
# Load in-cluster config
|
||||||
config.load_incluster_config()
|
config.load_incluster_config()
|
||||||
|
|
@ -40,7 +41,7 @@ def main():
|
||||||
# Extract the external IP if it exists
|
# Extract the external IP if it exists
|
||||||
external_ip = None
|
external_ip = None
|
||||||
for address in node.status.addresses:
|
for address in node.status.addresses:
|
||||||
if address.type == "ExternalIP" and is_gateway == True:
|
if address.type == "ExternalIP":
|
||||||
external_ip = address.address
|
external_ip = address.address
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue