Merge "CORD-3067 Documentation for Kubernetes Service"
diff --git a/Dockerfile.synchronizer b/Dockerfile.synchronizer
index 4eb50a4..770f626 100644
--- a/Dockerfile.synchronizer
+++ b/Dockerfile.synchronizer
@@ -1,4 +1,3 @@
-
 # Copyright 2017-present Open Networking Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,10 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# docker build -t xosproject/kubernetes-synchronizer:candidate -f Dockerfile.synchronizer .
-
 # xosproject/kubernetes-synchronizer
-
 FROM xosproject/xos-synchronizer-base:candidate
 
 COPY xos/synchronizer /opt/xos/synchronizers/kubernetes
@@ -26,7 +22,10 @@
 RUN pip install --no-deps -r /tmp/pip_requirements_kubernetes_service.txt \
  && pip freeze > /var/xos/pip_freeze_pip_up_kubernetes_services_`date -u +%Y%m%dT%H%M%S`
 
-ENTRYPOINT []
+# Workaround for kubernetes library issue, see CORD-3054
+RUN echo "c82c439bda07f29fd36f23552c4e763f  /usr/local/lib/python2.7/dist-packages/kubernetes/client/api_client.py" | md5sum -c -
+COPY api_client.patch /tmp/api_client.patch
+RUN patch -d /usr/local/lib/python2.7/dist-packages/kubernetes/client < /tmp/api_client.patch
 
 WORKDIR "/opt/xos/synchronizers/kubernetes"
 
@@ -59,5 +58,4 @@
       org.opencord.component.xos.vcs-url=$org_opencord_component_xos_vcs_url \
       org.opencord.component.xos.vcs-ref=$org_opencord_component_xos_vcs_ref
 
-CMD bash -c "service filebeat start; cd /opt/xos/synchronizers/kubernetes; python kubernetes-synchronizer.py"
-
+CMD ["/usr/bin/python", "/opt/xos/synchronizers/kubernetes/kubernetes-synchronizer.py"]
diff --git a/api_client.patch b/api_client.patch
new file mode 100644
index 0000000..864bbb4
--- /dev/null
+++ b/api_client.patch
@@ -0,0 +1,33 @@
+--- api_client.py       2018-05-29 17:59:49.000000000 +0000
++++ api_client.py.new   2018-05-29 17:56:27.000000000 +0000
+@@ -64,7 +64,7 @@
+             configuration = Configuration()
+         self.configuration = configuration
+ 
+-        self.pool = ThreadPool()
++        self.pool = None # NOTE(smbaker): disabled threadpool 
+         self.rest_client = RESTClientObject(configuration)
+         self.default_headers = {}
+         if header_name is not None:
+@@ -73,9 +73,10 @@
+         # Set default User-Agent.
+         self.user_agent = 'Swagger-Codegen/6.0.0/python'
+     
+-    def __del__(self):
+-        self.pool.close()
+-        self.pool.join()
++# NOTE(smbaker): disabled threadpool
++#    def __del__(self):
++#        self.pool.close()
++#        self.pool.join()
+ 
+     @property
+     def user_agent(self):
+@@ -320,6 +321,7 @@
+                                    response_type, auth_settings,
+                                    _return_http_data_only, collection_formats, _preload_content, _request_timeout)
+         else:
++            raise Exception("Async is not supported")  # NOTE(smbaker): disabled thread pool
+             thread = self.pool.apply_async(self.__call_api, (resource_path, method,
+                                            path_params, query_params,
+                                            header_params, body,