mirror of https://github.com/milvus-io/milvus.git
[skip ci]Add comments for custom resource operations (#8468)
Signed-off-by: yanliang567 <yanliang.qiao@zilliz.com>pull/8471/head
parent
52126f2d5a
commit
4aea1a00cc
|
@ -16,6 +16,7 @@ class CustomResourceOperations(object):
|
||||||
self.plural = kind.lower()
|
self.plural = kind.lower()
|
||||||
|
|
||||||
def create(self, body):
|
def create(self, body):
|
||||||
|
"""create or apply a custom resource in k8s"""
|
||||||
pretty = 'true'
|
pretty = 'true'
|
||||||
config.load_kube_config()
|
config.load_kube_config()
|
||||||
api_instance = client.CustomObjectsApi()
|
api_instance = client.CustomObjectsApi()
|
||||||
|
@ -28,6 +29,7 @@ class CustomResourceOperations(object):
|
||||||
raise Exception(str(e))
|
raise Exception(str(e))
|
||||||
|
|
||||||
def delete(self, metadata_name, raise_ex=True):
|
def delete(self, metadata_name, raise_ex=True):
|
||||||
|
"""delete or uninstall a custom resource in k8s"""
|
||||||
print(metadata_name)
|
print(metadata_name)
|
||||||
try:
|
try:
|
||||||
config.load_kube_config()
|
config.load_kube_config()
|
||||||
|
|
Loading…
Reference in New Issue