diff --git a/k8sutil/__init__.py b/kubernetes/util/__init__.py similarity index 100% rename from k8sutil/__init__.py rename to kubernetes/util/__init__.py diff --git a/k8sutil/kube_config.py b/kubernetes/util/kube_config.py similarity index 98% rename from k8sutil/kube_config.py rename to kubernetes/util/kube_config.py index 7f6f23392..cc1c483de 100644 --- a/k8sutil/kube_config.py +++ b/kubernetes/util/kube_config.py @@ -19,7 +19,7 @@ import tempfile import urllib3 import yaml -from k8sclient import configuration +from kubernetes.client import configuration from oauth2client.client import GoogleCredentials _temp_files = [] @@ -157,7 +157,7 @@ class _node: def load_kube_config(config_file): """Loads authentication and cluster information from kube-config file - and store them in k8sclient.configuration.""" + and store them in kubernetes.client.configuration.""" with open(config_file) as f: config = _node('kube-config', yaml.load(f)) diff --git a/k8sutil/watch.py b/kubernetes/util/watch.py similarity index 96% rename from k8sutil/watch.py rename to kubernetes/util/watch.py index 52b0b3b01..9b4080bfe 100644 --- a/k8sutil/watch.py +++ b/kubernetes/util/watch.py @@ -15,7 +15,7 @@ import json import pydoc -import k8sclient +from kubernetes import client PYDOC_RETURN_LABEL = ":return:" @@ -62,7 +62,7 @@ class Watch(object): def __init__(self, return_type=None): self._raw_return_type = return_type self._stop = False - self._api_client = k8sclient.ApiClient() + self._api_client = client.ApiClient() def stop(self): self._stop = True @@ -98,8 +98,8 @@ class Watch(object): 'object' value will be the same as 'raw_object'. Example: - v1 = k8sclient.CoreV1Api() - watch = k8sutil.Watch() + v1 = client.CoreV1Api() + watch = util.Watch() for e in watch.stream(v1.list_namespace, resource_version=1127): type = e['type'] object = e['object'] # object is one of type return_type diff --git a/k8sutil/watch_test.py b/kubernetes/util/watch_test.py similarity index 100% rename from k8sutil/watch_test.py rename to kubernetes/util/watch_test.py