v1alpha1

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

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the workflows v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=workflows.tekton.dev

Index

Constants

View Source
const (
	EventTypePush        = EventType("push")
	EventTypePullRequest = EventType("pull_request")
)
View Source
const GroupName = "workflows.tekton.dev"

GroupName is the Kubernetes resource group name for Tekton types.

View Source
const (
	WorkflowLabelKey = "workflows.tekton.dev/workflow"
)

Variables

View Source
var (

	// AddToScheme adds Build types to the scheme.
	AddToScheme = schemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

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

func ValidateTrigger

func ValidateTrigger(ctx context.Context, t Trigger) (errs *apis.FieldError)

Types

type Custom

type Custom struct {
	// +optional
	CEL string `json:"cel,omitempty"`
}

func (*Custom) DeepCopy

func (in *Custom) DeepCopy() *Custom

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

func (*Custom) DeepCopyInto

func (in *Custom) DeepCopyInto(out *Custom)

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

type Event

type Event struct {
	// Source defines the source of a trigger event
	Source EventSource `json:"source"`

	// Type is a string that defines the type of an event (e.g. a pull_request or a push)
	// At the moment this assumes one of the GitHub event types
	Type EventType `json:"type"`

	// Secret is the Webhook secret used for this Trigger
	// This field is temporary until we implement a better way to handle secrets for webhook validation
	Secret triggersv1beta1.SecretRef `json:"secret"`
}

func (*Event) DeepCopy

func (in *Event) DeepCopy() *Event

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

func (*Event) DeepCopyInto

func (in *Event) DeepCopyInto(out *Event)

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

type EventSource

type EventSource struct {
}

EventSource defines a Trigger EventSource

func (*EventSource) DeepCopy

func (in *EventSource) DeepCopy() *EventSource

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

func (*EventSource) DeepCopyInto

func (in *EventSource) DeepCopyInto(out *EventSource)

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

type EventType

type EventType string

type Filters

type Filters struct {
	// GitRef filters events to those affecting the specified git branch or tag
	// Valid only for "pull_request" or "push" event types
	// For "pull_request" events, this is the base branch
	// +optional
	GitRef *GitRef `json:"gitRef,omitempty"`
	// +optional
	Custom []Custom `json:"custom,omitempty"`
}

func (*Filters) DeepCopy

func (in *Filters) DeepCopy() *Filters

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

func (*Filters) DeepCopyInto

func (in *Filters) DeepCopyInto(out *Filters)

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

type GitRef

type GitRef struct {
	// Regex matches a git branch or tag
	// +optional
	Regex string `json:"regex,omitempty"`
}

func (*GitRef) DeepCopy

func (in *GitRef) DeepCopy() *GitRef

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

func (*GitRef) DeepCopyInto

func (in *GitRef) DeepCopyInto(out *GitRef)

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

type Secret

type Secret struct {
	Name string `json:"name"`
	Ref  string `json:"ref"`
}

func (*Secret) DeepCopy

func (in *Secret) DeepCopy() *Secret

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

func (*Secret) DeepCopyInto

func (in *Secret) DeepCopyInto(out *Secret)

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

type Trigger

type Trigger struct {
	// Event describes the incoming event for this Trigger
	Event Event `json:"event"`

	// Bindings are the TriggerBindings used to extract information from this Trigger
	// +listType=atomic
	Bindings []*triggersv1beta1.TriggerSpecBinding `json:"bindings"`

	// Name is the name of this Trigger
	// +optional
	Name string `json:"name,omitempty"`

	// +optional
	Filters *Filters `json:"filters,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.

type Workflow

type Workflow struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Spec holds the desired state of the Workflow from the client
	// +optional
	Spec WorkflowSpec `json:"spec,omitempty"`

	// +optional
	Status WorkflowStatus `json:"status,omitempty"`
}

Workflow represents a Workflow Custom Resource

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) GetGroupVersionKind

func (*Workflow) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind implements kmeta.OwnerRefable.

func (*Workflow) SetDefaults

func (w *Workflow) SetDefaults(ctx context.Context)

func (*Workflow) SupportedVerbs

func (w *Workflow) SupportedVerbs() []admissionregistrationv1.OperationType

SupportedVerbs returns the operations that validation should be called for

func (*Workflow) Validate

func (w *Workflow) Validate(ctx context.Context) *apis.FieldError

Validate performs validation of the metadata and spec of this ClusterTask.

type WorkflowList

type WorkflowList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Workflow `json:"items"`
}

WorkflowList contains a list of Workflows

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 {

	// Triggers is a list of triggers that can trigger this workflow
	Triggers []Trigger `json:"triggers,omitempty"`

	// Params define the default values for params in the Pipeline that can be
	// overridden in a WorkflowRun or (in the future) from an incoming event.
	Params []v1beta1.ParamSpec `json:"params,omitempty"`

	// PipelineSpec is an inline pipeline spec.
	// Cannot specify both PipelineSpec and PipelineRef.
	PipelineSpec *v1beta1.PipelineSpec `json:"pipelineSpec,omitempty"`

	// PipelineRef is a reference to a Pipeline
	PipelineRef *v1beta1.PipelineRef `json:"pipelineRef,omitempty"`

	// ServiceAccountName is the K8s service account that pipelineruns
	// generated from this workflow run as
	// +optional
	ServiceAccountName *string `json:"serviceAccountName,omitempty"`

	// Workspaces is a list of workspaces that the Pipeline in this workflow needs
	// TODO: Auto-setup a Workspace across multiple
	Workspaces []WorkflowWorkspaceBinding `json:"workspaces"`

	// TODO: Timeout ?
	Timeout *v1beta1.TimeoutFields `json:"timeout,omitempty"`
}

WorkflowSpec describes the desired state of the Workflow

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.

func (*WorkflowSpec) Validate

func (s *WorkflowSpec) Validate(ctx context.Context) (errs *apis.FieldError)

type WorkflowStatus

type WorkflowStatus struct {
}

WorkflowStatus describes the observed state of the Workflow

func (*WorkflowStatus) DeepCopy

func (in *WorkflowStatus) DeepCopy() *WorkflowStatus

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

func (*WorkflowStatus) DeepCopyInto

func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus)

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

type WorkflowWorkspaceBinding

type WorkflowWorkspaceBinding struct {
	Name                     string `json:"name"`
	v1beta1.WorkspaceBinding `json:",inline"`
}

WorkflowWorkspaceBinding maps a Pipeline's declared Workspaces to a Volume. Unlike a regular WorkspaceBinding, a WorkflowWorkspaceBinding will add additional magic to auto-propagate/generate PVCs TODO: Fluent Syntax for Binding

func (*WorkflowWorkspaceBinding) DeepCopy

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

func (*WorkflowWorkspaceBinding) DeepCopyInto

func (in *WorkflowWorkspaceBinding) DeepCopyInto(out *WorkflowWorkspaceBinding)

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