Skip to content

kubernetes_scheduler: add service_account runopt so users can specify per job acls + log fix #408

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

Closed
wants to merge 1 commit into from

Conversation

d4l3k
Copy link
Member

@d4l3k d4l3k commented Mar 5, 2022

Fixes #406

This adds a new service_account runopt that sets the service_account_name on the pod spec of each pod.

https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1PodSpec.md

It also fixes a small bug when fetching logs w/ _ in the role name.

Test plan:

added unit tests

torchx run --scheduler kubernetes -c service_account=default --wait --log dist.ddp --script dist_app.py -j 1x1

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 5, 2022
@d4l3k d4l3k force-pushed the k8sserviceaccount branch from eb857a9 to e4b3403 Compare March 5, 2022 00:40
@d4l3k d4l3k changed the title kubernetes_scheduler: add service_account runopt so users can specify per job acls kubernetes_scheduler: add service_account runopt so users can specify per job acls + log fix Mar 5, 2022
@facebook-github-bot
Copy link
Contributor

@d4l3k has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@codecov
Copy link

codecov bot commented Mar 5, 2022

Codecov Report

Merging #408 (ea963b1) into main (1f1a50f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #408   +/-   ##
=======================================
  Coverage   94.21%   94.21%           
=======================================
  Files          66       66           
  Lines        3681     3684    +3     
=======================================
+ Hits         3468     3471    +3     
  Misses        213      213           
Impacted Files Coverage Δ
torchx/pipelines/kfp/adapter.py 98.52% <ø> (ø)
torchx/schedulers/kubernetes_scheduler.py 92.78% <100.00%> (+0.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f1a50f...ea963b1. Read the comment docs.

@d4l3k d4l3k force-pushed the k8sserviceaccount branch from e4b3403 to ea963b1 Compare March 5, 2022 00:47
@facebook-github-bot
Copy link
Contributor

@d4l3k has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@d4l3k has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@d4l3k d4l3k deleted the k8sserviceaccount branch April 13, 2022 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubernetes: add support for setting job service accounts
2 participants