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

Support setting completions to a different value than parallelism for k8s tasks #659

Open
sjawhar opened this issue Sep 5, 2022 · 3 comments
Labels
cloud-k8s Kubernetes enhancement New feature or request external-request You asked, we did

Comments

@sjawhar
Copy link
Contributor

sjawhar commented Sep 5, 2022

Requested Functionality

When running a large parallel job on a k8s cluster, I might have many more tasks that need to be run than I have pods to run them. In that case, it would be very useful to use k8s indexed jobs. A key part of this is the ability to set parallelism and completions to different values—specifically, parallelism would have a lower value than completions. See the discussion in #597 for background and context.

Example TF file:

resource "iterative_task" "example" {
  cloud     = "k8s"
  machine   = "1-1024"
  image     = "python:3.8.12"
  disk_size = 1

  parallelism = 2
  completions = 5
@0x2b3bfa0
Copy link
Member

0x2b3bfa0 commented Sep 6, 2022

Related to #585, useful but harder to implement in backends other than k8s

@omesser
Copy link
Contributor

omesser commented Sep 6, 2022

Related to #585, useful but harder to implement in backends other than k8s

@0x2b3bfa0 let's start with k8s support only then

@sjawhar
Copy link
Contributor Author

sjawhar commented Sep 9, 2022

You can see here how I implemented it. Should I open a PR, or would you prefer a different implementation?

@casperdcl casperdcl added external-request You asked, we did enhancement New feature or request cloud-k8s Kubernetes labels Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cloud-k8s Kubernetes enhancement New feature or request external-request You asked, we did
Projects
None yet
Development

No branches or pull requests

4 participants