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

Signed-off-by: yanliang567 <yanliang.qiao@zilliz.com>
This commit is contained in:
yanliang567 2021-09-24 14:12:00 +08:00 committed by GitHub
parent 52126f2d5a
commit 4aea1a00cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,7 @@ class CustomResourceOperations(object):
self.plural = kind.lower()
def create(self, body):
"""create or apply a custom resource in k8s"""
pretty = 'true'
config.load_kube_config()
api_instance = client.CustomObjectsApi()
@ -28,6 +29,7 @@ class CustomResourceOperations(object):
raise Exception(str(e))
def delete(self, metadata_name, raise_ex=True):
"""delete or uninstall a custom resource in k8s"""
print(metadata_name)
try:
config.load_kube_config()