do not Kubernetes in dev mode
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2020-12-06 00:19:52 +01:00
parent 2a1be04fb3
commit 2a40c59d53

View File

@ -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()