v1alpha1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const ManagedByLabelKey = "app.kubernetes.io/managed-by"

Variables

View Source
var (

	// AddToScheme adds Build types to the scheme.
	AddToScheme = schemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: approvaltask.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

Types

type ApprovalTask

type ApprovalTask struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata"`

	// Spec holds the desired state of the TaskGroup from the client
	// +optional
	Spec   ApprovalTaskSpec   `json:"spec"`
	Status ApprovalTaskStatus `json:"status"`
}

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object ApprovalTask is a "wait for manual approval" Task. +k8s:openapi-gen=true

func (ApprovalTask) ApprovalTaskHasTimedOut

func (at ApprovalTask) ApprovalTaskHasTimedOut(ctx context.Context, c clock.PassiveClock, timeout time.Duration) bool

func (*ApprovalTask) DeepCopy

func (in *ApprovalTask) DeepCopy() *ApprovalTask

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

func (*ApprovalTask) DeepCopyInto

func (in *ApprovalTask) DeepCopyInto(out *ApprovalTask)

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

func (*ApprovalTask) DeepCopyObject

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

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

func (ApprovalTask) HasStarted

func (at ApprovalTask) HasStarted() bool

func (*ApprovalTask) Validate

func (tg *ApprovalTask) Validate(ctx context.Context) *apis.FieldError

Validate ApprovalTask

type ApprovalTaskList

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

ApprovalTaskList contains a list of ApprovalTasks

func (*ApprovalTaskList) DeepCopy

func (in *ApprovalTaskList) DeepCopy() *ApprovalTaskList

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

func (*ApprovalTaskList) DeepCopyInto

func (in *ApprovalTaskList) DeepCopyInto(out *ApprovalTaskList)

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

func (*ApprovalTaskList) DeepCopyObject

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

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

type ApprovalTaskRunReason

type ApprovalTaskRunReason string

ApprovalTaskRunReason represents a reason for the Run "Succeeded" condition

const (
	// ApprovalTaskRunReasonStarted is the reason set when the Run has just started
	ApprovalTaskRunReasonStarted ApprovalTaskRunReason = "Started"

	// ApprovalTaskRunReasonRunning indicates that the Run is in progress
	ApprovalTaskRunReasonRunning ApprovalTaskRunReason = "Running"

	// ApprovalTaskRunReasonFailed indicates that one of the TaskRuns created from the Run failed
	ApprovalTaskRunReasonFailed ApprovalTaskRunReason = "Failed"

	// ApprovalTaskRunReasonSucceeded indicates that all of the TaskRuns created from the Run completed successfully
	ApprovalTaskRunReasonSucceeded ApprovalTaskRunReason = "Succeeded"

	// ApprovalTaskRunReasonCouldntCancel indicates that a Run was cancelled but attempting to update
	// the running TaskRun as cancelled failed.
	ApprovalTaskRunReasonCouldntCancel ApprovalTaskRunReason = "ApprovalTaskRunCouldntCancel"

	// ApprovalTaskRunReasonCouldntGetApprovalTask indicates that the associated ApprovalTask couldn't be retrieved
	ApprovalTaskRunReasonCouldntGetApprovalTask ApprovalTaskRunReason = "CouldntGetApprovalTask"

	// ApprovalTaskRunReasonFailedValidation indicates that the ApprovalTask failed runtime validation
	ApprovalTaskRunReasonFailedValidation ApprovalTaskRunReason = "ApprovalTaskValidationFailed"

	// ApprovalTaskRunReasonInternalError indicates that the ApprovalTask failed due to an internal error in the reconciler
	ApprovalTaskRunReasonInternalError ApprovalTaskRunReason = "ApprovalTaskInternalError"
)

func (ApprovalTaskRunReason) String

func (t ApprovalTaskRunReason) String() string

type ApprovalTaskRunStatus

type ApprovalTaskRunStatus struct {
	// ApprovalTaskSpec contains the exact spec used to instantiate the Run
	// FIXME(openshift-pipelines) can probably remove
	ApprovalTaskSpec *ApprovalTaskSpec `json:"taskLoopSpec,omitempty"`
}

ApprovalTaskRunStatus contains the status stored in the ExtraFields of a Run that references a ApprovalTask.

func (*ApprovalTaskRunStatus) DeepCopy

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

func (*ApprovalTaskRunStatus) DeepCopyInto

func (in *ApprovalTaskRunStatus) DeepCopyInto(out *ApprovalTaskRunStatus)

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

type ApprovalTaskSpec

type ApprovalTaskSpec struct {
	Approvers                 []ApproverDetails `json:"approvers"`
	NumberOfApprovalsRequired int               `json:"numberOfApprovalsRequired"`
	Description               string            `json:"description,omitempty"`
}

func (*ApprovalTaskSpec) DeepCopy

func (in *ApprovalTaskSpec) DeepCopy() *ApprovalTaskSpec

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

func (*ApprovalTaskSpec) DeepCopyInto

func (in *ApprovalTaskSpec) DeepCopyInto(out *ApprovalTaskSpec)

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

func (*ApprovalTaskSpec) Validate

func (tgs *ApprovalTaskSpec) Validate(ctx context.Context) (errs *apis.FieldError)

Validate ApprovalTaskSpec

type ApprovalTaskStatus

type ApprovalTaskStatus struct {
	duckv1.Status     `json:",inline"`
	State             string          `json:"state"`
	Approvers         []string        `json:"approvers,omitempty"`
	ApproversResponse []ApproverState `json:"approversResponse,omitempty"`
	// StartTime is the time the build is actually started.
	StartTime *metav1.Time `json:"startTime,omitempty"`
}

func (*ApprovalTaskStatus) DeepCopy

func (in *ApprovalTaskStatus) DeepCopy() *ApprovalTaskStatus

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

func (*ApprovalTaskStatus) DeepCopyInto

func (in *ApprovalTaskStatus) DeepCopyInto(out *ApprovalTaskStatus)

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

type ApproverDetails

type ApproverDetails struct {
	Name    string `json:"name"`
	Input   string `json:"input"`
	Message string `json:"message,omitempty"`
}

func (*ApproverDetails) DeepCopy

func (in *ApproverDetails) DeepCopy() *ApproverDetails

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

func (*ApproverDetails) DeepCopyInto

func (in *ApproverDetails) DeepCopyInto(out *ApproverDetails)

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

type ApproverState

type ApproverState struct {
	Name     string `json:"name"`
	Response string `json:"response"`
	Message  string `json:"message,omitempty"`
}

func (*ApproverState) DeepCopy

func (in *ApproverState) DeepCopy() *ApproverState

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

func (*ApproverState) DeepCopyInto

func (in *ApproverState) DeepCopyInto(out *ApproverState)

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