def list_namespace_objects(namespace, list_func, keywords=None):
    """
    list all objects in the given namespace that are listed from list_func function
    :param namespace: string, namespace name
    :param list_func: client.AppsV1Api, listing function for kube objects in namespace
    :param keywords: list, all objects who their name contain one of the items in keyword will be listed
    :return:
    """
    resp = list_func(namespace=namespace)
    if keywords:
        objs = [obj.metadata.name for obj in resp.items if any(ele in obj.metadata.name for ele in keywords)]
    else:
        objs = [dep.metadata.name for dep in resp.items]
    return objs