Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // AddToScheme is used for schema registrations in the controller package // and also in the generated kube code AddToScheme = schemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: apis.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Kind ¶
Kind takes an unqualified kind and returns back a Group qualified GroupKind
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type ExtendedJob ¶
type ExtendedJob struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ExtendedJobSpec `json:"spec,omitempty"` Status ExtendedJobStatus `json:"status,omitempty"` }
ExtendedJob is the Schema for the extendedstatefulsetcontroller API +k8s:openapi-gen=true
func (*ExtendedJob) DeepCopy ¶
func (in *ExtendedJob) DeepCopy() *ExtendedJob
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtendedJob.
func (*ExtendedJob) DeepCopyInto ¶
func (in *ExtendedJob) DeepCopyInto(out *ExtendedJob)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ExtendedJob) DeepCopyObject ¶
func (in *ExtendedJob) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ExtendedJob) IsAutoErrand ¶
func (e *ExtendedJob) IsAutoErrand() bool
IsAutoErrand returns true if this ext job is an auto errand
func (*ExtendedJob) ToBeDeleted ¶
func (e *ExtendedJob) ToBeDeleted() bool
ToBeDeleted checks whether this ExtendedJob has been marked for deletion
type ExtendedJobList ¶
type ExtendedJobList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ExtendedJob `json:"items"` }
ExtendedJobList contains a list of ExtendedJob
func (*ExtendedJobList) DeepCopy ¶
func (in *ExtendedJobList) DeepCopy() *ExtendedJobList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtendedJobList.
func (*ExtendedJobList) DeepCopyInto ¶
func (in *ExtendedJobList) DeepCopyInto(out *ExtendedJobList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ExtendedJobList) DeepCopyObject ¶
func (in *ExtendedJobList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ExtendedJobSpec ¶
type ExtendedJobSpec struct { Output *Output `json:"output,omitempty"` Trigger Trigger `json:"trigger"` Template corev1.PodTemplateSpec `json:"template"` UpdateOnConfigChange bool `json:"updateOnConfigChange"` }
ExtendedJobSpec defines the desired state of ExtendedJob
func (*ExtendedJobSpec) DeepCopy ¶
func (in *ExtendedJobSpec) DeepCopy() *ExtendedJobSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtendedJobSpec.
func (*ExtendedJobSpec) DeepCopyInto ¶
func (in *ExtendedJobSpec) DeepCopyInto(out *ExtendedJobSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExtendedJobStatus ¶
type ExtendedJobStatus struct {
Nodes []string `json:"nodes"`
}
ExtendedJobStatus defines the observed state of ExtendedJob
func (*ExtendedJobStatus) DeepCopy ¶
func (in *ExtendedJobStatus) DeepCopy() *ExtendedJobStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtendedJobStatus.
func (*ExtendedJobStatus) DeepCopyInto ¶
func (in *ExtendedJobStatus) DeepCopyInto(out *ExtendedJobStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Output ¶
type Output struct { NamePrefix string `json:"namePrefix"` // the secret name will be <NamePrefix><container name> OutputType string `json:"outputType,omitempty"` // only json is supported for now SecretLabels map[string]string `json:"secretLabels,omitempty"` WriteOnFailure bool `json:"writeOnFailure,omitempty"` }
Output contains options to persist job output
func (*Output) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Output.
type PodState ¶
type PodState string
PodState is our abstraction of the pods state with regards to triggered extended jobs
const ( // PodStateUnknown means we could not identify the state PodStateUnknown PodState = "" // PodStateReady means the pod is in phase=running with condition=ready PodStateReady PodState = "ready" // PodStateCreated means the pod did not exist before and is ready PodStateCreated PodState = "created" // PodStateNotReady means the pod is in phase pending PodStateNotReady PodState = "notready" // PodStateDeleted means the pod is in phase=succeeded or disappeared or phase=” PodStateDeleted PodState = "deleted" )
type PodStateTrigger ¶
type PodStateTrigger struct { When PodState `json:"when"` Selector *Selector `json:"selector,omitempty"` }
PodStateTrigger specifies how to trigger depending on a Job
func (*PodStateTrigger) DeepCopy ¶
func (in *PodStateTrigger) DeepCopy() *PodStateTrigger
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodStateTrigger.
func (*PodStateTrigger) DeepCopyInto ¶
func (in *PodStateTrigger) DeepCopyInto(out *PodStateTrigger)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Requirement ¶
type Requirement struct { Key string `json:"key"` Operator selection.Operator `json:"operator"` Values []string `json:"values"` }
Requirement describes a label requirement
func (*Requirement) DeepCopy ¶
func (in *Requirement) DeepCopy() *Requirement
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Requirement.
func (*Requirement) DeepCopyInto ¶
func (in *Requirement) DeepCopyInto(out *Requirement)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Selector ¶
type Selector struct { MatchLabels *labels.Set `json:"matchLabels,omitempty"` MatchExpressions []*Requirement `json:"matchExpressions,omitempty"` }
Selector filter objects
func (*Selector) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Selector.
type Strategy ¶
type Strategy string
Strategy describes the trigger strategy
const ( // TriggerManual is the default for errand jobs, change to TriggerNow to run them TriggerManual Strategy = "manual" // TriggerNow instructs the controller to run the job now, // resets to TriggerManual after starting the job TriggerNow Strategy = "now" // TriggerOnce jobs run only once, when created, then switches to TriggerDone TriggerOnce Strategy = "once" // TriggerDone jobs are no longer triggered. It's the final state for TriggerOnce strategies TriggerDone Strategy = "done" )
type Trigger ¶
type Trigger struct { Strategy Strategy `json:"strategy"` PodState *PodStateTrigger `json:"podstate,omitempty"` }
Trigger decides how to trigger the ExtendedJob
func (*Trigger) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Trigger.