v1alpha1

package
v0.0.0-...-8a8da8d Latest Latest
Warning

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

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

Documentation

Overview

+groupName=engine.kube.ci

Index

Constants

View Source
const (
	ResourceKindWorkflow = "Workflow"
	ResourceWorkflows    = "workflows"
)
View Source
const (
	ResourceKindWorkflowTemplate = "WorkflowTemplate"
	ResourceWorkflowTemplates    = "workflowtemplates"
)
View Source
const (
	ResourceKindWorkplan = "Workplan"
	ResourceWorkplans    = "workplans"
)

Variables

View Source
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
)
View Source
var (
	EnableStatusSubresource bool
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: engine.GroupName, Version: "v1alpha1"}

Functions

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

func (in *Step) DeepCopy() *Step

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Step.

func (*Step) DeepCopyInto

func (in *Step) DeepCopyInto(out *Step)

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

func (in *StepEntry) DeepCopy() *StepEntry

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepEntry.

func (*StepEntry) DeepCopyInto

func (in *StepEntry) DeepCopyInto(out *StepEntry)

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

func (in *Task) DeepCopy() *Task

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task.

func (*Task) DeepCopyInto

func (in *Task) DeepCopyInto(out *Task)

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

func (in *Template) DeepCopy() *Template

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Template.

func (*Template) DeepCopyInto

func (in *Template) DeepCopyInto(out *Template)

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

func (in *Trigger) DeepCopy() *Trigger

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Trigger.

func (*Trigger) DeepCopyInto

func (in *Trigger) DeepCopyInto(out *Trigger)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Trigger) ResourceKey

func (t Trigger) ResourceKey() string

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

func (in *Workflow) DeepCopy() *Workflow

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workflow.

func (*Workflow) DeepCopyInto

func (in *Workflow) DeepCopyInto(out *Workflow)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Workflow) DeepCopyObject

func (in *Workflow) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (Workflow) IsValid

func (r Workflow) IsValid() error

func (Workflow) Key

func (wf Workflow) Key() string

func (*Workflow) ObjectReference

func (wf *Workflow) ObjectReference() *core.ObjectReference

func (Workflow) Reference

func (wf Workflow) Reference() metav1.OwnerReference

func (*Workflow) SetDefaults

func (r *Workflow) SetDefaults() (*Workflow, error)

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

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

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

func (in *Workplan) DeepCopy() *Workplan

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workplan.

func (*Workplan) DeepCopyInto

func (in *Workplan) DeepCopyInto(out *Workplan)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Workplan) DeepCopyObject

func (in *Workplan) DeepCopyObject() runtime.Object

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.

Jump to

Keyboard shortcuts

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