cronjob

package
v0.0.0-...-ecf1725 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CronJobAPIVersion = "v1"
	CronJobKindName   = "cronjob"
)

Variables

This section is empty.

Functions

func FromCells

func FromCells(cells []dataselect.DataCell) []batch.CronJob

func GetCronJobEvents

func GetCronJobEvents(client client.Interface, dsQuery *dataselect.DataSelectQuery, namespace, name string) (
	*common.EventList, error)

GetCronJobEvents gets events associated to cron job.

func GetCronJobJobs

func GetCronJobJobs(client client.Interface, metricClient metricapi.MetricClient,
	dsQuery *dataselect.DataSelectQuery, namespace, name string, active bool) (*job.JobList, error)

GetCronJobJobs returns list of jobs owned by cron job.

func ToCells

func ToCells(std []batch.CronJob) []dataselect.DataCell

func TriggerCronJob

func TriggerCronJob(client client.Interface,
	namespace, name string) error

TriggerCronJob manually triggers a cron job and creates a new job.

Types

type CronJob

type CronJob struct {
	ObjectMeta   api.ObjectMeta `json:"objectMeta"`
	TypeMeta     api.TypeMeta   `json:"typeMeta"`
	Schedule     string         `json:"schedule"`
	Suspend      *bool          `json:"suspend"`
	Active       int            `json:"active"`
	LastSchedule *metav1.Time   `json:"lastSchedule"`

	// ContainerImages holds a list of the CronJob images.
	ContainerImages []string `json:"containerImages"`
}

CronJob is a presentation layer view of Kubernetes Cron Job resource.

type CronJobCell

type CronJobCell batch.CronJob

func (CronJobCell) GetProperty

func (CronJobCell) GetResourceSelector

func (self CronJobCell) GetResourceSelector() *metricapi.ResourceSelector

type CronJobDetail

type CronJobDetail struct {
	// Extends list item structure.
	CronJob `json:",inline"`

	ConcurrencyPolicy       string `json:"concurrencyPolicy"`
	StartingDeadLineSeconds *int64 `json:"startingDeadlineSeconds"`

	// List of non-critical errors, that occurred during resource retrieval.
	Errors []error `json:"errors"`
}

CronJobDetail contains Cron Job details.

func GetCronJobDetail

func GetCronJobDetail(client k8sClient.Interface, namespace, name string) (*CronJobDetail, error)

GetCronJobDetail gets Cron Job details.

type CronJobList

type CronJobList struct {
	ListMeta          api.ListMeta       `json:"listMeta"`
	CumulativeMetrics []metricapi.Metric `json:"cumulativeMetrics"`
	Items             []CronJob          `json:"items"`

	// Basic information about resources status on the list.
	Status common.ResourceStatus `json:"status"`

	// List of non-critical errors, that occurred during resource retrieval.
	Errors []error `json:"errors"`
}

CronJobList contains a list of CronJobs in the cluster.

func GetCronJobList

func GetCronJobList(client client.Interface, nsQuery *common.NamespaceQuery,
	dsQuery *dataselect.DataSelectQuery, metricClient metricapi.MetricClient) (*CronJobList, error)

GetCronJobList returns a list of all CronJobs in the cluster.

func GetCronJobListFromChannels

func GetCronJobListFromChannels(channels *common.ResourceChannels, dsQuery *dataselect.DataSelectQuery,
	metricClient metricapi.MetricClient) (*CronJobList, error)

GetCronJobListFromChannels returns a list of all CronJobs in the cluster reading required resource list once from the channels.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL