package v1

import "k8s.io/client-go/applyconfigurations/batch/v1"

Index

Types

type CronJobApplyConfiguration

type CronJobApplyConfiguration struct {
	metav1.TypeMetaApplyConfiguration `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
	// Specification of the desired behavior of a cron job, including the schedule.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	Spec *CronJobSpecApplyConfiguration `json:"spec,omitempty"`
	// Current status of a cron job.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	Status *CronJobStatusApplyConfiguration `json:"status,omitempty"`
}

CronJobApplyConfiguration represents a declarative configuration of the CronJob type for use with apply.

CronJob represents the configuration of a single cron job.

func CronJob

func CronJob(name, namespace string) *CronJobApplyConfiguration

CronJob constructs a declarative configuration of the CronJob type for use with apply.

func ExtractCronJob

func ExtractCronJob(cronJob *batchv1.CronJob, fieldManager string) (*CronJobApplyConfiguration, error)

ExtractCronJob extracts the applied configuration owned by fieldManager from cronJob. If no managedFields are found in cronJob for fieldManager, a CronJobApplyConfiguration is returned with only the Name, Namespace (if applicable), APIVersion and Kind populated. It is possible that no managed fields were found for because other field managers have taken ownership of all the fields previously owned by fieldManager, or because the fieldManager never owned fields any fields. cronJob must be a unmodified CronJob API object that was retrieved from the Kubernetes API. ExtractCronJob provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.

func ExtractCronJobFrom

func ExtractCronJobFrom(cronJob *batchv1.CronJob, fieldManager string, subresource string) (*CronJobApplyConfiguration, error)

ExtractCronJobFrom extracts the applied configuration owned by fieldManager from cronJob for the specified subresource. Pass an empty string for subresource to extract the main resource. Common subresources include "status", "scale", etc. cronJob must be a unmodified CronJob API object that was retrieved from the Kubernetes API. ExtractCronJobFrom provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.

func ExtractCronJobStatus

func ExtractCronJobStatus(cronJob *batchv1.CronJob, fieldManager string) (*CronJobApplyConfiguration, error)

ExtractCronJobStatus extracts the applied configuration owned by fieldManager from cronJob for the status subresource.

func (*CronJobApplyConfiguration) GetAPIVersion

func (b *CronJobApplyConfiguration) GetAPIVersion() *string

GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.

func (*CronJobApplyConfiguration) GetKind

func (b *CronJobApplyConfiguration) GetKind() *string

GetKind retrieves the value of the Kind field in the declarative configuration.

func (*CronJobApplyConfiguration) GetName

func (b *CronJobApplyConfiguration) GetName() *string

GetName retrieves the value of the Name field in the declarative configuration.

func (*CronJobApplyConfiguration) GetNamespace

func (b *CronJobApplyConfiguration) GetNamespace() *string

GetNamespace retrieves the value of the Namespace field in the declarative configuration.

func (CronJobApplyConfiguration) IsApplyConfiguration

func (b CronJobApplyConfiguration) IsApplyConfiguration()

func (*CronJobApplyConfiguration) WithAPIVersion

WithAPIVersion sets the APIVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the APIVersion field is set to the value of the last call.

func (*CronJobApplyConfiguration) WithAnnotations

func (b *CronJobApplyConfiguration) WithAnnotations(entries map[string]string) *CronJobApplyConfiguration

WithAnnotations puts the entries into the Annotations field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Annotations field, overwriting an existing map entries in Annotations field with the same key.

func (*CronJobApplyConfiguration) WithCreationTimestamp

func (b *CronJobApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *CronJobApplyConfiguration

WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the CreationTimestamp field is set to the value of the last call.

func (*CronJobApplyConfiguration) WithDeletionGracePeriodSeconds

func (b *CronJobApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CronJobApplyConfiguration

WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.

func (*CronJobApplyConfiguration) WithDeletionTimestamp

func (b *CronJobApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *CronJobApplyConfiguration

WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionTimestamp field is set to the value of the last call.

func (*CronJobApplyConfiguration) WithFinalizers

func (b *CronJobApplyConfiguration) WithFinalizers(values ...string) *CronJobApplyConfiguration

WithFinalizers adds the given value to the Finalizers field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Finalizers field.

func (*CronJobApplyConfiguration) WithGenerateName

func (b *CronJobApplyConfiguration) WithGenerateName(value string) *CronJobApplyConfiguration

WithGenerateName sets the GenerateName field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the GenerateName field is set to the value of the last call.

func (*CronJobApplyConfiguration) WithGeneration

func (b *CronJobApplyConfiguration) WithGeneration(value int64) *CronJobApplyConfiguration

WithGeneration sets the Generation field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Generation field is set to the value of the last call.

func (*CronJobApplyConfiguration) WithKind

WithKind sets the Kind field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Kind field is set to the value of the last call.

func (*CronJobApplyConfiguration) WithLabels

WithLabels puts the entries into the Labels field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Labels field, overwriting an existing map entries in Labels field with the same key.

func (*CronJobApplyConfiguration) WithName

WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.

func (*CronJobApplyConfiguration) WithNamespace

WithNamespace sets the Namespace field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Namespace field is set to the value of the last call.

func (*CronJobApplyConfiguration) WithOwnerReferences

WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the OwnerReferences field.

func (*CronJobApplyConfiguration) WithResourceVersion

func (b *CronJobApplyConfiguration) WithResourceVersion(value string) *CronJobApplyConfiguration

WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ResourceVersion field is set to the value of the last call.

func (*CronJobApplyConfiguration) WithSpec

WithSpec sets the Spec field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Spec field is set to the value of the last call.

func (*CronJobApplyConfiguration) WithStatus

WithStatus sets the Status field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Status field is set to the value of the last call.

func (*CronJobApplyConfiguration) WithUID

WithUID sets the UID field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the UID field is set to the value of the last call.

type CronJobSpecApplyConfiguration

type CronJobSpecApplyConfiguration struct {
	// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
	Schedule *string `json:"schedule,omitempty"`
	// The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
	// If not specified, this will default to the time zone of the kube-controller-manager process.
	// The set of valid time zone names and the time zone offset is loaded from the system-wide time zone
	// database by the API server during CronJob validation and the controller manager during execution.
	// If no system-wide time zone database can be found a bundled version of the database is used instead.
	// If the time zone name becomes invalid during the lifetime of a CronJob or due to a change in host
	// configuration, the controller will stop creating new new Jobs and will create a system event with the
	// reason UnknownTimeZone.
	// More information can be found in https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones
	TimeZone *string `json:"timeZone,omitempty"`
	// Optional deadline in seconds for starting the job if it misses scheduled
	// time for any reason.  Missed jobs executions will be counted as failed ones.
	StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"`
	// Specifies how to treat concurrent executions of a Job.
	// Valid values are:
	//
	// - "Allow" (default): allows CronJobs to run concurrently;
	// - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
	// - "Replace": cancels currently running job and replaces it with a new one
	ConcurrencyPolicy *batchv1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"`
	// This flag tells the controller to suspend subsequent executions, it does
	// not apply to already started executions.  Defaults to false.
	Suspend *bool `json:"suspend,omitempty"`
	// Specifies the job that will be created when executing a CronJob.
	JobTemplate *JobTemplateSpecApplyConfiguration `json:"jobTemplate,omitempty"`
	// The number of successful finished jobs to retain. Value must be non-negative integer.
	// Defaults to 3.
	SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"`
	// The number of failed finished jobs to retain. Value must be non-negative integer.
	// Defaults to 1.
	FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"`
}

CronJobSpecApplyConfiguration represents a declarative configuration of the CronJobSpec type for use with apply.

CronJobSpec describes how the job execution will look like and when it will actually run.

func CronJobSpec

func CronJobSpec() *CronJobSpecApplyConfiguration

CronJobSpecApplyConfiguration constructs a declarative configuration of the CronJobSpec type for use with apply.

func (*CronJobSpecApplyConfiguration) WithConcurrencyPolicy

WithConcurrencyPolicy sets the ConcurrencyPolicy field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ConcurrencyPolicy field is set to the value of the last call.

func (*CronJobSpecApplyConfiguration) WithFailedJobsHistoryLimit

func (b *CronJobSpecApplyConfiguration) WithFailedJobsHistoryLimit(value int32) *CronJobSpecApplyConfiguration

WithFailedJobsHistoryLimit sets the FailedJobsHistoryLimit field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the FailedJobsHistoryLimit field is set to the value of the last call.

func (*CronJobSpecApplyConfiguration) WithJobTemplate

WithJobTemplate sets the JobTemplate field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the JobTemplate field is set to the value of the last call.

func (*CronJobSpecApplyConfiguration) WithSchedule

WithSchedule sets the Schedule field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Schedule field is set to the value of the last call.

func (*CronJobSpecApplyConfiguration) WithStartingDeadlineSeconds

func (b *CronJobSpecApplyConfiguration) WithStartingDeadlineSeconds(value int64) *CronJobSpecApplyConfiguration

WithStartingDeadlineSeconds sets the StartingDeadlineSeconds field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the StartingDeadlineSeconds field is set to the value of the last call.

func (*CronJobSpecApplyConfiguration) WithSuccessfulJobsHistoryLimit

func (b *CronJobSpecApplyConfiguration) WithSuccessfulJobsHistoryLimit(value int32) *CronJobSpecApplyConfiguration

WithSuccessfulJobsHistoryLimit sets the SuccessfulJobsHistoryLimit field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the SuccessfulJobsHistoryLimit field is set to the value of the last call.

func (*CronJobSpecApplyConfiguration) WithSuspend

WithSuspend sets the Suspend field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Suspend field is set to the value of the last call.

func (*CronJobSpecApplyConfiguration) WithTimeZone

WithTimeZone sets the TimeZone field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the TimeZone field is set to the value of the last call.

type CronJobStatusApplyConfiguration

type CronJobStatusApplyConfiguration struct {
	// A list of pointers to currently running jobs.
	Active []corev1.ObjectReferenceApplyConfiguration `json:"active,omitempty"`
	// Information when was the last time the job was successfully scheduled.
	LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"`
	// Information when was the last time the job successfully completed.
	LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty"`
}

CronJobStatusApplyConfiguration represents a declarative configuration of the CronJobStatus type for use with apply.

CronJobStatus represents the current state of a cron job.

func CronJobStatus

func CronJobStatus() *CronJobStatusApplyConfiguration

CronJobStatusApplyConfiguration constructs a declarative configuration of the CronJobStatus type for use with apply.

func (*CronJobStatusApplyConfiguration) WithActive

WithActive adds the given value to the Active field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Active field.

func (*CronJobStatusApplyConfiguration) WithLastScheduleTime

WithLastScheduleTime sets the LastScheduleTime field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the LastScheduleTime field is set to the value of the last call.

func (*CronJobStatusApplyConfiguration) WithLastSuccessfulTime

WithLastSuccessfulTime sets the LastSuccessfulTime field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the LastSuccessfulTime field is set to the value of the last call.

type JobApplyConfiguration

type JobApplyConfiguration struct {
	metav1.TypeMetaApplyConfiguration `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
	// Specification of the desired behavior of a job.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	Spec *JobSpecApplyConfiguration `json:"spec,omitempty"`
	// Current status of a job.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	Status *JobStatusApplyConfiguration `json:"status,omitempty"`
}

JobApplyConfiguration represents a declarative configuration of the Job type for use with apply.

Job represents the configuration of a single job.

func ExtractJob

func ExtractJob(job *batchv1.Job, fieldManager string) (*JobApplyConfiguration, error)

ExtractJob extracts the applied configuration owned by fieldManager from job. If no managedFields are found in job for fieldManager, a JobApplyConfiguration is returned with only the Name, Namespace (if applicable), APIVersion and Kind populated. It is possible that no managed fields were found for because other field managers have taken ownership of all the fields previously owned by fieldManager, or because the fieldManager never owned fields any fields. job must be a unmodified Job API object that was retrieved from the Kubernetes API. ExtractJob provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.

func ExtractJobFrom

func ExtractJobFrom(job *batchv1.Job, fieldManager string, subresource string) (*JobApplyConfiguration, error)

ExtractJobFrom extracts the applied configuration owned by fieldManager from job for the specified subresource. Pass an empty string for subresource to extract the main resource. Common subresources include "status", "scale", etc. job must be a unmodified Job API object that was retrieved from the Kubernetes API. ExtractJobFrom provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.

func ExtractJobStatus

func ExtractJobStatus(job *batchv1.Job, fieldManager string) (*JobApplyConfiguration, error)

ExtractJobStatus extracts the applied configuration owned by fieldManager from job for the status subresource.

func Job

func Job(name, namespace string) *JobApplyConfiguration

Job constructs a declarative configuration of the Job type for use with apply.

func (*JobApplyConfiguration) GetAPIVersion

func (b *JobApplyConfiguration) GetAPIVersion() *string

GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.

func (*JobApplyConfiguration) GetKind

func (b *JobApplyConfiguration) GetKind() *string

GetKind retrieves the value of the Kind field in the declarative configuration.

func (*JobApplyConfiguration) GetName

func (b *JobApplyConfiguration) GetName() *string

GetName retrieves the value of the Name field in the declarative configuration.

func (*JobApplyConfiguration) GetNamespace

func (b *JobApplyConfiguration) GetNamespace() *string

GetNamespace retrieves the value of the Namespace field in the declarative configuration.

func (JobApplyConfiguration) IsApplyConfiguration

func (b JobApplyConfiguration) IsApplyConfiguration()

func (*JobApplyConfiguration) WithAPIVersion

func (b *JobApplyConfiguration) WithAPIVersion(value string) *JobApplyConfiguration

WithAPIVersion sets the APIVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the APIVersion field is set to the value of the last call.

func (*JobApplyConfiguration) WithAnnotations

func (b *JobApplyConfiguration) WithAnnotations(entries map[string]string) *JobApplyConfiguration

WithAnnotations puts the entries into the Annotations field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Annotations field, overwriting an existing map entries in Annotations field with the same key.

func (*JobApplyConfiguration) WithCreationTimestamp

func (b *JobApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *JobApplyConfiguration

WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the CreationTimestamp field is set to the value of the last call.

func (*JobApplyConfiguration) WithDeletionGracePeriodSeconds

func (b *JobApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *JobApplyConfiguration

WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.

func (*JobApplyConfiguration) WithDeletionTimestamp

func (b *JobApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *JobApplyConfiguration

WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionTimestamp field is set to the value of the last call.

func (*JobApplyConfiguration) WithFinalizers

func (b *JobApplyConfiguration) WithFinalizers(values ...string) *JobApplyConfiguration

WithFinalizers adds the given value to the Finalizers field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Finalizers field.

func (*JobApplyConfiguration) WithGenerateName

func (b *JobApplyConfiguration) WithGenerateName(value string) *JobApplyConfiguration

WithGenerateName sets the GenerateName field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the GenerateName field is set to the value of the last call.

func (*JobApplyConfiguration) WithGeneration

func (b *JobApplyConfiguration) WithGeneration(value int64) *JobApplyConfiguration

WithGeneration sets the Generation field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Generation field is set to the value of the last call.

func (*JobApplyConfiguration) WithKind

WithKind sets the Kind field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Kind field is set to the value of the last call.

func (*JobApplyConfiguration) WithLabels

func (b *JobApplyConfiguration) WithLabels(entries map[string]string) *JobApplyConfiguration

WithLabels puts the entries into the Labels field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Labels field, overwriting an existing map entries in Labels field with the same key.

func (*JobApplyConfiguration) WithName

WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.

func (*JobApplyConfiguration) WithNamespace

func (b *JobApplyConfiguration) WithNamespace(value string) *JobApplyConfiguration

WithNamespace sets the Namespace field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Namespace field is set to the value of the last call.

func (*JobApplyConfiguration) WithOwnerReferences

WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the OwnerReferences field.

func (*JobApplyConfiguration) WithResourceVersion

func (b *JobApplyConfiguration) WithResourceVersion(value string) *JobApplyConfiguration

WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ResourceVersion field is set to the value of the last call.

func (*JobApplyConfiguration) WithSpec

WithSpec sets the Spec field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Spec field is set to the value of the last call.

func (*JobApplyConfiguration) WithStatus

WithStatus sets the Status field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Status field is set to the value of the last call.

func (*JobApplyConfiguration) WithUID

WithUID sets the UID field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the UID field is set to the value of the last call.

type JobConditionApplyConfiguration

type JobConditionApplyConfiguration struct {
	// Type of job condition, Complete or Failed.
	Type *batchv1.JobConditionType `json:"type,omitempty"`
	// Status of the condition, one of True, False, Unknown.
	Status *corev1.ConditionStatus `json:"status,omitempty"`
	// Last time the condition was checked.
	LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"`
	// Last time the condition transit from one status to another.
	LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
	// (brief) reason for the condition's last transition.
	Reason *string `json:"reason,omitempty"`
	// Human readable message indicating details about last transition.
	Message *string `json:"message,omitempty"`
}

JobConditionApplyConfiguration represents a declarative configuration of the JobCondition type for use with apply.

JobCondition describes current state of a job.

func JobCondition

func JobCondition() *JobConditionApplyConfiguration

JobConditionApplyConfiguration constructs a declarative configuration of the JobCondition type for use with apply.

func (*JobConditionApplyConfiguration) WithLastProbeTime

WithLastProbeTime sets the LastProbeTime field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the LastProbeTime field is set to the value of the last call.

func (*JobConditionApplyConfiguration) WithLastTransitionTime

WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the LastTransitionTime field is set to the value of the last call.

func (*JobConditionApplyConfiguration) WithMessage

WithMessage sets the Message field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Message field is set to the value of the last call.

func (*JobConditionApplyConfiguration) WithReason

WithReason sets the Reason field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Reason field is set to the value of the last call.

func (*JobConditionApplyConfiguration) WithStatus

WithStatus sets the Status field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Status field is set to the value of the last call.

func (*JobConditionApplyConfiguration) WithType

WithType sets the Type field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Type field is set to the value of the last call.

type JobSpecApplyConfiguration

type JobSpecApplyConfiguration struct {
	// Specifies the maximum desired number of pods the job should
	// run at any given time. The actual number of pods running in steady state will
	// be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
	// i.e. when the work left to do is less than max parallelism.
	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
	Parallelism *int32 `json:"parallelism,omitempty"`
	// Specifies the desired number of successfully finished pods the
	// job should be run with.  Setting to null means that the success of any
	// pod signals the success of all pods, and allows parallelism to have any positive
	// value.  Setting to 1 means that parallelism is limited to 1 and the success of that
	// pod signals the success of the job.
	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
	Completions *int32 `json:"completions,omitempty"`
	// Specifies the duration in seconds relative to the startTime that the job
	// may be continuously active before the system tries to terminate it; value
	// must be positive integer. If a Job is suspended (at creation or through an
	// update), this timer will effectively be stopped and reset when the Job is
	// resumed again.
	ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
	// Specifies the policy of handling failed pods. In particular, it allows to
	// specify the set of actions and conditions which need to be
	// satisfied to take the associated action.
	// If empty, the default behaviour applies - the counter of failed pods,
	// represented by the jobs's .status.failed field, is incremented and it is
	// checked against the backoffLimit. This field cannot be used in combination
	// with restartPolicy=OnFailure.
	PodFailurePolicy *PodFailurePolicyApplyConfiguration `json:"podFailurePolicy,omitempty"`
	// successPolicy specifies the policy when the Job can be declared as succeeded.
	// If empty, the default behavior applies - the Job is declared as succeeded
	// only when the number of succeeded pods equals to the completions.
	// When the field is specified, it must be immutable and works only for the Indexed Jobs.
	// Once the Job meets the SuccessPolicy, the lingering pods are terminated.
	SuccessPolicy *SuccessPolicyApplyConfiguration `json:"successPolicy,omitempty"`
	// Specifies the number of retries before marking this job failed.
	// Defaults to 6, unless backoffLimitPerIndex (only Indexed Job) is specified.
	// When backoffLimitPerIndex is specified, backoffLimit defaults to 2147483647.
	BackoffLimit *int32 `json:"backoffLimit,omitempty"`
	// Specifies the limit for the number of retries within an
	// index before marking this index as failed. When enabled the number of
	// failures per index is kept in the pod's
	// batch.kubernetes.io/job-index-failure-count annotation. It can only
	// be set when Job's completionMode=Indexed, and the Pod's restart
	// policy is Never. The field is immutable.
	BackoffLimitPerIndex *int32 `json:"backoffLimitPerIndex,omitempty"`
	// Specifies the maximal number of failed indexes before marking the Job as
	// failed, when backoffLimitPerIndex is set. Once the number of failed
	// indexes exceeds this number the entire Job is marked as Failed and its
	// execution is terminated. When left as null the job continues execution of
	// all of its indexes and is marked with the `Complete` Job condition.
	// It can only be specified when backoffLimitPerIndex is set.
	// It can be null or up to completions. It is required and must be
	// less than or equal to 10^4 when is completions greater than 10^5.
	MaxFailedIndexes *int32 `json:"maxFailedIndexes,omitempty"`
	// A label query over pods that should match the pod count.
	// Normally, the system sets this field for you.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
	Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
	// manualSelector controls generation of pod labels and pod selectors.
	// Leave `manualSelector` unset unless you are certain what you are doing.
	// When false or unset, the system pick labels unique to this job
	// and appends those labels to the pod template.  When true,
	// the user is responsible for picking unique labels and specifying
	// the selector.  Failure to pick a unique label may cause this
	// and other jobs to not function correctly.  However, You may see
	// `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
	// API.
	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector
	ManualSelector *bool `json:"manualSelector,omitempty"`
	// Describes the pod that will be created when executing a job.
	// The only allowed template.spec.restartPolicy values are "Never" or "OnFailure".
	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
	Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"`
	// ttlSecondsAfterFinished limits the lifetime of a Job that has finished
	// execution (either Complete or Failed). If this field is set,
	// ttlSecondsAfterFinished after the Job finishes, it is eligible to be
	// automatically deleted. When the Job is being deleted, its lifecycle
	// guarantees (e.g. finalizers) will be honored. If this field is unset,
	// the Job won't be automatically deleted. If this field is set to zero,
	// the Job becomes eligible to be deleted immediately after it finishes.
	TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`
	// completionMode specifies how Pod completions are tracked. It can be
	// `NonIndexed` (default) or `Indexed`.
	//
	// `NonIndexed` means that the Job is considered complete when there have
	// been .spec.completions successfully completed Pods. Each Pod completion is
	// homologous to each other.
	//
	// `Indexed` means that the Pods of a
	// Job get an associated completion index from 0 to (.spec.completions - 1),
	// available in the annotation batch.kubernetes.io/job-completion-index.
	// The Job is considered complete when there is one successfully completed Pod
	// for each index.
	// When value is `Indexed`, .spec.completions must be specified and
	// `.spec.parallelism` must be less than or equal to 10^5.
	// In addition, The Pod name takes the form
	// `$(job-name)-$(index)-$(random-string)`,
	// the Pod hostname takes the form `$(job-name)-$(index)`.
	//
	// More completion modes can be added in the future.
	// If the Job controller observes a mode that it doesn't recognize, which
	// is possible during upgrades due to version skew, the controller
	// skips updates for the Job.
	CompletionMode *batchv1.CompletionMode `json:"completionMode,omitempty"`
	// suspend specifies whether the Job controller should create Pods or not. If
	// a Job is created with suspend set to true, no Pods are created by the Job
	// controller. If a Job is suspended after creation (i.e. the flag goes from
	// false to true), the Job controller will delete all active Pods associated
	// with this Job. Users must design their workload to gracefully handle this.
	// Suspending a Job will reset the StartTime field of the Job, effectively
	// resetting the ActiveDeadlineSeconds timer too. Defaults to false.
	Suspend *bool `json:"suspend,omitempty"`
	// podReplacementPolicy specifies when to create replacement Pods.
	// Possible values are:
	// - TerminatingOrFailed means that we recreate pods
	// when they are terminating (has a metadata.deletionTimestamp) or failed.
	// - Failed means to wait until a previously created Pod is fully terminated (has phase
	// Failed or Succeeded) before creating a replacement Pod.
	//
	// When using podFailurePolicy, Failed is the the only allowed value.
	// TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use.
	PodReplacementPolicy *batchv1.PodReplacementPolicy `json:"podReplacementPolicy,omitempty"`
	// ManagedBy field indicates the controller that manages a Job. The k8s Job
	// controller reconciles jobs which don't have this field at all or the field
	// value is the reserved string `kubernetes.io/job-controller`, but skips
	// reconciling Jobs with a custom value for this field.
	// The value must be a valid domain-prefixed path (e.g. acme.io/foo) -
	// all characters before the first "/" must be a valid subdomain as defined
	// by RFC 1123. All characters trailing the first "/" must be valid HTTP Path
	// characters as defined by RFC 3986. The value cannot exceed 63 characters.
	// This field is immutable.
	ManagedBy *string `json:"managedBy,omitempty"`
}

JobSpecApplyConfiguration represents a declarative configuration of the JobSpec type for use with apply.

JobSpec describes how the job execution will look like.

func JobSpec

func JobSpec() *JobSpecApplyConfiguration

JobSpecApplyConfiguration constructs a declarative configuration of the JobSpec type for use with apply.

func (*JobSpecApplyConfiguration) WithActiveDeadlineSeconds

func (b *JobSpecApplyConfiguration) WithActiveDeadlineSeconds(value int64) *JobSpecApplyConfiguration

WithActiveDeadlineSeconds sets the ActiveDeadlineSeconds field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ActiveDeadlineSeconds field is set to the value of the last call.

func (*JobSpecApplyConfiguration) WithBackoffLimit

func (b *JobSpecApplyConfiguration) WithBackoffLimit(value int32) *JobSpecApplyConfiguration

WithBackoffLimit sets the BackoffLimit field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the BackoffLimit field is set to the value of the last call.

func (*JobSpecApplyConfiguration) WithBackoffLimitPerIndex

func (b *JobSpecApplyConfiguration) WithBackoffLimitPerIndex(value int32) *JobSpecApplyConfiguration

WithBackoffLimitPerIndex sets the BackoffLimitPerIndex field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the BackoffLimitPerIndex field is set to the value of the last call.

func (*JobSpecApplyConfiguration) WithCompletionMode

WithCompletionMode sets the CompletionMode field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the CompletionMode field is set to the value of the last call.

func (*JobSpecApplyConfiguration) WithCompletions

func (b *JobSpecApplyConfiguration) WithCompletions(value int32) *JobSpecApplyConfiguration

WithCompletions sets the Completions field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Completions field is set to the value of the last call.

func (*JobSpecApplyConfiguration) WithManagedBy

WithManagedBy sets the ManagedBy field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ManagedBy field is set to the value of the last call.

func (*JobSpecApplyConfiguration) WithManualSelector

func (b *JobSpecApplyConfiguration) WithManualSelector(value bool) *JobSpecApplyConfiguration

WithManualSelector sets the ManualSelector field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ManualSelector field is set to the value of the last call.

func (*JobSpecApplyConfiguration) WithMaxFailedIndexes

func (b *JobSpecApplyConfiguration) WithMaxFailedIndexes(value int32) *JobSpecApplyConfiguration

WithMaxFailedIndexes sets the MaxFailedIndexes field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the MaxFailedIndexes field is set to the value of the last call.

func (*JobSpecApplyConfiguration) WithParallelism

func (b *JobSpecApplyConfiguration) WithParallelism(value int32) *JobSpecApplyConfiguration

WithParallelism sets the Parallelism field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Parallelism field is set to the value of the last call.

func (*JobSpecApplyConfiguration) WithPodFailurePolicy

WithPodFailurePolicy sets the PodFailurePolicy field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the PodFailurePolicy field is set to the value of the last call.

func (*JobSpecApplyConfiguration) WithPodReplacementPolicy

WithPodReplacementPolicy sets the PodReplacementPolicy field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the PodReplacementPolicy field is set to the value of the last call.

func (*JobSpecApplyConfiguration) WithSelector

WithSelector sets the Selector field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Selector field is set to the value of the last call.

func (*JobSpecApplyConfiguration) WithSuccessPolicy

WithSuccessPolicy sets the SuccessPolicy field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the SuccessPolicy field is set to the value of the last call.

func (*JobSpecApplyConfiguration) WithSuspend

WithSuspend sets the Suspend field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Suspend field is set to the value of the last call.

func (*JobSpecApplyConfiguration) WithTTLSecondsAfterFinished

func (b *JobSpecApplyConfiguration) WithTTLSecondsAfterFinished(value int32) *JobSpecApplyConfiguration

WithTTLSecondsAfterFinished sets the TTLSecondsAfterFinished field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the TTLSecondsAfterFinished field is set to the value of the last call.

func (*JobSpecApplyConfiguration) WithTemplate

WithTemplate sets the Template field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Template field is set to the value of the last call.

type JobStatusApplyConfiguration

type JobStatusApplyConfiguration struct {
	// The latest available observations of an object's current state. When a Job
	// fails, one of the conditions will have type "Failed" and status true. When
	// a Job is suspended, one of the conditions will have type "Suspended" and
	// status true; when the Job is resumed, the status of this condition will
	// become false. When a Job is completed, one of the conditions will have
	// type "Complete" and status true.
	//
	// A job is considered finished when it is in a terminal condition, either
	// "Complete" or "Failed". A Job cannot have both the "Complete" and "Failed" conditions.
	// Additionally, it cannot be in the "Complete" and "FailureTarget" conditions.
	// The "Complete", "Failed" and "FailureTarget" conditions cannot be disabled.
	//
	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
	Conditions []JobConditionApplyConfiguration `json:"conditions,omitempty"`
	// 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.
	//
	// Once set, the field can only be removed when the job is suspended.
	// The field cannot be modified while the job is unsuspended or finished.
	StartTime *metav1.Time `json:"startTime,omitempty"`
	// 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 set when the job finishes successfully, and only then.
	// The value cannot be updated or removed. The value indicates the same or
	// later point in time as the startTime field.
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`
	// The number of pending and running pods which are not terminating (without
	// a deletionTimestamp).
	// The value is zero for finished jobs.
	Active *int32 `json:"active,omitempty"`
	// The number of pods which reached phase Succeeded.
	// The value increases monotonically for a given spec. However, it may
	// decrease in reaction to scale down of elastic indexed jobs.
	Succeeded *int32 `json:"succeeded,omitempty"`
	// The number of pods which reached phase Failed.
	// The value increases monotonically.
	Failed *int32 `json:"failed,omitempty"`
	// The number of pods which are terminating (in phase Pending or Running
	// and have a deletionTimestamp).
	//
	// This field is beta-level. The job controller populates the field when
	// the feature gate JobPodReplacementPolicy is enabled (enabled by default).
	Terminating *int32 `json:"terminating,omitempty"`
	// completedIndexes holds the completed indexes when .spec.completionMode =
	// "Indexed" in a text format. The indexes are represented as decimal integers
	// separated by commas. The numbers are listed in increasing order. Three or
	// more consecutive numbers are compressed and represented by the first and
	// last element of the series, separated by a hyphen.
	// For example, if the completed indexes are 1, 3, 4, 5 and 7, they are
	// represented as "1,3-5,7".
	CompletedIndexes *string `json:"completedIndexes,omitempty"`
	// FailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set.
	// The indexes are represented in the text format analogous as for the
	// `completedIndexes` field, ie. they are kept as decimal integers
	// separated by commas. The numbers are listed in increasing order. Three or
	// more consecutive numbers are compressed and represented by the first and
	// last element of the series, separated by a hyphen.
	// For example, if the failed indexes are 1, 3, 4, 5 and 7, they are
	// represented as "1,3-5,7".
	// The set of failed indexes cannot overlap with the set of completed indexes.
	FailedIndexes *string `json:"failedIndexes,omitempty"`
	// uncountedTerminatedPods holds the UIDs of Pods that have terminated but
	// the job controller hasn't yet accounted for in the status counters.
	//
	// The job controller creates pods with a finalizer. When a pod terminates
	// (succeeded or failed), the controller does three steps to account for it
	// in the job status:
	//
	// 1. Add the pod UID to the arrays in this field.
	// 2. Remove the pod finalizer.
	// 3. Remove the pod UID from the arrays while increasing the corresponding
	// counter.
	//
	// Old jobs might not be tracked using this field, in which case the field
	// remains null.
	// The structure is empty for finished jobs.
	UncountedTerminatedPods *UncountedTerminatedPodsApplyConfiguration `json:"uncountedTerminatedPods,omitempty"`
	// The number of active pods which have a Ready condition and are not
	// terminating (without a deletionTimestamp).
	Ready *int32 `json:"ready,omitempty"`
}

JobStatusApplyConfiguration represents a declarative configuration of the JobStatus type for use with apply.

JobStatus represents the current state of a Job.

func JobStatus

func JobStatus() *JobStatusApplyConfiguration

JobStatusApplyConfiguration constructs a declarative configuration of the JobStatus type for use with apply.

func (*JobStatusApplyConfiguration) WithActive

WithActive sets the Active field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Active field is set to the value of the last call.

func (*JobStatusApplyConfiguration) WithCompletedIndexes

func (b *JobStatusApplyConfiguration) WithCompletedIndexes(value string) *JobStatusApplyConfiguration

WithCompletedIndexes sets the CompletedIndexes field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the CompletedIndexes field is set to the value of the last call.

func (*JobStatusApplyConfiguration) WithCompletionTime

WithCompletionTime sets the CompletionTime field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the CompletionTime field is set to the value of the last call.

func (*JobStatusApplyConfiguration) WithConditions

WithConditions adds the given value to the Conditions field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Conditions field.

func (*JobStatusApplyConfiguration) WithFailed

WithFailed sets the Failed field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Failed field is set to the value of the last call.

func (*JobStatusApplyConfiguration) WithFailedIndexes

func (b *JobStatusApplyConfiguration) WithFailedIndexes(value string) *JobStatusApplyConfiguration

WithFailedIndexes sets the FailedIndexes field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the FailedIndexes field is set to the value of the last call.

func (*JobStatusApplyConfiguration) WithReady

WithReady sets the Ready field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Ready field is set to the value of the last call.

func (*JobStatusApplyConfiguration) WithStartTime

WithStartTime sets the StartTime field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the StartTime field is set to the value of the last call.

func (*JobStatusApplyConfiguration) WithSucceeded

WithSucceeded sets the Succeeded field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Succeeded field is set to the value of the last call.

func (*JobStatusApplyConfiguration) WithTerminating

WithTerminating sets the Terminating field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Terminating field is set to the value of the last call.

func (*JobStatusApplyConfiguration) WithUncountedTerminatedPods

WithUncountedTerminatedPods sets the UncountedTerminatedPods field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the UncountedTerminatedPods field is set to the value of the last call.

type JobTemplateSpecApplyConfiguration

type JobTemplateSpecApplyConfiguration struct {
	// Standard object's metadata of the jobs created from this template.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
	// Specification of the desired behavior of the job.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	Spec *JobSpecApplyConfiguration `json:"spec,omitempty"`
}

JobTemplateSpecApplyConfiguration represents a declarative configuration of the JobTemplateSpec type for use with apply.

JobTemplateSpec describes the data a Job should have when created from a template

func JobTemplateSpec

func JobTemplateSpec() *JobTemplateSpecApplyConfiguration

JobTemplateSpecApplyConfiguration constructs a declarative configuration of the JobTemplateSpec type for use with apply.

func (*JobTemplateSpecApplyConfiguration) GetName

GetName retrieves the value of the Name field in the declarative configuration.

func (*JobTemplateSpecApplyConfiguration) GetNamespace

func (b *JobTemplateSpecApplyConfiguration) GetNamespace() *string

GetNamespace retrieves the value of the Namespace field in the declarative configuration.

func (*JobTemplateSpecApplyConfiguration) WithAnnotations

WithAnnotations puts the entries into the Annotations field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Annotations field, overwriting an existing map entries in Annotations field with the same key.

func (*JobTemplateSpecApplyConfiguration) WithCreationTimestamp

WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the CreationTimestamp field is set to the value of the last call.

func (*JobTemplateSpecApplyConfiguration) WithDeletionGracePeriodSeconds

func (b *JobTemplateSpecApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *JobTemplateSpecApplyConfiguration

WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.

func (*JobTemplateSpecApplyConfiguration) WithDeletionTimestamp

WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionTimestamp field is set to the value of the last call.

func (*JobTemplateSpecApplyConfiguration) WithFinalizers

WithFinalizers adds the given value to the Finalizers field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Finalizers field.

func (*JobTemplateSpecApplyConfiguration) WithGenerateName

WithGenerateName sets the GenerateName field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the GenerateName field is set to the value of the last call.

func (*JobTemplateSpecApplyConfiguration) WithGeneration

WithGeneration sets the Generation field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Generation field is set to the value of the last call.

func (*JobTemplateSpecApplyConfiguration) WithLabels

WithLabels puts the entries into the Labels field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Labels field, overwriting an existing map entries in Labels field with the same key.

func (*JobTemplateSpecApplyConfiguration) WithName

WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.

func (*JobTemplateSpecApplyConfiguration) WithNamespace

WithNamespace sets the Namespace field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Namespace field is set to the value of the last call.

func (*JobTemplateSpecApplyConfiguration) WithOwnerReferences

WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the OwnerReferences field.

func (*JobTemplateSpecApplyConfiguration) WithResourceVersion

WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ResourceVersion field is set to the value of the last call.

func (*JobTemplateSpecApplyConfiguration) WithSpec

WithSpec sets the Spec field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Spec field is set to the value of the last call.

func (*JobTemplateSpecApplyConfiguration) WithUID

WithUID sets the UID field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the UID field is set to the value of the last call.

type PodFailurePolicyApplyConfiguration

type PodFailurePolicyApplyConfiguration struct {
	// A list of pod failure policy rules. The rules are evaluated in order.
	// Once a rule matches a Pod failure, the remaining of the rules are ignored.
	// When no rule matches the Pod failure, the default handling applies - the
	// counter of pod failures is incremented and it is checked against
	// the backoffLimit. At most 20 elements are allowed.
	Rules []PodFailurePolicyRuleApplyConfiguration `json:"rules,omitempty"`
}

PodFailurePolicyApplyConfiguration represents a declarative configuration of the PodFailurePolicy type for use with apply.

PodFailurePolicy describes how failed pods influence the backoffLimit.

func PodFailurePolicy

func PodFailurePolicy() *PodFailurePolicyApplyConfiguration

PodFailurePolicyApplyConfiguration constructs a declarative configuration of the PodFailurePolicy type for use with apply.

func (*PodFailurePolicyApplyConfiguration) WithRules

WithRules adds the given value to the Rules field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Rules field.

type PodFailurePolicyOnExitCodesRequirementApplyConfiguration

type PodFailurePolicyOnExitCodesRequirementApplyConfiguration struct {
	// Restricts the check for exit codes to the container with the
	// specified name. When null, the rule applies to all containers.
	// When specified, it should match one the container or initContainer
	// names in the pod template.
	ContainerName *string `json:"containerName,omitempty"`
	// Represents the relationship between the container exit code(s) and the
	// specified values. Containers completed with success (exit code 0) are
	// excluded from the requirement check. Possible values are:
	//
	// - In: the requirement is satisfied if at least one container exit code
	// (might be multiple if there are multiple containers not restricted
	// by the 'containerName' field) is in the set of specified values.
	// - NotIn: the requirement is satisfied if at least one container exit code
	// (might be multiple if there are multiple containers not restricted
	// by the 'containerName' field) is not in the set of specified values.
	// Additional values are considered to be added in the future. Clients should
	// react to an unknown operator by assuming the requirement is not satisfied.
	Operator *batchv1.PodFailurePolicyOnExitCodesOperator `json:"operator,omitempty"`
	// Specifies the set of values. Each returned container exit code (might be
	// multiple in case of multiple containers) is checked against this set of
	// values with respect to the operator. The list of values must be ordered
	// and must not contain duplicates. Value '0' cannot be used for the In operator.
	// At least one element is required. At most 255 elements are allowed.
	Values []int32 `json:"values,omitempty"`
}

PodFailurePolicyOnExitCodesRequirementApplyConfiguration represents a declarative configuration of the PodFailurePolicyOnExitCodesRequirement type for use with apply.

PodFailurePolicyOnExitCodesRequirement describes the requirement for handling a failed pod based on its container exit codes. In particular, it lookups the .state.terminated.exitCode for each app container and init container status, represented by the .status.containerStatuses and .status.initContainerStatuses fields in the Pod status, respectively. Containers completed with success (exit code 0) are excluded from the requirement check.

func PodFailurePolicyOnExitCodesRequirement

func PodFailurePolicyOnExitCodesRequirement() *PodFailurePolicyOnExitCodesRequirementApplyConfiguration

PodFailurePolicyOnExitCodesRequirementApplyConfiguration constructs a declarative configuration of the PodFailurePolicyOnExitCodesRequirement type for use with apply.

func (*PodFailurePolicyOnExitCodesRequirementApplyConfiguration) WithContainerName

WithContainerName sets the ContainerName field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ContainerName field is set to the value of the last call.

func (*PodFailurePolicyOnExitCodesRequirementApplyConfiguration) WithOperator

WithOperator sets the Operator field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Operator field is set to the value of the last call.

func (*PodFailurePolicyOnExitCodesRequirementApplyConfiguration) WithValues

WithValues adds the given value to the Values field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Values field.

type PodFailurePolicyOnPodConditionsPatternApplyConfiguration

type PodFailurePolicyOnPodConditionsPatternApplyConfiguration struct {
	// Specifies the required Pod condition type. To match a pod condition
	// it is required that specified type equals the pod condition type.
	Type *corev1.PodConditionType `json:"type,omitempty"`
	// Specifies the required Pod condition status. To match a pod condition
	// it is required that the specified status equals the pod condition status.
	// Defaults to True.
	Status *corev1.ConditionStatus `json:"status,omitempty"`
}

PodFailurePolicyOnPodConditionsPatternApplyConfiguration represents a declarative configuration of the PodFailurePolicyOnPodConditionsPattern type for use with apply.

PodFailurePolicyOnPodConditionsPattern describes a pattern for matching an actual pod condition type.

func PodFailurePolicyOnPodConditionsPattern

func PodFailurePolicyOnPodConditionsPattern() *PodFailurePolicyOnPodConditionsPatternApplyConfiguration

PodFailurePolicyOnPodConditionsPatternApplyConfiguration constructs a declarative configuration of the PodFailurePolicyOnPodConditionsPattern type for use with apply.

func (*PodFailurePolicyOnPodConditionsPatternApplyConfiguration) WithStatus

WithStatus sets the Status field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Status field is set to the value of the last call.

func (*PodFailurePolicyOnPodConditionsPatternApplyConfiguration) WithType

WithType sets the Type field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Type field is set to the value of the last call.

type PodFailurePolicyRuleApplyConfiguration

type PodFailurePolicyRuleApplyConfiguration struct {
	// Specifies the action taken on a pod failure when the requirements are satisfied.
	// Possible values are:
	//
	// - FailJob: indicates that the pod's job is marked as Failed and all
	// running pods are terminated.
	// - FailIndex: indicates that the pod's index is marked as Failed and will
	// not be restarted.
	// - Ignore: indicates that the counter towards the .backoffLimit is not
	// incremented and a replacement pod is created.
	// - Count: indicates that the pod is handled in the default way - the
	// counter towards the .backoffLimit is incremented.
	// Additional values are considered to be added in the future. Clients should
	// react to an unknown action by skipping the rule.
	Action *batchv1.PodFailurePolicyAction `json:"action,omitempty"`
	// Represents the requirement on the container exit codes.
	OnExitCodes *PodFailurePolicyOnExitCodesRequirementApplyConfiguration `json:"onExitCodes,omitempty"`
	// Represents the requirement on the pod conditions. The requirement is represented
	// as a list of pod condition patterns. The requirement is satisfied if at
	// least one pattern matches an actual pod condition. At most 20 elements are allowed.
	OnPodConditions []PodFailurePolicyOnPodConditionsPatternApplyConfiguration `json:"onPodConditions,omitempty"`
}

PodFailurePolicyRuleApplyConfiguration represents a declarative configuration of the PodFailurePolicyRule type for use with apply.

PodFailurePolicyRule describes how a pod failure is handled when the requirements are met. One of onExitCodes and onPodConditions, but not both, can be used in each rule.

func PodFailurePolicyRule

func PodFailurePolicyRule() *PodFailurePolicyRuleApplyConfiguration

PodFailurePolicyRuleApplyConfiguration constructs a declarative configuration of the PodFailurePolicyRule type for use with apply.

func (*PodFailurePolicyRuleApplyConfiguration) WithAction

WithAction sets the Action field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Action field is set to the value of the last call.

func (*PodFailurePolicyRuleApplyConfiguration) WithOnExitCodes

WithOnExitCodes sets the OnExitCodes field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the OnExitCodes field is set to the value of the last call.

func (*PodFailurePolicyRuleApplyConfiguration) WithOnPodConditions

WithOnPodConditions adds the given value to the OnPodConditions field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the OnPodConditions field.

type SuccessPolicyApplyConfiguration

type SuccessPolicyApplyConfiguration struct {
	// rules represents the list of alternative rules for the declaring the Jobs
	// as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met,
	// the "SuccessCriteriaMet" condition is added, and the lingering pods are removed.
	// The terminal state for such a Job has the "Complete" condition.
	// Additionally, these rules are evaluated in order; Once the Job meets one of the rules,
	// other rules are ignored. At most 20 elements are allowed.
	Rules []SuccessPolicyRuleApplyConfiguration `json:"rules,omitempty"`
}

SuccessPolicyApplyConfiguration represents a declarative configuration of the SuccessPolicy type for use with apply.

SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes.

func SuccessPolicy

func SuccessPolicy() *SuccessPolicyApplyConfiguration

SuccessPolicyApplyConfiguration constructs a declarative configuration of the SuccessPolicy type for use with apply.

func (*SuccessPolicyApplyConfiguration) WithRules

WithRules adds the given value to the Rules field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Rules field.

type SuccessPolicyRuleApplyConfiguration

type SuccessPolicyRuleApplyConfiguration struct {
	// succeededIndexes specifies the set of indexes
	// which need to be contained in the actual set of the succeeded indexes for the Job.
	// The list of indexes must be within 0 to ".spec.completions-1" and
	// must not contain duplicates. At least one element is required.
	// The indexes are represented as intervals separated by commas.
	// The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen.
	// The number are listed in represented by the first and last element of the series,
	// separated by a hyphen.
	// For example, if the completed indexes are 1, 3, 4, 5 and 7, they are
	// represented as "1,3-5,7".
	// When this field is null, this field doesn't default to any value
	// and is never evaluated at any time.
	SucceededIndexes *string `json:"succeededIndexes,omitempty"`
	// succeededCount specifies the minimal required size of the actual set of the succeeded indexes
	// for the Job. When succeededCount is used along with succeededIndexes, the check is
	// constrained only to the set of indexes specified by succeededIndexes.
	// For example, given that succeededIndexes is "1-4", succeededCount is "3",
	// and completed indexes are "1", "3", and "5", the Job isn't declared as succeeded
	// because only "1" and "3" indexes are considered in that rules.
	// When this field is null, this doesn't default to any value and
	// is never evaluated at any time.
	// When specified it needs to be a positive integer.
	SucceededCount *int32 `json:"succeededCount,omitempty"`
}

SuccessPolicyRuleApplyConfiguration represents a declarative configuration of the SuccessPolicyRule type for use with apply.

SuccessPolicyRule describes rule for declaring a Job as succeeded. Each rule must have at least one of the "succeededIndexes" or "succeededCount" specified.

func SuccessPolicyRule

func SuccessPolicyRule() *SuccessPolicyRuleApplyConfiguration

SuccessPolicyRuleApplyConfiguration constructs a declarative configuration of the SuccessPolicyRule type for use with apply.

func (*SuccessPolicyRuleApplyConfiguration) WithSucceededCount

WithSucceededCount sets the SucceededCount field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the SucceededCount field is set to the value of the last call.

func (*SuccessPolicyRuleApplyConfiguration) WithSucceededIndexes

WithSucceededIndexes sets the SucceededIndexes field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the SucceededIndexes field is set to the value of the last call.

type UncountedTerminatedPodsApplyConfiguration

type UncountedTerminatedPodsApplyConfiguration struct {
	// succeeded holds UIDs of succeeded Pods.
	Succeeded []types.UID `json:"succeeded,omitempty"`
	// failed holds UIDs of failed Pods.
	Failed []types.UID `json:"failed,omitempty"`
}

UncountedTerminatedPodsApplyConfiguration represents a declarative configuration of the UncountedTerminatedPods type for use with apply.

UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't been accounted in Job status counters.

func UncountedTerminatedPods

func UncountedTerminatedPods() *UncountedTerminatedPodsApplyConfiguration

UncountedTerminatedPodsApplyConfiguration constructs a declarative configuration of the UncountedTerminatedPods type for use with apply.

func (*UncountedTerminatedPodsApplyConfiguration) WithFailed

WithFailed adds the given value to the Failed field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Failed field.

func (*UncountedTerminatedPodsApplyConfiguration) WithSucceeded

WithSucceeded adds the given value to the Succeeded field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Succeeded field.

Source Files

cronjob.go cronjobspec.go cronjobstatus.go job.go jobcondition.go jobspec.go jobstatus.go jobtemplatespec.go podfailurepolicy.go podfailurepolicyonexitcodesrequirement.go podfailurepolicyonpodconditionspattern.go podfailurepolicyrule.go successpolicy.go successpolicyrule.go uncountedterminatedpods.go

Version
v0.36.0-rc.0
Published
Apr 9, 2026
Platform
linux/amd64
Imports
8 packages
Last checked
2 minutes ago

Tools for package owners.