def delete_sparkapplication(self,
                                name: str,
                                namespace: str = SPARKOPERATOR_NAMESPACE
                                ) -> dict:
        """ delete sparkapp

        Args:
            name (str): sparkapp name
            namespace (str, optional): namespace to delete.

        Raises:
            ApiException

        Returns:
            dict: resp of k8s
        """
        try:
            return self.crds.delete_namespaced_custom_object(
                group=SPARKOPERATOR_CUSTOM_GROUP,
                version=SPARKOPERATOR_CUSTOM_VERSION,
                namespace=namespace,
                plural=CrdKind.SPARK_APPLICATION.value,
                name=name,
                body=client.V1DeleteOptions())
        except ApiException as err:
            if err.status == 404:
                raise NotFoundException()
            raise InternalException(details=err.body)
 delete sparkapp

        Args:
            name (str): sparkapp name
            namespace (str, optional): namespace to delete.

        Raises:
            ApiException

        Returns:
            dict: resp of k8s
        
web_console_v2/api/fedlearner_webconsole/utils/k8s_client.py