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

[k8s] Use SERVICE_ACCOUNT as default remote_identity, add checks for autodown support #3527

Merged
merged 6 commits into from
May 9, 2024

Conversation

romilbhardwaj
Copy link
Collaborator

@romilbhardwaj romilbhardwaj commented May 8, 2024

Makes SERVICE_ACCOUNT default remote identity for Kubernetes. This helps with lesser config required for exec based clusters (GKE), and does not cause issues since we anyway need to create an SA for the ssh jump pod.

Also adds checks for autodown support, and disable autodown when using exec based auth with LOCAL_CREDENTIALS on Kubernetes clusters.

  • Code formatting: bash format.sh
  • pytest -v tests/test_smoke.py::test_autodown
  • pytest -v tests/test_smoke.py::test_autodown --kubernetes
  • SkyServe http test - sky serve up -n http http_server.yaml and verify autodown afterwards

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @romilbhardwaj! Mostly look good to me except for the name of the feature. We may want to generalize it a bit instead of limiting it to autodown.

@@ -43,6 +43,7 @@ class CloudImplementationFeatures(enum.Enum):
OPEN_PORTS = 'open_ports'
STORAGE_MOUNTING = 'storage_mounting'
HOST_CONTROLLERS = 'host_controllers' # Can run jobs/serve controllers
AUTODOWN = 'autodown'
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about we just call it AUTOSTOP or AUTO_TEARDOWN as autostop and autodown should have similar requirements for the cloud to support?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Between these two options, I'll change it to AUTO_TEARDOWN since it would be confusing for a cloud (Kubernetes) to have AUTOSTOP but not STOP feature.

sky/core.py Outdated Show resolved Hide resolved
sky/execution.py Outdated Show resolved Hide resolved
@romilbhardwaj
Copy link
Collaborator Author

Thanks for the comments @Michaelvll!

  • pytest -v tests/test_smoke.py::test_autodown
  • pytest -v tests/test_smoke.py::test_autodown --kubernetes
  • SkyServe http test - sky serve up -n http http_server.yaml and verify autodown afterwards

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

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

Thanks @romilbhardwaj! LGTM with a fix for the auto_terminate setting.

sky/execution.py Outdated Show resolved Hide resolved
romilbhardwaj and others added 2 commits May 9, 2024 00:29
@romilbhardwaj romilbhardwaj merged commit 4683c46 into master May 9, 2024
20 checks passed
@romilbhardwaj romilbhardwaj deleted the k8s_sa_default branch May 9, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants