diff --git a/src/kuberclient.py b/src/kuberclient.py index 4919f69..21e0a00 100644 --- a/src/kuberclient.py +++ b/src/kuberclient.py @@ -10,6 +10,7 @@ __module_name__ = "kuberclient" __version__text__ = "1" from kubernetes import client, config +from config import RELEASEMODE class Kubectl: @@ -102,15 +103,18 @@ class Kubectl: core_v1_api.create_namespaced_service(namespace="videon", body=body, name=self.name) def create_resource(self): - self.__create_configmap() - self.__create_deployment() - self.__create_service() + if RELEASEMODE != "dev": + self.__create_configmap() + self.__create_deployment() + self.__create_service() def update_resource(self): - self.__update_configmap() - self.__delete_pod() + if RELEASEMODE != "dev": + self.__update_configmap() + self.__delete_pod() def delete_resource(self): - self.__delete_deployment() - self.__delete_configmap() - self.__delete_service() + if RELEASEMODE != "dev": + self.__delete_deployment() + self.__delete_configmap() + self.__delete_service()