Documentation ¶
Overview ¶
+groupName=engine.kube.ci
Index ¶
- Constants
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func Resource(resource string) schema.GroupResource
- type ContainerStatus
- type ExecutionOrder
- type ObjectReference
- type Step
- type StepEntry
- type Task
- type Template
- type Trigger
- type TriggeredFor
- type Workflow
- func (c Workflow) CustomResourceDefinition() *apiextensions.CustomResourceDefinition
- func (in *Workflow) DeepCopy() *Workflow
- func (in *Workflow) DeepCopyInto(out *Workflow)
- func (in *Workflow) DeepCopyObject() runtime.Object
- func (r Workflow) IsValid() error
- func (wf Workflow) Key() string
- func (wf *Workflow) ObjectReference() *core.ObjectReference
- func (wf Workflow) Reference() metav1.OwnerReference
- func (r *Workflow) SetDefaults() (*Workflow, error)
- type WorkflowList
- type WorkflowSpec
- type WorkflowTemplate
- type WorkflowTemplateList
- type WorkflowTemplateSpec
- type Workplan
- func (c Workplan) CustomResourceDefinition() *apiextensions.CustomResourceDefinition
- func (in *Workplan) DeepCopy() *Workplan
- func (in *Workplan) DeepCopyInto(out *Workplan)
- func (in *Workplan) DeepCopyObject() runtime.Object
- func (wp *Workplan) ObjectReference() *core.ObjectReference
- func (wp Workplan) Reference() metav1.OwnerReference
- type WorkplanList
- type WorkplanPhase
- type WorkplanSpec
- type WorkplanStatus
Constants ¶
const ( ResourceKindWorkflow = "Workflow" ResourceWorkflows = "workflows" )
const ( ResourceKindWorkflowTemplate = "WorkflowTemplate" ResourceWorkflowTemplates = "workflowtemplates" )
const ( ResourceKindWorkplan = "Workplan" ResourceWorkplans = "workplans" )
Variables ¶
var ( // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme )
var (
EnableStatusSubresource bool
)
var SchemeGroupVersion = schema.GroupVersion{Group: engine.GroupName, Version: "v1alpha1"}
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type ContainerStatus ¶
type ContainerStatus string
const ( ContainerRunning ContainerStatus = "Running" ContainerWaiting ContainerStatus = "Waiting" ContainerTerminated ContainerStatus = "Terminated" ContainerUninitialized ContainerStatus = "Uninitialized" // pod not exists )
type ExecutionOrder ¶
type ExecutionOrder string
const ( ExecutionOrderSerial ExecutionOrder = "Serial" ExecutionOrderParallel ExecutionOrder = "Parallel" ExecutionOrderDAG ExecutionOrder = "DAG" )
type ObjectReference ¶
type ObjectReference struct { Kind string `json:"kind,omitempty"` APIVersion string `json:"apiVersion,omitempty"` Namespace string `json:"namespace,omitempty"` Name string `json:"name,omitempty"` }
func (*ObjectReference) DeepCopy ¶
func (in *ObjectReference) DeepCopy() *ObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference.
func (*ObjectReference) DeepCopyInto ¶
func (in *ObjectReference) DeepCopyInto(out *ObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Step ¶
type Step struct { Name string `json:"name,omitempty"` Image string `json:"image,omitempty"` Commands []string `json:"commands,omitempty"` Args []string `json:"args,omitempty"` Requires []string `json:"requires,omitempty"` VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"` // container security context SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"` }
func (*Step) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Step.
func (*Step) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StepEntry ¶
type StepEntry struct { Name string `json:"name"` // container name PodName string `json:"podName"` Status ContainerStatus `json:"status"` // simplified container status ContainerState corev1.ContainerState `json:"containerState"` }
status of a step containing enough info to collect logs
func (*StepEntry) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepEntry.
func (*StepEntry) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Task ¶
type Task struct { SerialSteps []Step // analogous to init-containers ParallelSteps []Step // analogous to sidecar-containers }
func (*Task) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task.
func (*Task) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Template ¶
type Template struct { Name string `json:"name,omitempty"` Arguments map[string]string `json:"arguments,omitempty"` }
func (*Template) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Template.
func (*Template) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Trigger ¶
type Trigger struct { Name string `json:"name,omitempty"` APIVersion string `json:"apiVersion,omitempty"` Kind string `json:"kind,omitempty"` Resource string `json:"resource,omitempty"` // TODO: trigger for resources with different namespaces? or remove it? Namespace string `json:"namespace,omitempty"` Selector metav1.LabelSelector `json:"selector,omitempty"` OnDelete bool `json:"onDelete,omitempty"` OnCreateOrUpdate bool `json:"onCreateOrUpdate,omitempty"` // environment-variable to json-path map, set them in containers EnvFromPath map[string]string `json:"envFromPath,omitempty"` }
func (*Trigger) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Trigger.
func (*Trigger) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Trigger) ResourceKey ¶
type TriggeredFor ¶
type TriggeredFor struct { ObjectReference ObjectReference `json:"objectReference,omitempty"` ResourceGeneration *htypes.IntHash `json:"resourceGeneration,omitempty"` }
func (*TriggeredFor) DeepCopy ¶
func (in *TriggeredFor) DeepCopy() *TriggeredFor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TriggeredFor.
func (*TriggeredFor) DeepCopyInto ¶
func (in *TriggeredFor) DeepCopyInto(out *TriggeredFor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Workflow ¶
type Workflow struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec WorkflowSpec `json:"spec,omitempty"` }
func (Workflow) CustomResourceDefinition ¶
func (c Workflow) CustomResourceDefinition() *apiextensions.CustomResourceDefinition
func (*Workflow) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workflow.
func (*Workflow) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Workflow) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Workflow) ObjectReference ¶
func (wf *Workflow) ObjectReference() *core.ObjectReference
func (Workflow) Reference ¶
func (wf Workflow) Reference() metav1.OwnerReference
func (*Workflow) SetDefaults ¶
type WorkflowList ¶
type WorkflowList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Workflow `json:"items"` }
func (*WorkflowList) DeepCopy ¶
func (in *WorkflowList) DeepCopy() *WorkflowList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowList.
func (*WorkflowList) DeepCopyInto ¶
func (in *WorkflowList) DeepCopyInto(out *WorkflowList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkflowList) DeepCopyObject ¶
func (in *WorkflowList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkflowSpec ¶
type WorkflowSpec struct { AllowManualTrigger bool `json:"allowManualTrigger,omitempty"` Triggers []Trigger `json:"triggers,omitempty"` Steps []Step `json:"steps,omitempty"` Template *Template `json:"template,omitempty"` ExecutionOrder ExecutionOrder `json:"executionOrder,omitempty"` // set explicit environment variables EnvVar []corev1.EnvVar `json:"envVar,omitempty"` // set container environment variables from configmaps and secrets EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"` // ServiceAccount with triggering-resource/configmaps/secrets watch/read permissions. // Also used to run all associated pods ServiceAccount string `json:"serviceAccount,omitempty"` Volumes []corev1.Volume `json:"volumes,omitempty"` // pod security context SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"` // NodeSelector is a selector which must be true for the pod to fit on a node. // Selector which must match a node's labels for the pod to be scheduled on that node. NodeSelector map[string]string `json:"nodeSelector,omitempty"` // If specified, the pod will be dispatched by specified scheduler. // If not specified, the pod will be dispatched by default scheduler. SchedulerName string `json:"schedulerName,omitempty"` // If specified, the pod's tolerations. Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // Compute Resources required by the sidecar container. Resources corev1.ResourceRequirements `json:"resources,omitempty"` }
func (*WorkflowSpec) DeepCopy ¶
func (in *WorkflowSpec) DeepCopy() *WorkflowSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowSpec.
func (*WorkflowSpec) DeepCopyInto ¶
func (in *WorkflowSpec) DeepCopyInto(out *WorkflowSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowTemplate ¶
type WorkflowTemplate struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec WorkflowTemplateSpec `json:"spec,omitempty"` }
func (WorkflowTemplate) CustomResourceDefinition ¶
func (c WorkflowTemplate) CustomResourceDefinition() *apiextensions.CustomResourceDefinition
func (*WorkflowTemplate) DeepCopy ¶
func (in *WorkflowTemplate) DeepCopy() *WorkflowTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowTemplate.
func (*WorkflowTemplate) DeepCopyInto ¶
func (in *WorkflowTemplate) DeepCopyInto(out *WorkflowTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkflowTemplate) DeepCopyObject ¶
func (in *WorkflowTemplate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkflowTemplateList ¶
type WorkflowTemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []WorkflowTemplate `json:"items"` }
func (*WorkflowTemplateList) DeepCopy ¶
func (in *WorkflowTemplateList) DeepCopy() *WorkflowTemplateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowTemplateList.
func (*WorkflowTemplateList) DeepCopyInto ¶
func (in *WorkflowTemplateList) DeepCopyInto(out *WorkflowTemplateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkflowTemplateList) DeepCopyObject ¶
func (in *WorkflowTemplateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkflowTemplateSpec ¶
type WorkflowTemplateSpec struct {
Steps []Step `json:"steps,omitempty"`
}
func (*WorkflowTemplateSpec) DeepCopy ¶
func (in *WorkflowTemplateSpec) DeepCopy() *WorkflowTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowTemplateSpec.
func (*WorkflowTemplateSpec) DeepCopyInto ¶
func (in *WorkflowTemplateSpec) DeepCopyInto(out *WorkflowTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Workplan ¶
type Workplan struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec WorkplanSpec `json:"spec,omitempty"` Status WorkplanStatus `json:"status,omitempty"` }
func (Workplan) CustomResourceDefinition ¶
func (c Workplan) CustomResourceDefinition() *apiextensions.CustomResourceDefinition
func (*Workplan) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workplan.
func (*Workplan) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Workplan) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Workplan) ObjectReference ¶
func (wp *Workplan) ObjectReference() *core.ObjectReference
func (Workplan) Reference ¶
func (wp Workplan) Reference() metav1.OwnerReference
type WorkplanList ¶
type WorkplanList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Workplan `json:"items"` }
func (*WorkplanList) DeepCopy ¶
func (in *WorkplanList) DeepCopy() *WorkplanList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkplanList.
func (*WorkplanList) DeepCopyInto ¶
func (in *WorkplanList) DeepCopyInto(out *WorkplanList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkplanList) DeepCopyObject ¶
func (in *WorkplanList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkplanPhase ¶
type WorkplanPhase string
const ( WorkplanPending WorkplanPhase = "Pending" WorkplanRunning WorkplanPhase = "Running" WorkplanSucceeded WorkplanPhase = "Succeeded" WorkplanFailed WorkplanPhase = "Failed" WorkplanUninitialized WorkplanPhase = "Uninitialized" )
type WorkplanSpec ¶
type WorkplanSpec struct { Workflow string `json:"workflow,omitempty"` Tasks []Task `json:"tasks,omitempty"` TriggeredFor TriggeredFor `json:"triggeredFor"` // set explicit environment variables EnvVar []corev1.EnvVar `json:"envVar,omitempty"` // set container environment variables from configmaps and secrets EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"` Volumes []corev1.Volume `json:"volumes,omitempty"` // pod security context SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"` // ServiceAccount with triggering-resource/configmaps/secrets watch/read permissions. // Also used to run all associated pods ServiceAccount string `json:"serviceAccount,omitempty"` NodeSelector map[string]string `json:"nodeSelector,omitempty"` SchedulerName string `json:"schedulerName,omitempty"` Tolerations []corev1.Toleration `json:"tolerations,omitempty"` Resources corev1.ResourceRequirements `json:"resources,omitempty"` ManuallyTriggered bool `json:"manuallyTriggered,omitempty"` }
func (*WorkplanSpec) DeepCopy ¶
func (in *WorkplanSpec) DeepCopy() *WorkplanSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkplanSpec.
func (*WorkplanSpec) DeepCopyInto ¶
func (in *WorkplanSpec) DeepCopyInto(out *WorkplanSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkplanStatus ¶
type WorkplanStatus struct { Phase WorkplanPhase `json:"phase"` Reason string `json:"reason"` TaskIndex int `json:"taskIndex"` NodeName string `json:"nodeName"` StepTree [][]StepEntry `json:"stepTree"` }
func (*WorkplanStatus) DeepCopy ¶
func (in *WorkplanStatus) DeepCopy() *WorkplanStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkplanStatus.
func (*WorkplanStatus) DeepCopyInto ¶
func (in *WorkplanStatus) DeepCopyInto(out *WorkplanStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.