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] Add cluster attributes(autodown, idle-minutes-to-autostop) as annotations to the pod #3870

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

landscapepainter
Copy link
Collaborator

@landscapepainter landscapepainter commented Aug 24, 2024

This resolves #3869

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
    • Test if annotations are added and remove as cancelling and reattaching autostop on kind/GKE:
    1. sky launch --cloud kubernetes -c mycluster -i 20 --down -y --num-nodes 3 --cpus=1: confirm if adds Annotations to the head/worker pods.
    2. sky autostop mycluster --cancel: confirm if removes the Annotations from the head/worker pods
    3. sky autostop mycluster -i 20 --down: confirm if adds back the Annotations to the head/worker pods.
    • Test sky launch with --down flag only without -i flag: confirm if Annotations for --down is added as True and Annotations for idle_minutes_to_autostop is added with value of 5 to the pod.
    • Test sky launch with -i flag only without --down flag: confirm if it fails to run as stopping is not supported for k8s.
  • pytest tests/test_smoke.py --kubernetes -k "not TestStorageWithCredentials" except the ones that are failing on master branch as well:
    1. test_skyserve_fast_update
    2. test_managed_jobs_storage
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: conda deactivate; bash -i tests/backward_compatibility_tests.sh

@landscapepainter landscapepainter changed the title [k8s] Add autodown annotations to the pod [k8s] Add cluster attributes(autodown, idle-minutes-to-autostop) as annotations to the pod Aug 24, 2024
@landscapepainter landscapepainter marked this pull request as draft August 24, 2024 05:04
@landscapepainter landscapepainter marked this pull request as ready for review August 25, 2024 01:31
sky/cli.py Outdated Show resolved Hide resolved
@landscapepainter
Copy link
Collaborator Author

@romilbhardwaj This is ready for another look!

Copy link
Collaborator

@romilbhardwaj romilbhardwaj left a comment

Choose a reason for hiding this comment

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

sky/provision/kubernetes/utils.py Outdated Show resolved Hide resolved
sky/provision/kubernetes/utils.py Outdated Show resolved Hide resolved
sky/provision/kubernetes/utils.py Outdated Show resolved Hide resolved
sky/provision/kubernetes/utils.py Outdated Show resolved Hide resolved
sky/provision/kubernetes/utils.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment