api

package
v0.0.0-...-599887d Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseTask

type BaseTask struct {
	// name of the task
	Name string `json:"name,omitempty"`
}

BaseTask is a base for the struct hierarchy

func (*BaseTask) DeepCopy

func (in *BaseTask) DeepCopy() *BaseTask

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

func (*BaseTask) DeepCopyInto

func (in *BaseTask) DeepCopyInto(out *BaseTask)

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

type Build

type Build struct {
	ObjectReference `json:"meta,omitempty"`
	Spec            BuildSpec   `json:"spec,omitempty"`
	Status          BuildStatus `json:"status,omitempty"`
}

Build is the Schema for the builder API. Follows the Kubernetes resource structure, but it's not tied to it. Can be used in any environment.

func (*Build) DeepCopy

func (in *Build) DeepCopy() *Build

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

func (*Build) DeepCopyInto

func (in *Build) DeepCopyInto(out *Build)

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

type BuildCondition

type BuildCondition struct {
	// Type of integration condition.
	Type BuildConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// A human-readable message indicating details about the transition.
	Message string `json:"message,omitempty"`
}

BuildCondition describes the state of a resource at a certain point.

func (*BuildCondition) DeepCopy

func (in *BuildCondition) DeepCopy() *BuildCondition

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

func (*BuildCondition) DeepCopyInto

func (in *BuildCondition) DeepCopyInto(out *BuildCondition)

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

type BuildConditionType

type BuildConditionType string

BuildConditionType --

type BuildPhase

type BuildPhase string

BuildPhase --

const (
	// BuildPhaseNone --
	BuildPhaseNone BuildPhase = ""
	// BuildPhaseInitialization --
	BuildPhaseInitialization BuildPhase = "Initialization"
	// BuildPhaseScheduling --
	BuildPhaseScheduling BuildPhase = "Scheduling"
	// BuildPhasePending --
	BuildPhasePending BuildPhase = "Pending"
	// BuildPhaseRunning --
	BuildPhaseRunning BuildPhase = "Running"
	// BuildPhaseSucceeded --
	BuildPhaseSucceeded BuildPhase = "Succeeded"
	// BuildPhaseFailed --
	BuildPhaseFailed BuildPhase = "Failed"
	// BuildPhaseInterrupted --
	BuildPhaseInterrupted = "Interrupted"
	// BuildPhaseError --
	BuildPhaseError BuildPhase = "Error"
)

type BuildSpec

type BuildSpec struct {
	// The sequence of Build tasks to be performed as part of the Build execution.
	Tasks []Task `json:"tasks,omitempty"`
	// The strategy that should be used to perform the Build.
	Strategy BuildStrategy `json:"strategy,omitempty"`
	// Timeout defines the Build maximum execution duration.
	// The Build deadline is set to the Build start time plus the Timeout duration.
	// If the Build deadline is exceeded, the Build context is canceled,
	// and its phase set to BuildPhaseFailed.
	// +kubebuilder:validation:Format=duration
	Timeout metav1.Duration `json:"timeout,omitempty"`
}

BuildSpec defines the Build operation to be executed

func (*BuildSpec) DeepCopy

func (in *BuildSpec) DeepCopy() *BuildSpec

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

func (*BuildSpec) DeepCopyInto

func (in *BuildSpec) DeepCopyInto(out *BuildSpec)

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

type BuildStatus

type BuildStatus struct {
	// ObservedGeneration is the most recent generation observed for this Build.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// describes the phase
	Phase BuildPhase `json:"phase,omitempty"`
	// the image name built
	Image string `json:"image,omitempty"`
	// the digest from image
	Digest string `json:"digest,omitempty"`
	// the base image used for this build
	BaseImage string `json:"baseImage,omitempty"`
	// the error description (if any)
	Error string `json:"error,omitempty"`
	// the reason of the failure (if any)
	Failure *Failure `json:"failure,omitempty"`
	// the time when it started
	StartedAt *metav1.Time `json:"startedAt,omitempty"`
	// a list of conditions occurred during the build
	Conditions []BuildCondition `json:"conditions,omitempty"`
	// how long it took for the build
	// Change to Duration / ISO 8601 when CRD uses OpenAPI spec v3
	// https://github.com/OAI/OpenAPI-Specification/issues/845
	Duration string `json:"duration,omitempty"`
	// reference to where the build resources are located
	ResourceVolume *ResourceVolume `json:"resourceVolume,omitempty"`
}

BuildStatus defines the observed state of Build

func (*BuildStatus) DeepCopy

func (in *BuildStatus) DeepCopy() *BuildStatus

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

func (*BuildStatus) DeepCopyInto

func (in *BuildStatus) DeepCopyInto(out *BuildStatus)

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

type BuildStrategy

type BuildStrategy string

BuildStrategy specifies how the Build should be executed. It will trigger a Maven process that will take care of producing the expected runtime. +kubebuilder:validation:Enum=routine;pod

const (
	// BuildStrategyRoutine performs the build in a routine (will be executed as a process inside the same owner `Pod` or local process).
	// A routine may be preferred to a `pod` strategy since it reuse the Maven repository dependency cached locally. It is executed as
	// a parallel process, so you may need to consider the quantity of concurrent build process running simultaneously.
	BuildStrategyRoutine BuildStrategy = "routine"
	// BuildStrategyPod performs the build in a `Pod` (will schedule a new builder ephemeral `Pod` which will take care of the build action).
	// This strategy has the limitation that every build will have to download all the dependencies required by the Maven build.
	BuildStrategyPod BuildStrategy = "pod"
)

type Failure

type Failure struct {
	// a short text specifying the reason
	Reason string `json:"reason"`
	// the time when the failure has happened
	Time metav1.Time `json:"time"`
	// the recovery attempted for this failure
	Recovery FailureRecovery `json:"recovery"`
}

Failure represent a message specifying the reason and the time of an event failure

func (*Failure) DeepCopy

func (in *Failure) DeepCopy() *Failure

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

func (*Failure) DeepCopyInto

func (in *Failure) DeepCopyInto(out *Failure)

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

type FailureRecovery

type FailureRecovery struct {
	// attempt number
	Attempt int `json:"attempt"`
	// maximum number of attempts
	AttemptMax int `json:"attemptMax"`
	// time of the attempt execution
	// +optional
	AttemptTime metav1.Time `json:"attemptTime"`
}

FailureRecovery defines the attempts to recover a failure

func (*FailureRecovery) DeepCopy

func (in *FailureRecovery) DeepCopy() *FailureRecovery

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

func (*FailureRecovery) DeepCopyInto

func (in *FailureRecovery) DeepCopyInto(out *FailureRecovery)

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

type KanikoTask

type KanikoTask struct {
	BaseTask    `json:",inline"`
	PublishTask `json:",inline"`
	// log more information
	Verbose *bool `json:"verbose,omitempty"`
	// use a cache
	Cache KanikoTaskCache `json:"cache,omitempty"`
	// Resources -- optional compute resource requirements for the Kaniko container
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	// AdditionalFlags -- List of additional flags for  the Kaniko process (see https://github.com/GoogleContainerTools/kaniko/blob/main/README.md#additional-flags)
	AdditionalFlags []string `json:"additionalFlags,omitempty"`
}

KanikoTask is used to configure Kaniko

func (*KanikoTask) DeepCopy

func (in *KanikoTask) DeepCopy() *KanikoTask

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

func (*KanikoTask) DeepCopyInto

func (in *KanikoTask) DeepCopyInto(out *KanikoTask)

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

type KanikoTaskCache

type KanikoTaskCache struct {
	// true if a cache is enabled
	Enabled *bool `json:"enabled,omitempty"`
	// the PVC used to store the cache
	PersistentVolumeClaim string `json:"persistentVolumeClaim,omitempty"`
}

KanikoTaskCache is used to configure Kaniko cache

func (*KanikoTaskCache) DeepCopy

func (in *KanikoTaskCache) DeepCopy() *KanikoTaskCache

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

func (*KanikoTaskCache) DeepCopyInto

func (in *KanikoTaskCache) DeepCopyInto(out *KanikoTaskCache)

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

type ObjectReference

type ObjectReference struct {
	Namespace string `json:"namespace,omitempty"`
	Name      string `json:"name,omitempty"`
}

ObjectReference is a subset of the kubernetes k8s.io/apimachinery/pkg/apis/meta/v1.Object interface. Objects in this API not necessarily represent Kubernetes objects, but this structure can help when needed.

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.

func (*ObjectReference) GetName

func (o *ObjectReference) GetName() string

func (*ObjectReference) GetNamespace

func (o *ObjectReference) GetNamespace() string

func (*ObjectReference) GetObjectKey

func (o *ObjectReference) GetObjectKey() types.NamespacedName

type PlatformBuild

type PlatformBuild struct {
	ObjectReference `json:"meta,omitempty"`
	Spec            PlatformBuildSpec `json:"spec,omitempty"`
}

func (*PlatformBuild) DeepCopy

func (in *PlatformBuild) DeepCopy() *PlatformBuild

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

func (*PlatformBuild) DeepCopyInto

func (in *PlatformBuild) DeepCopyInto(out *PlatformBuild)

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

type PlatformBuildPublishStrategy

type PlatformBuildPublishStrategy string

PlatformBuildPublishStrategy defines the strategy used to package and publish an Integration base image

const (
	// PlatformBuildPublishStrategyKaniko uses Kaniko project (https://github.com/GoogleContainerTools/kaniko)
	// in order to push the incremental images to the image repository. It can be used with `pod` BuildStrategy.
	PlatformBuildPublishStrategyKaniko PlatformBuildPublishStrategy = "Kaniko"
)

type PlatformBuildSpec

type PlatformBuildSpec struct {
	// the strategy to adopt for building an Integration base image
	BuildStrategy BuildStrategy `json:"buildStrategy,omitempty"`
	// the strategy to adopt for publishing an Integration base image
	PublishStrategy PlatformBuildPublishStrategy `json:"publishStrategy,omitempty"`
	// a base image that can be used as base layer for all images.
	// It can be useful if you want to provide some custom base image with further utility software
	BaseImage string `json:"baseImage,omitempty"`
	// the image registry used to push/pull built images
	Registry RegistrySpec `json:"registry,omitempty"`
	// how much time to wait before time out the build process
	Timeout *metav1.Duration `json:"timeout,omitempty"`
	//
	PublishStrategyOptions map[string]string `json:"PublishStrategyOptions,omitempty"`
}

func (*PlatformBuildSpec) DeepCopy

func (in *PlatformBuildSpec) DeepCopy() *PlatformBuildSpec

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

func (*PlatformBuildSpec) DeepCopyInto

func (in *PlatformBuildSpec) DeepCopyInto(out *PlatformBuildSpec)

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

func (PlatformBuildSpec) GetTimeout

func (b PlatformBuildSpec) GetTimeout() metav1.Duration

GetTimeout returns the specified duration or a default one

func (PlatformBuildSpec) IsOptionEnabled

func (b PlatformBuildSpec) IsOptionEnabled(option string) bool

IsOptionEnabled return whether if the PublishStrategyOptions is enabled or not

type PublishTask

type PublishTask struct {
	// can be useful to share info with other tasks
	ContextDir string `json:"contextDir,omitempty"`
	// base image layer
	BaseImage string `json:"baseImage,omitempty"`
	// final image name
	Image string `json:"image,omitempty"`
	// where to publish the final image
	Registry RegistrySpec `json:"registry,omitempty"`
}

PublishTask image publish configuration

func (*PublishTask) DeepCopy

func (in *PublishTask) DeepCopy() *PublishTask

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

func (*PublishTask) DeepCopyInto

func (in *PublishTask) DeepCopyInto(out *PublishTask)

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

type RegistrySpec

type RegistrySpec struct {
	// if the container registry is insecure (ie, http only)
	Insecure bool `json:"insecure,omitempty"`
	// the URI to access
	Address string `json:"address,omitempty"`
	// the secret where credentials are stored
	Secret string `json:"secret,omitempty"`
	// the configmap which stores the Certificate Authority
	CA string `json:"ca,omitempty"`
	// the registry organization
	Organization string `json:"organization,omitempty"`
}

RegistrySpec provides the configuration for the container registry

func (*RegistrySpec) DeepCopy

func (in *RegistrySpec) DeepCopy() *RegistrySpec

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

func (*RegistrySpec) DeepCopyInto

func (in *RegistrySpec) DeepCopyInto(out *RegistrySpec)

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

type ResourceReferenceType

type ResourceReferenceType string
const (
	ResourceReferenceTypeConfigMap ResourceReferenceType = "configMap"
)

type ResourceVolume

type ResourceVolume struct {
	// ReferenceName name of the object holding the resources reference
	ReferenceName string `json:"referenceName"`
	// ReferenceType type of the resource holding the reference
	ReferenceType ResourceReferenceType `json:"referenceType"`
}

ResourceVolume dictates where the build resources are mount

func (*ResourceVolume) DeepCopy

func (in *ResourceVolume) DeepCopy() *ResourceVolume

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

func (*ResourceVolume) DeepCopyInto

func (in *ResourceVolume) DeepCopyInto(out *ResourceVolume)

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

type Task

type Task struct {
	// a KanikoTask, for Kaniko strategy
	Kaniko *KanikoTask `json:"kaniko,omitempty"`
}

Task represents the abstract task. Only one of the task should be configured to represent the specific task chosen.

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.

Jump to

Keyboard shortcuts

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