Merge "IP customization for kube_operator"

This commit is contained in:
Zuul 2023-12-12 00:11:31 +00:00 committed by Gerrit Code Review
commit 20543a6335
1 changed files with 4 additions and 1 deletions

View File

@ -367,7 +367,8 @@ V1ContainerImage.names = V1ContainerImage.names.setter(names)
class KubeOperator(object):
def __init__(self):
def __init__(self, host=None):
self.host = host
self._kube_client_batch = None
self._kube_client_core = None
self._kube_client_policy = None
@ -386,6 +387,8 @@ class KubeOperator(object):
else:
c = Configuration().get_default_copy()
c.verify_ssl = False
if self.host is not None:
c.host = self.host
Configuration.set_default(c)
return c