未验证 提交 4aea1a00 编写于 作者: Y yanliang567 提交者: GitHub

[skip ci]Add comments for custom resource operations (#8468)

Signed-off-by: Nyanliang567 <yanliang.qiao@zilliz.com>
上级 52126f2d
...@@ -16,6 +16,7 @@ class CustomResourceOperations(object): ...@@ -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): ...@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册