Documentation ¶
Index ¶
- func DeleteCollectionJob(client *kubernetes.Clientset, jobList []k8s.JobData) (err error)
- func DeleteJob(client *kubernetes.Clientset, namespace, name string) (err error)
- func FromCells(cells []dataselect.DataCell) []batch.Job
- func ScaleJob(client *kubernetes.Clientset, namespace, name string, scaleNumber *int32) (err error)
- func ToCells(std []batch.Job) []dataselect.DataCell
- type Job
- type JobCell
- type JobDetail
- type JobList
- func GetJobList(client *kubernetes.Clientset, nsQuery *k8scommon.NamespaceQuery, ...) (*JobList, error)
- func GetJobListFromChannels(channels *k8scommon.ResourceChannels, dsQuery *dataselect.DataSelectQuery) (*JobList, error)
- func ToJobList(jobs []batch.Job, pods []v1.Pod, events []v1.Event, ...) *JobList
- type JobStatus
- type JobStatusType
- type PodList
- type PodStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteCollectionJob ¶
func DeleteCollectionJob(client *kubernetes.Clientset, jobList []k8s.JobData) (err error)
Types ¶
type Job ¶
type Job struct { ObjectMeta k8s.ObjectMeta `json:"objectMeta"` TypeMeta k8s.TypeMeta `json:"typeMeta"` // Aggregate information about pods belonging to this Job. Pods k8scommon.PodInfo `json:"podInfo"` // Container images of the Job. ContainerImages []string `json:"containerImages"` // Init Container images of the Job. InitContainerImages []string `json:"initContainerImages"` // number of parallel jobs defined. Parallelism *int32 `json:"parallelism"` // JobStatus contains inferred job status based on job conditions JobStatus JobStatus `json:"jobStatus"` PodStatus PodStatus `json:"podStatus"` }
Job is a presentation layer view of Kubernetes Job resource. This means it is Job plus additional augmented data we can get from other sources
type JobCell ¶
func (JobCell) GetProperty ¶
func (self JobCell) GetProperty(name dataselect.PropertyName) dataselect.ComparableValue
type JobDetail ¶
type JobDetail struct { // Extends list item structure. Job `json:",inline"` Status []batch.JobCondition `json:"status"` // Completions specifies the desired number of successfully finished pods the job should be run with. Completions *int32 `json:"completions"` PodList *PodList `json:"podList"` }
JobDetail is a presentation layer view of Kubernetes Job resource.
func GetJobDetail ¶
func GetJobDetail(client *kubernetes.Clientset, namespace, name string) (*JobDetail, error)
GetJobDetail gets job details.
type JobList ¶
type JobList struct { ListMeta k8s.ListMeta `json:"listMeta"` // Basic information about resources status on the list. Status k8scommon.ResourceStatus `json:"status"` // Unordered list of Jobs. Jobs []Job `json:"jobs"` // List of non-critical errors, that occurred during resource retrieval. Errors []error `json:"errors"` }
JobList contains a list of Jobs in the cluster.
func GetJobList ¶
func GetJobList(client *kubernetes.Clientset, nsQuery *k8scommon.NamespaceQuery, dsQuery *dataselect.DataSelectQuery) (*JobList, error)
GetJobList returns a list of all Jobs in the cluster.
func GetJobListFromChannels ¶
func GetJobListFromChannels(channels *k8scommon.ResourceChannels, dsQuery *dataselect.DataSelectQuery) (*JobList, error)
GetJobListFromChannels returns a list of all Jobs in the cluster reading required resource list once from the channels.
type JobStatus ¶
type JobStatus struct { // Short, machine understandable job status code. Status JobStatusType `json:"status"` // A human-readable description of the status of related job. Message string `json:"message"` // Conditions describe the state of a job after it finishes. Conditions []k8scommon.Condition `json:"conditions"` }
func GetJobStatus ¶
type JobStatusType ¶
type JobStatusType string
const ( // JobStatusRunning means the job is still running. JobStatusRunning JobStatusType = "Running" // JobStatusComplete means the job has completed its execution. JobStatusComplete JobStatusType = "Complete" // JobStatusFailed means the job has failed its execution. JobStatusFailed JobStatusType = "Failed" )
type PodStatus ¶
type PodStatus struct { // Represents time when the job controller started processing a job. When a // Job is created in the suspended state, this field is not set until the // first time it is resumed. This field is reset every time a Job is resumed // from suspension. It is represented in RFC3339 form and is in UTC. // +optional StartTime *meta.Time `json:"startTime"` // Represents time when the job was completed. It is not guaranteed to // be set in happens-before order across separate operations. // It is represented in RFC3339 form and is in UTC. // The completion time is only set when the job finishes successfully. // +optional CompletionTime *meta.Time `json:"completionTime"` // The number of actively running pods. // +optional Active int32 `json:"active"` // The number of pods which reached phase Succeeded. // +optional Succeeded int32 `json:"succeeded"` // The number of pods which reached phase Failed. // +optional Failed int32 `json:"failed"` }
func GetPodStatus ¶
Click to show internal directories.
Click to hide internal directories.