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 job manager changes #140

Merged
merged 7 commits into from
Jan 29, 2019
Merged

k8s job manager changes #140

merged 7 commits into from
Jan 29, 2019

Conversation

johnbradley
Copy link
Collaborator

@johnbradley johnbradley commented Jan 28, 2019

Changes removed from #139 to simplify the review process.

Adds a k8s module under lando consisting of:

  • ServerConfig config file for k8s version of lando
  • ClusterApi class for simplifying interacting with k8s
  • JobManager class that uses ClusterApi to create volumes and run jobs for various steps of running the job.

JobManager

The JobManager has methods for creating jobs for the following job steps:

class JobStepTypes(object):
STAGE_DATA = "stage_data"
RUN_WORKFLOW = "run_workflow"
ORGANIZE_OUTPUT = "organize_output"
SAVE_OUTPUT = "save_output"

For each job step handled by JobManager there are at most 3 methods:

In PR #139 the k8s lando server will use JobManager to run k8s jobs for various steps.

Created #141 to improve the volume sizes for the persistent volume claims used in running a job.

ClusterApi

This class performs two main simplifications instead of using the python kubernetes module directly.

  • removes the requirement to pass namespace to every call
  • allows users to specify volumes to be mounted by jobs once (instead of twice)

Copy link
Member

@dleehr dleehr left a comment

Choose a reason for hiding this comment

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

LGTM. I looked over everything, but as this is mostly underlying infrastructure did not attempt to run it myself.


class SecretVolume(VolumeBase):
def __init__(self, name, mount_path, secret_name):
super(SecretVolume, self).__init__(name, mount_path)
Copy link
Member

Choose a reason for hiding this comment

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

A super secret volume? 🔐

self.system_data = 'system-data-{}'.format(suffix)


class Paths(object):
Copy link
Member

Choose a reason for hiding this comment

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

👍

@johnbradley johnbradley merged commit 8b280f3 into master Jan 29, 2019
@johnbradley johnbradley deleted the k8s-job-manager branch January 29, 2019 20:51
johnbradley added a commit that referenced this pull request Jan 29, 2019
This pull request was closed.
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