Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Define interfaces for common job operators #12

Merged
merged 1 commit into from
Apr 13, 2019

Conversation

jian-he
Copy link
Contributor

@jian-he jian-he commented Apr 11, 2019

Creating the interfaces for custom controllers to implement, that is:

	// DeleteJob deletes the job
	DeleteJob(job interface{}) error

	// UpdateJobStatus updates the job status and job conditions
	UpdateJobStatus(job interface{}, replicas map[common.ReplicaType]*common.ReplicaSpec, jobStatus common.JobStatus) error

	// CreateService creates the service
	CreateService(job interface{}, service *v1.Service) error

	// DeleteService deletes the service
	DeleteService(job interface{}, service *v1.Service) error

	// CreatePod creates the pod
	CreatePod(job interface{}, podTemplate *v1.PodTemplate) error

	// DeletePod deletes the pod
	DeletePod(job interface{}, pod *v1.Pod) error

	// SetClusterSpec sets the cluster spec for the pod
	SetClusterSpec(job interface{}, podTemplate *v1.PodTemplate, rtype, index string) error
}

This change is Reviewable

@richardsliu @johnugeorge @terrytangyuan

Copy link
Member

@gaocegege gaocegege 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 love this change! Thanks

job_controller/job_controller.go Show resolved Hide resolved
Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

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

Looks great. Thanks!
/lgtm

@richardsliu
Copy link
Contributor

/lgtm

@johnugeorge
Copy link
Member

/lgtm

@johnugeorge
Copy link
Member

/approve

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johnugeorge

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants