Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Add HOST_CONTROLLERS check for clouds #3407

Merged
merged 3 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sky/clouds/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])):
Expand Down
7 changes: 7 additions & 0 deletions sky/clouds/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 '
romilbhardwaj marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc'ing @cblmemo to add clouds that should be black list for hosting the controllers.

'not host '
'controllers.',
Comment on lines +71 to +73
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be removed after #3377

}

IMAGE_CPU = 'skypilot:cpu-ubuntu-2004'
Expand Down
4 changes: 4 additions & 0 deletions sky/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
Loading