diff --git a/sky/clouds/cloud.py b/sky/clouds/cloud.py index 037f917e7e6..34000fb9a16 100644 --- a/sky/clouds/cloud.py +++ b/sky/clouds/cloud.py @@ -42,6 +42,7 @@ class CloudImplementationFeatures(enum.Enum): CUSTOM_DISK_TIER = 'custom_disk_tier' OPEN_PORTS = 'open_ports' STORAGE_MOUNTING = 'storage_mounting' + HOST_CONTROLLERS = 'host_controllers' # Can run spot/serve controllers class Region(collections.namedtuple('Region', ['name'])): diff --git a/sky/clouds/kubernetes.py b/sky/clouds/kubernetes.py index dec1d10a746..1a18db8d01e 100644 --- a/sky/clouds/kubernetes.py +++ b/sky/clouds/kubernetes.py @@ -64,6 +64,13 @@ class Kubernetes(clouds.Cloud): 'tiers are not ' 'supported in ' 'Kubernetes.', + # Kubernetes may be using exec-based auth, which may not work by + # directly copying the kubeconfig file to the controller. + # Support for service accounts for auth will be added in #3377, which + # will allow us to support hosting controllers. + clouds.CloudImplementationFeatures.HOST_CONTROLLERS: 'Kubernetes can ' + 'not host ' + 'controllers.', } IMAGE_CPU = 'skypilot:cpu-ubuntu-2004' diff --git a/sky/execution.py b/sky/execution.py index 33fae37819f..9743ca1e6a6 100644 --- a/sky/execution.py +++ b/sky/execution.py @@ -234,6 +234,10 @@ def _execute( # Requested features that some clouds support and others don't. requested_features = set() + if controller_utils.Controllers.from_name(cluster_name) is not None: + requested_features.add( + clouds.CloudImplementationFeatures.HOST_CONTROLLERS) + # Add requested features from the task requested_features |= task.get_required_cloud_features()