private void applyCustomResources(List<CustomObject> customObjectList) throws HyscaleException{
        // Using Generic K8s Client
        for (CustomObject object : customObjectList) {
            GenericK8sClient genericK8sClient = new K8sResourceClient(apiClient).
                    withNamespace(namespace).forKind(new CustomResourceKind(object.getKind(), object.getApiVersion()));
            try {
                WorkflowLogger.startActivity(DeployerActivity.DEPLOYING, object.getKind());
                if (genericK8sClient.get(object) != null && !genericK8sClient.patch(object)) {
                    logger.debug("Updating resource with Generic client for Kind - {}", object.getKind());
                    // Delete and Create if failed to Patch
                    logger.info("Deleting & Creating resource : {}", object.getKind());
                    genericK8sClient.delete(object);
                } else {
                    logger.debug("Creating resource with Generic client for Kind - {}", object.getKind());
                }
                genericK8sClient.create(object);
                WorkflowLogger.endActivity(Status.DONE);
            } catch (HyscaleException ex) {
                WorkflowLogger.endActivity(Status.FAILED);
                logger.error("Failed to apply resource :{} Reason :: {}", object.getKind(), ex.getMessage());
                throw ex;
            }
        }
    }
Undeploy resources from cluster
Deletes all resources in a service

@param appName
@param serviceName
@throws HyscaleException if failed to delete any resource
deployer/deployer-services/src/main/java/io/hyscale/deployer/services/util/K8sResourceDispatcher.java