Documentation ¶
Overview ¶
Package v1beta1 contains API Schema definitions for the kudo v1beta1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/kudobuilder/kudo/pkg/apis/kudo +k8s:defaulter-gen=TypeMeta +groupName=kudo.dev
Package v1beta1 contains API Schema definitions for the kudo v1beta1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/kudobuilder/kudo/pkg/apis/kudo +k8s:defaulter-gen=TypeMeta +groupName=kudo.dev
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type AggregatedStatus
- type Command
- type DummyTaskSpec
- type ExecutionStatus
- type Instance
- func (in *Instance) DeepCopy() *Instance
- func (in *Instance) DeepCopyInto(out *Instance)
- func (in *Instance) DeepCopyObject() runtime.Object
- func (i *Instance) EnsurePlanStatusInitialized(ov *OperatorVersion)
- func (i *Instance) GetLastExecutedPlanStatus() *PlanStatus
- func (i *Instance) GetPlanInProgress() *PlanStatus
- func (i *Instance) GetPlanToBeExecuted(ov *OperatorVersion) (*string, error)
- func (i *Instance) IsDeleting() bool
- func (i *Instance) NoPlanEverExecuted() bool
- func (i *Instance) OperatorVersionNamespace() string
- func (i *Instance) PlanStatus(plan string) *PlanStatus
- func (i *Instance) SaveSnapshot() error
- func (i *Instance) StartPlanExecution(planName string, ov *OperatorVersion) error
- func (i *Instance) TryAddFinalizer() bool
- func (i *Instance) TryRemoveFinalizer() bool
- func (i *Instance) UpdateInstanceStatus(planStatus *PlanStatus)
- func (i *Instance) ValidateCreate(req admission.Request) error
- func (i *Instance) ValidateDelete(req admission.Request) error
- func (i *Instance) ValidateUpdate(old runtime.Object, req admission.Request) error
- type InstanceError
- type InstanceList
- type InstanceSpec
- type InstanceStatus
- type Maintainer
- type ObjectReference
- type Operator
- type OperatorDependency
- type OperatorList
- type OperatorSpec
- type OperatorStatus
- type OperatorVersion
- type OperatorVersionList
- type OperatorVersionSpec
- type OperatorVersionStatus
- type Ordering
- type Parameter
- type Phase
- type PhaseStatus
- type PipeSpec
- type PipeTaskSpec
- type Plan
- type PlanStatus
- type ResourceTaskSpec
- type Step
- type StepStatus
- type Task
- type TaskSpec
- type TestAssert
- type TestStep
- type TestSuite
Constants ¶
const ( // ExecutionInProgress actively deploying, but not yet healthy. ExecutionInProgress ExecutionStatus = "IN_PROGRESS" // ExecutionPending Not ready to deploy because dependent phases/steps not healthy. ExecutionPending ExecutionStatus = "PENDING" // ExecutionComplete deployed and healthy. ExecutionComplete ExecutionStatus = "COMPLETE" // ErrorStatus there was an error deploying the application. ErrorStatus ExecutionStatus = "ERROR" // ExecutionFatalError there was an error deploying the application. ExecutionFatalError ExecutionStatus = "FATAL_ERROR" // ExecutionNeverRun is used when this plan/phase/step was never run so far ExecutionNeverRun ExecutionStatus = "NEVER_RUN" // DeployPlanName is the name of the deployment plan DeployPlanName = "deploy" // UpgradePlanName is the name of the upgrade plan UpgradePlanName = "upgrade" // UpdatePlanName is the name of the update plan UpdatePlanName = "update" // CleanupPlanName is the name of the cleanup plan CleanupPlanName = "cleanup" )
const DefaultKINDContext = "kind"
DefaultKINDContext defines the default kind context to use.
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "kudo.dev", Version: "v1beta1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme is required by pkg/client/... AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
Types ¶
type AggregatedStatus ¶
type AggregatedStatus struct { Status ExecutionStatus `json:"status,omitempty"` ActivePlanName string `json:"activePlanName,omitempty"` }
AggregatedStatus is overview of an instance status derived from the plan status
func (*AggregatedStatus) DeepCopy ¶
func (in *AggregatedStatus) DeepCopy() *AggregatedStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AggregatedStatus.
func (*AggregatedStatus) DeepCopyInto ¶
func (in *AggregatedStatus) DeepCopyInto(out *AggregatedStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Command ¶
type Command struct { // The command and argument to run as a string. Command string `json:"command"` // If set, the `--namespace` flag will be appended to the command with the namespace to use. Namespaced bool `json:"namespaced"` // If set, failures will be ignored. IgnoreFailure bool `json:"ignoreFailure"` }
Command describes a command to run as a part of a test step or suite.
func (*Command) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Command.
func (*Command) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DummyTaskSpec ¶
type DummyTaskSpec struct { WantErr bool `json:"wantErr"` Fatal bool `json:"fatal"` Done bool `json:"done"` }
DummyTaskSpec can succeed of fail on demand and is very useful for testing operators
func (*DummyTaskSpec) DeepCopy ¶
func (in *DummyTaskSpec) DeepCopy() *DummyTaskSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DummyTaskSpec.
func (*DummyTaskSpec) DeepCopyInto ¶
func (in *DummyTaskSpec) DeepCopyInto(out *DummyTaskSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExecutionStatus ¶
type ExecutionStatus string
ExecutionStatus captures the state of the rollout.
func (ExecutionStatus) IsFinished ¶
func (s ExecutionStatus) IsFinished() bool
IsFinished returns true if the status is complete regardless of errors
func (ExecutionStatus) IsRunning ¶
func (s ExecutionStatus) IsRunning() bool
IsRunning returns true if the plan is currently being executed
func (ExecutionStatus) IsTerminal ¶
func (s ExecutionStatus) IsTerminal() bool
IsTerminal returns true if the status is terminal (either complete, or in a nonrecoverable error)
type Instance ¶
type Instance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec InstanceSpec `json:"spec,omitempty"` Status InstanceStatus `json:"status,omitempty"` }
Instance is the Schema for the instances API. +k8s:openapi-gen=true
func (*Instance) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instance.
func (*Instance) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Instance) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Instance) EnsurePlanStatusInitialized ¶
func (i *Instance) EnsurePlanStatusInitialized(ov *OperatorVersion)
EnsurePlanStatusInitialized initializes plan status for all plans this instance supports it does not trigger run of any plan it either initializes everything for a fresh instance without any status or tries to adjust status after OV was updated
func (*Instance) GetLastExecutedPlanStatus ¶
func (i *Instance) GetLastExecutedPlanStatus() *PlanStatus
GetLastExecutedPlanStatus returns status of plan that is currently running, if there is one running if no plan is running it looks for last executed plan based on timestamps
func (*Instance) GetPlanInProgress ¶
func (i *Instance) GetPlanInProgress() *PlanStatus
GetPlanInProgress returns plan status of currently active plan or nil if no plan is running
func (*Instance) GetPlanToBeExecuted ¶
func (i *Instance) GetPlanToBeExecuted(ov *OperatorVersion) (*string, error)
GetPlanToBeExecuted returns name of the plan that should be executed
func (*Instance) IsDeleting ¶ added in v0.9.0
IsDeleting returns true is the instance is being deleted.
func (*Instance) NoPlanEverExecuted ¶
NoPlanEverExecuted returns true is this is new instance for which we never executed any plan
func (*Instance) OperatorVersionNamespace ¶
OperatorVersionNamespace returns the namespace of the OperatorVersion that the Instance references.
func (*Instance) PlanStatus ¶ added in v0.9.0
func (i *Instance) PlanStatus(plan string) *PlanStatus
func (*Instance) SaveSnapshot ¶
SaveSnapshot stores the current spec of Instance into the snapshot annotation this information is used when executing update/upgrade plans, this overrides any snapshot that existed before
func (*Instance) StartPlanExecution ¶
func (i *Instance) StartPlanExecution(planName string, ov *OperatorVersion) error
StartPlanExecution mark plan as to be executed this modifies the instance.Status as well as instance.Metadata.Annotation (to save snapshot if needed)
func (*Instance) TryAddFinalizer ¶ added in v0.9.0
TryAddFinalizer adds the cleanup finalizer to an instance if the finalizer hasn't been added yet, the instance has a cleanup plan and the cleanup plan didn't run yet. Returns true if the cleanup finalizer has been added.
func (*Instance) TryRemoveFinalizer ¶ added in v0.9.0
TryRemoveFinalizer removes the cleanup finalizer of an instance if it has been added, the instance has a cleanup plan and the cleanup plan completed. Returns true if the cleanup finalizer has been removed.
func (*Instance) UpdateInstanceStatus ¶
func (i *Instance) UpdateInstanceStatus(planStatus *PlanStatus)
UpdateInstanceStatus updates `Status.PlanStatus` and `Status.AggregatedStatus` property based on the given plan
func (*Instance) ValidateCreate ¶ added in v0.9.0
ValidateCreate implements kudo.Validator (slightly tweaked interface originally from controller-runtime) we do not enforce any rules upon creation right now
func (*Instance) ValidateDelete ¶ added in v0.9.0
ValidateDelete hook called when DELETE operation is triggered and our admission webhook is triggered we don't enforce any validation on DELETE right now ValidateDelete implements kudo.Validator (slightly tweaked interface originally from controller-runtime)
func (*Instance) ValidateUpdate ¶ added in v0.9.0
ValidateUpdate hook called when UPDATE operation is triggered and our admission webhook is triggered ValidateUpdate implements kudo.Validator (slightly tweaked interface originally from controller-runtime)
type InstanceError ¶
type InstanceError struct { EventName *string // nil if no warn event should be created // contains filtered or unexported fields }
InstanceError indicates error on that can also emit a kubernetes warn event +k8s:deepcopy-gen=false
func (*InstanceError) Error ¶
func (e *InstanceError) Error() string
type InstanceList ¶
type InstanceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Instance `json:"items"` }
InstanceList contains a list of Instance.
func (*InstanceList) DeepCopy ¶
func (in *InstanceList) DeepCopy() *InstanceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceList.
func (*InstanceList) DeepCopyInto ¶
func (in *InstanceList) DeepCopyInto(out *InstanceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InstanceList) DeepCopyObject ¶
func (in *InstanceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InstanceSpec ¶
type InstanceSpec struct { // OperatorVersion specifies a reference to a specific Operator object. OperatorVersion corev1.ObjectReference `json:"operatorVersion,omitempty"` Parameters map[string]string `json:"parameters,omitempty"` }
InstanceSpec defines the desired state of Instance.
func (*InstanceSpec) DeepCopy ¶
func (in *InstanceSpec) DeepCopy() *InstanceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceSpec.
func (*InstanceSpec) DeepCopyInto ¶
func (in *InstanceSpec) DeepCopyInto(out *InstanceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InstanceStatus ¶
type InstanceStatus struct { // slice would be enough here but we cannot use slice because order of sequence in yaml is considered significant while here it's not PlanStatus map[string]PlanStatus `json:"planStatus,omitempty"` AggregatedStatus AggregatedStatus `json:"aggregatedStatus,omitempty"` }
InstanceStatus defines the observed state of Instance
func (*InstanceStatus) DeepCopy ¶
func (in *InstanceStatus) DeepCopy() *InstanceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceStatus.
func (*InstanceStatus) DeepCopyInto ¶
func (in *InstanceStatus) DeepCopyInto(out *InstanceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Maintainer ¶
type Maintainer struct { // Name is a user name or organization name. Name string `json:"name,omitempty"` // Email is an optional email address to contact the named maintainer. Email string `json:"email,omitempty"` }
Maintainer describes an Operator maintainer.
func (*Maintainer) DeepCopy ¶
func (in *Maintainer) DeepCopy() *Maintainer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Maintainer.
func (*Maintainer) DeepCopyInto ¶
func (in *Maintainer) DeepCopyInto(out *Maintainer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectReference ¶
type ObjectReference struct { corev1.ObjectReference `json:",inline"` // Labels to match on. Labels map[string]string }
ObjectReference is a Kubernetes object reference with added labels to allow referencing objects by label.
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 Operator ¶
type Operator struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec OperatorSpec `json:"spec,omitempty"` Status OperatorStatus `json:"status,omitempty"` }
Operator is the Schema for the operator API +k8s:openapi-gen=true
func (*Operator) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Operator.
func (*Operator) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Operator) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OperatorDependency ¶
type OperatorDependency struct { // Name specifies the name of the dependency. Referenced via defaults.config. ReferenceName string `json:"referenceName"` corev1.ObjectReference // Version captures the requirements for what versions of the above object // are allowed. // // Example: ^3.1.4 Version string `json:"version"` }
OperatorDependency references a defined operator.
func (*OperatorDependency) DeepCopy ¶
func (in *OperatorDependency) DeepCopy() *OperatorDependency
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorDependency.
func (*OperatorDependency) DeepCopyInto ¶
func (in *OperatorDependency) DeepCopyInto(out *OperatorDependency)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OperatorList ¶
type OperatorList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Operator `json:"items"` }
OperatorList contains a list of Operator
func (*OperatorList) DeepCopy ¶
func (in *OperatorList) DeepCopy() *OperatorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorList.
func (*OperatorList) DeepCopyInto ¶
func (in *OperatorList) DeepCopyInto(out *OperatorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OperatorList) DeepCopyObject ¶
func (in *OperatorList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OperatorSpec ¶
type OperatorSpec struct { Description string `json:"description,omitempty"` KudoVersion string `json:"kudoVersion,omitempty"` KubernetesVersion string `json:"kubernetesVersion,omitempty"` Maintainers []*Maintainer `json:"maintainers,omitempty"` URL string `json:"url,omitempty"` }
OperatorSpec defines the desired state of Operator
func (*OperatorSpec) DeepCopy ¶
func (in *OperatorSpec) DeepCopy() *OperatorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorSpec.
func (*OperatorSpec) DeepCopyInto ¶
func (in *OperatorSpec) DeepCopyInto(out *OperatorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OperatorStatus ¶
type OperatorStatus struct { }
OperatorStatus defines the observed state of Operator
func (*OperatorStatus) DeepCopy ¶
func (in *OperatorStatus) DeepCopy() *OperatorStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorStatus.
func (*OperatorStatus) DeepCopyInto ¶
func (in *OperatorStatus) DeepCopyInto(out *OperatorStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OperatorVersion ¶
type OperatorVersion struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec OperatorVersionSpec `json:"spec,omitempty"` Status OperatorVersionStatus `json:"status,omitempty"` }
OperatorVersion is the Schema for the operatorversions API. +k8s:openapi-gen=true
func (*OperatorVersion) DeepCopy ¶
func (in *OperatorVersion) DeepCopy() *OperatorVersion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorVersion.
func (*OperatorVersion) DeepCopyInto ¶
func (in *OperatorVersion) DeepCopyInto(out *OperatorVersion)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OperatorVersion) DeepCopyObject ¶
func (in *OperatorVersion) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OperatorVersionList ¶
type OperatorVersionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []OperatorVersion `json:"items"` }
OperatorVersionList contains a list of OperatorVersion.
func (*OperatorVersionList) DeepCopy ¶
func (in *OperatorVersionList) DeepCopy() *OperatorVersionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorVersionList.
func (*OperatorVersionList) DeepCopyInto ¶
func (in *OperatorVersionList) DeepCopyInto(out *OperatorVersionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OperatorVersionList) DeepCopyObject ¶
func (in *OperatorVersionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OperatorVersionSpec ¶
type OperatorVersionSpec struct { // +optional Operator corev1.ObjectReference `json:"operator,omitempty"` Version string `json:"version,omitempty"` AppVersion string `json:"appVersion,omitempty"` // Yaml captures a templated yaml list of elements that define the application operator instance. Templates map[string]string `json:"templates,omitempty"` Tasks []Task `json:"tasks,omitempty"` Parameters []Parameter `json:"parameters,omitempty"` // Plans maps a plan name to a plan. Plans map[string]Plan `json:"plans,omitempty"` // ConnectionString defines a templated string that can be used to connect to an instance of the Operator. // +optional ConnectionString string `json:"connectionString,omitempty"` // Dependencies a list of all dependencies of the operator. Dependencies []OperatorDependency `json:"dependencies,omitempty"` // UpgradableFrom lists all OperatorVersions that can upgrade to this OperatorVersion. UpgradableFrom []OperatorVersion `json:"upgradableFrom,omitempty"` }
OperatorVersionSpec defines the desired state of OperatorVersion.
func (*OperatorVersionSpec) DeepCopy ¶
func (in *OperatorVersionSpec) DeepCopy() *OperatorVersionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorVersionSpec.
func (*OperatorVersionSpec) DeepCopyInto ¶
func (in *OperatorVersionSpec) DeepCopyInto(out *OperatorVersionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OperatorVersionStatus ¶
type OperatorVersionStatus struct { }
OperatorVersionStatus defines the observed state of OperatorVersion.
func (*OperatorVersionStatus) DeepCopy ¶
func (in *OperatorVersionStatus) DeepCopy() *OperatorVersionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorVersionStatus.
func (*OperatorVersionStatus) DeepCopyInto ¶
func (in *OperatorVersionStatus) DeepCopyInto(out *OperatorVersionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Ordering ¶
type Ordering string
Ordering specifies how the subitems in this plan/phase should be rolled out.
type Parameter ¶
type Parameter struct { // DisplayName can be used by UI's. DisplayName string `json:"displayName,omitempty"` // Name is the string that should be used in the templated file for example, // if `name: COUNT` then using the variable in a spec like: // // spec: // replicas: {{COUNT}} Name string `json:"name,omitempty"` // Description captures a longer description of how the parameter will be used. Description string `json:"description,omitempty"` // Required specifies if the parameter is required to be provided by all instances, or whether a default can suffice. Required *bool `json:"required,omitempty"` // Default is a default value if no parameter is provided by the instance. Default *string `json:"default,omitempty"` // Trigger identifies the plan that gets executed when this parameter changes in the Instance object. // Default is `update` if a plan with that name exists, otherwise it's `deploy` Trigger string `json:"trigger,omitempty"` }
Parameter captures the variability of an OperatorVersion being instantiated in an instance.
func (*Parameter) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Parameter.
func (*Parameter) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Phase ¶
type Phase struct { Name string `json:"name" validate:"required"` // makes field mandatory and checks if set and non empty Strategy Ordering `json:"strategy" validate:"required"` // makes field mandatory and checks if set and non empty // Steps maps a step name to a list of templated Kubernetes objects stored as a string. Steps []Step `json:"steps" validate:"required,gt=0,dive"` // makes field mandatory and checks if its gt 0 }
Phase specifies a list of steps that contain Kubernetes objects.
func (*Phase) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Phase.
func (*Phase) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PhaseStatus ¶
type PhaseStatus struct { Name string `json:"name,omitempty"` Status ExecutionStatus `json:"status,omitempty"` Message string `json:"message,omitempty"` // more verbose explanation of the status, e.g. a detailed error message Steps []StepStatus `json:"steps,omitempty"` }
PhaseStatus is representing status of a phase
func (*PhaseStatus) DeepCopy ¶
func (in *PhaseStatus) DeepCopy() *PhaseStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhaseStatus.
func (*PhaseStatus) DeepCopyInto ¶
func (in *PhaseStatus) DeepCopyInto(out *PhaseStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PhaseStatus) Set ¶ added in v0.9.0
func (s *PhaseStatus) Set(status ExecutionStatus)
func (*PhaseStatus) SetWithMessage ¶ added in v0.9.0
func (s *PhaseStatus) SetWithMessage(status ExecutionStatus, message string)
type PipeSpec ¶ added in v0.9.0
type PipeSpec struct { File string `json:"file"` Kind string `json:"kind"` Key string `json:"key"` }
PipeSpec describes how a file generated by a PipeTask is stored and referenced
func (*PipeSpec) DeepCopy ¶ added in v0.9.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipeSpec.
func (*PipeSpec) DeepCopyInto ¶ added in v0.9.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PipeTaskSpec ¶ added in v0.9.0
PipeTask specifies a task that generates files and stores them for later usage in subsequent tasks
func (*PipeTaskSpec) DeepCopy ¶ added in v0.9.0
func (in *PipeTaskSpec) DeepCopy() *PipeTaskSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipeTaskSpec.
func (*PipeTaskSpec) DeepCopyInto ¶ added in v0.9.0
func (in *PipeTaskSpec) DeepCopyInto(out *PipeTaskSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Plan ¶
type Plan struct { Strategy Ordering `json:"strategy" validate:"required"` // makes field mandatory and checks if set and non empty // Phases maps a phase name to a Phase object. Phases []Phase `json:"phases" validate:"required,gt=0,dive"` // makes field mandatory and checks if its gt 0 }
Plan specifies a series of Phases that need to be completed.
func (*Plan) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plan.
func (*Plan) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PlanStatus ¶
type PlanStatus struct { Name string `json:"name,omitempty"` Status ExecutionStatus `json:"status,omitempty"` Message string `json:"message,omitempty"` // more verbose explanation of the status, e.g. a detailed error message LastFinishedRun metav1.Time `json:"lastFinishedRun,omitempty"` Phases []PhaseStatus `json:"phases,omitempty"` UID apimachinerytypes.UID `json:"uid,omitempty"` }
PlanStatus is representing status of a plan
These are valid states and transitions
+----------------+ | Never executed | +-------+--------+ | v
+-------------+ +-------+--------+ | Error |<------>| Pending | +------+------+ +-------+--------+
^ | | v | +-------+--------+ +-------------->| In progress | | +-------+--------+ | | v v
+------+------+ +-------+--------+ | Fatal error | | Complete | +-------------+ +----------------+
func (*PlanStatus) DeepCopy ¶
func (in *PlanStatus) DeepCopy() *PlanStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlanStatus.
func (*PlanStatus) DeepCopyInto ¶
func (in *PlanStatus) DeepCopyInto(out *PlanStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PlanStatus) Set ¶ added in v0.9.0
func (s *PlanStatus) Set(status ExecutionStatus)
func (*PlanStatus) SetWithMessage ¶ added in v0.9.0
func (s *PlanStatus) SetWithMessage(status ExecutionStatus, message string)
type ResourceTaskSpec ¶
type ResourceTaskSpec struct {
Resources []string `json:"resources"`
}
ResourceTaskSpec is referencing a list of resources
func (*ResourceTaskSpec) DeepCopy ¶
func (in *ResourceTaskSpec) DeepCopy() *ResourceTaskSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceTaskSpec.
func (*ResourceTaskSpec) DeepCopyInto ¶
func (in *ResourceTaskSpec) DeepCopyInto(out *ResourceTaskSpec)
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" validate:"required"` // makes field mandatory and checks if set and non empty Tasks []string `json:"tasks" validate:"required,gt=0,dive"` // makes field mandatory and checks if non empty }
Step defines a specific set of operations that occur.
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 StepStatus ¶
type StepStatus struct { Name string `json:"name,omitempty"` Message string `json:"message,omitempty"` // more verbose explanation of the status, e.g. a detailed error message Status ExecutionStatus `json:"status,omitempty"` }
StepStatus is representing status of a step
func (*StepStatus) DeepCopy ¶
func (in *StepStatus) DeepCopy() *StepStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepStatus.
func (*StepStatus) DeepCopyInto ¶
func (in *StepStatus) DeepCopyInto(out *StepStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StepStatus) Set ¶ added in v0.9.0
func (s *StepStatus) Set(status ExecutionStatus)
func (*StepStatus) SetWithMessage ¶ added in v0.9.0
func (s *StepStatus) SetWithMessage(status ExecutionStatus, message string)
type Task ¶
type Task struct { Name string `json:"name" validate:"required"` Kind string `json:"kind" validate:"required"` Spec TaskSpec `json:"spec" validate:"required"` }
Task is a global, polymorphic implementation of all publicly available tasks
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 TaskSpec ¶
type TaskSpec struct { ResourceTaskSpec DummyTaskSpec PipeTaskSpec }
TaskSpec embeds all possible task specs. This allows us to avoid writing custom un/marshallers that would only parse certain fields depending on the task Kind. The downside of this approach is, that embedded types can not have fields with the same json names as it would become ambiguous for the default parser. We might revisit this approach in the future should this become an issue.
func (*TaskSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskSpec.
func (*TaskSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestAssert ¶
type TestAssert struct { // The type meta object, should always be a GVK of kudo.dev/v1beta1/TestAssert. metav1.TypeMeta `json:",inline"` // Override the default timeout of 30 seconds (in seconds). Timeout int `json:"timeout"` }
TestAssert represents the settings needed to verify the result of a test step.
func (*TestAssert) DeepCopy ¶
func (in *TestAssert) DeepCopy() *TestAssert
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestAssert.
func (*TestAssert) DeepCopyInto ¶
func (in *TestAssert) DeepCopyInto(out *TestAssert)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TestAssert) DeepCopyObject ¶
func (in *TestAssert) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TestStep ¶
type TestStep struct { // The type meta object, should always be a GVK of kudo.dev/v1beta1/TestStep. metav1.TypeMeta `json:",inline"` // Override the default metadata. Set labels or override the test step name. metav1.ObjectMeta `json:"metadata,omitempty"` Index int `json:"index,omitempty"` // Objects to delete at the beginning of the test step. Delete []ObjectReference `json:"delete,omitempty"` // Indicates that this is a unit test - safe to run without a real Kubernetes cluster. UnitTest bool `json:"unitTest"` // Kubectl commands to run at the start of the test Kubectl []string `json:"kubectl"` // Commands to run prior at the beginning of the test step. Commands []Command `json:"commands"` }
TestStep settings to apply to a test step.
func (*TestStep) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestStep.
func (*TestStep) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TestStep) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TestSuite ¶
type TestSuite struct { // The type meta object, should always be a GVK of kudo.dev/v1beta1/TestSuite. metav1.TypeMeta `json:",inline"` // Set labels or the test suite name. metav1.ObjectMeta `json:"metadata,omitempty"` // Path to CRDs to install before running tests. CRDDir string `json:"crdDir"` // Paths to directories containing manifests to install before running tests. ManifestDirs []string `json:"manifestDirs"` // Directories containing test cases to run. TestDirs []string `json:"testDirs"` // Whether or not to start a local etcd and kubernetes API server for the tests. StartControlPlane bool `json:"startControlPlane"` // Whether or not to start a local kind cluster for the tests. StartKIND bool `json:"startKIND"` // Path to the KIND configuration file to use. KINDConfig string `json:"kindConfig"` // KIND context to use. KINDContext string `json:"kindContext"` // If set, each node defined in the kind configuration will have a docker named volume mounted into it to persist // pulled container images across test runs. KINDNodeCache bool `json:"kindNodeCache"` // Whether or not to start the KUDO controller for the tests. StartKUDO bool `json:"startKUDO"` // If set, do not delete the resources after running the tests (implies SkipClusterDelete). SkipDelete bool `json:"skipDelete"` // If set, do not delete the mocked control plane or kind cluster. SkipClusterDelete bool `json:"skipClusterDelete"` // Override the default timeout of 30 seconds (in seconds). Timeout int `json:"timeout"` // The maximum number of tests to run at once (default: 8). Parallel int `json:"parallel"` // The directory to output artifacts to (current working directory if not specified). ArtifactsDir string `json:"artifactsDir"` // Kubectl commands to run before running any tests. Kubectl []string `json:"kubectl"` // Commands to run prior to running the tests. Commands []Command `json:"commands"` }
TestSuite configures which tests should be loaded.
func (*TestSuite) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuite.
func (*TestSuite) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TestSuite) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.