@Override
	public boolean delete(ApiClient apiClient, String name, String namespace, boolean wait) throws HyscaleException {
		ActivityContext activityContext = new ActivityContext(DeployerActivity.DELETING_STATEFULSET);
		WorkflowLogger.startActivity(activityContext);
		try {
			delete(apiClient, name, namespace);
			if (wait) {
			    List<String> pendingStatefulSets = Lists.newArrayList();
			    pendingStatefulSets.add(name);
			    waitForResourceDeletion(apiClient, pendingStatefulSets, namespace, activityContext);
			}
		} catch (ApiException e) {
			if (e.getCode() == 404) {
				WorkflowLogger.endActivity(activityContext, Status.NOT_FOUND);
				return false;
			}
			HyscaleException ex = new HyscaleException(e, DeployerErrorCodes.FAILED_TO_DELETE_RESOURCE,
					ExceptionHelper.getExceptionMessage(getKind(), e, ResourceOperation.DELETE));
			LOGGER.error("Error while deleting StatefulSet {} in namespace {} , error {}", name, namespace,
					ex.toString());
			WorkflowLogger.endActivity(activityContext, Status.FAILED);
			throw ex;
		}
		LOGGER.debug("Deleting StatefulSet done");
		WorkflowLogger.endActivity(activityContext, Status.DONE);
		return true;
	}
@param apiClient
@param name
@param namespace
@return true if pods needs to be deleted
@throws HyscaleException
deployer/deployer-services/src/main/java/io/hyscale/deployer/services/handler/impl/V1beta2StatefulSetHandler.java