do not Kubernetes in dev mode
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2a1be04fb3
commit
2a40c59d53
@ -10,6 +10,7 @@ __module_name__ = "kuberclient"
|
|||||||
__version__text__ = "1"
|
__version__text__ = "1"
|
||||||
|
|
||||||
from kubernetes import client, config
|
from kubernetes import client, config
|
||||||
|
from config import RELEASEMODE
|
||||||
|
|
||||||
|
|
||||||
class Kubectl:
|
class Kubectl:
|
||||||
@ -102,15 +103,18 @@ class Kubectl:
|
|||||||
core_v1_api.create_namespaced_service(namespace="videon", body=body, name=self.name)
|
core_v1_api.create_namespaced_service(namespace="videon", body=body, name=self.name)
|
||||||
|
|
||||||
def create_resource(self):
|
def create_resource(self):
|
||||||
|
if RELEASEMODE != "dev":
|
||||||
self.__create_configmap()
|
self.__create_configmap()
|
||||||
self.__create_deployment()
|
self.__create_deployment()
|
||||||
self.__create_service()
|
self.__create_service()
|
||||||
|
|
||||||
def update_resource(self):
|
def update_resource(self):
|
||||||
|
if RELEASEMODE != "dev":
|
||||||
self.__update_configmap()
|
self.__update_configmap()
|
||||||
self.__delete_pod()
|
self.__delete_pod()
|
||||||
|
|
||||||
def delete_resource(self):
|
def delete_resource(self):
|
||||||
|
if RELEASEMODE != "dev":
|
||||||
self.__delete_deployment()
|
self.__delete_deployment()
|
||||||
self.__delete_configmap()
|
self.__delete_configmap()
|
||||||
self.__delete_service()
|
self.__delete_service()
|
||||||
|
Loading…
Reference in New Issue
Block a user