api

package
v0.0.0-...-8540d8e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerBuild

type ContainerBuild struct {
	ObjectReference `json:"metadata,omitempty"`
	Spec            ContainerBuildSpec   `json:"spec,omitempty"`
	Status          ContainerBuildStatus `json:"status,omitempty"`
}

ContainerBuild 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 (*ContainerBuild) DeepCopy

func (in *ContainerBuild) DeepCopy() *ContainerBuild

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

func (*ContainerBuild) DeepCopyInto

func (in *ContainerBuild) DeepCopyInto(out *ContainerBuild)

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

type ContainerBuildBaseTask

type ContainerBuildBaseTask struct {
	// name of the task
	Name string `json:"name,omitempty"`
	// Resources -- optional compute resource requirements for the Kaniko container
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	// Build arguments passed to the internal build system (e.g. Dockerfile ARG)
	BuildArgs []corev1.EnvVar
	// Environment variable passed to the internal build container.
	Envs []corev1.EnvVar `json:"envs,omitempty"`
}

ContainerBuildBaseTask is a base for the struct hierarchy

func (*ContainerBuildBaseTask) DeepCopy

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

func (*ContainerBuildBaseTask) DeepCopyInto

func (in *ContainerBuildBaseTask) DeepCopyInto(out *ContainerBuildBaseTask)

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

type ContainerBuildCondition

type ContainerBuildCondition struct {
	// Type of integration condition.
	Type ContainerBuildConditionType `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"`
}

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

func (*ContainerBuildCondition) DeepCopy

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

func (*ContainerBuildCondition) DeepCopyInto

func (in *ContainerBuildCondition) DeepCopyInto(out *ContainerBuildCondition)

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

type ContainerBuildConditionType

type ContainerBuildConditionType string

ContainerBuildConditionType --

type ContainerBuildFailure

type ContainerBuildFailure 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 ContainerBuildFailureRecovery `json:"recovery"`
}

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

func (*ContainerBuildFailure) DeepCopy

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

func (*ContainerBuildFailure) DeepCopyInto

func (in *ContainerBuildFailure) DeepCopyInto(out *ContainerBuildFailure)

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

type ContainerBuildFailureRecovery

type ContainerBuildFailureRecovery 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"`
}

ContainerBuildFailureRecovery defines the attempts to recover a failure

func (*ContainerBuildFailureRecovery) DeepCopy

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

func (*ContainerBuildFailureRecovery) DeepCopyInto

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

type ContainerBuildPhase

type ContainerBuildPhase string

ContainerBuildPhase --

const (
	// ContainerBuildPhaseNone --
	ContainerBuildPhaseNone ContainerBuildPhase = ""
	// ContainerBuildPhaseInitialization --
	ContainerBuildPhaseInitialization ContainerBuildPhase = "Initialization"
	// ContainerBuildPhaseScheduling --
	ContainerBuildPhaseScheduling ContainerBuildPhase = "Scheduling"
	// ContainerBuildPhasePending --
	ContainerBuildPhasePending ContainerBuildPhase = "Pending"
	// ContainerBuildPhaseRunning --
	ContainerBuildPhaseRunning ContainerBuildPhase = "Running"
	// ContainerBuildPhaseSucceeded --
	ContainerBuildPhaseSucceeded ContainerBuildPhase = "Succeeded"
	// ContainerBuildPhaseFailed --
	ContainerBuildPhaseFailed ContainerBuildPhase = "Failed"
	// ContainerBuildPhaseInterrupted --
	ContainerBuildPhaseInterrupted ContainerBuildPhase = "Interrupted"
	// ContainerBuildPhaseError --
	ContainerBuildPhaseError ContainerBuildPhase = "Error"
)

type ContainerBuildResourceReferenceType

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

type ContainerBuildResourceVolume

type ContainerBuildResourceVolume struct {
	// ReferenceName name of the object holding the resources reference
	ReferenceName string `json:"referenceName"`
	// ReferenceType type of the resource holding the reference
	ReferenceType ContainerBuildResourceReferenceType `json:"referenceType"`
	// DestinationDir where to mount the given volume in the build context
	DestinationDir string `json:"destinationDir,omitempty"`
}

ContainerBuildResourceVolume dictates where the build resources are mount

func (*ContainerBuildResourceVolume) DeepCopy

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

func (*ContainerBuildResourceVolume) DeepCopyInto

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

type ContainerBuildSpec

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

ContainerBuildSpec defines the ContainerBuild operation to be executed

func (*ContainerBuildSpec) DeepCopy

func (in *ContainerBuildSpec) DeepCopy() *ContainerBuildSpec

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

func (*ContainerBuildSpec) DeepCopyInto

func (in *ContainerBuildSpec) DeepCopyInto(out *ContainerBuildSpec)

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

type ContainerBuildStatus

type ContainerBuildStatus struct {
	// ObservedGeneration is the most recent generation observed for this ContainerBuild.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// describes the phase
	Phase ContainerBuildPhase `json:"phase,omitempty"`
	// the image name built
	RepositoryImageTag string `json:"repositoryImageTag,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 *ContainerBuildFailure `json:"failure,omitempty"`
	// the time when it started
	StartedAt *metav1.Time `json:"startedAt,omitempty"`
	// a list of conditions occurred during the build
	Conditions []ContainerBuildCondition `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
	ResourceVolumes []ContainerBuildResourceVolume `json:"resourceVolumes,omitempty"`
}

ContainerBuildStatus defines the observed state of ContainerBuild

func (*ContainerBuildStatus) DeepCopy

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

func (*ContainerBuildStatus) DeepCopyInto

func (in *ContainerBuildStatus) DeepCopyInto(out *ContainerBuildStatus)

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

type ContainerBuildStrategy

type ContainerBuildStrategy string

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

const (
	// ContainerBuildStrategyRoutine 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.
	ContainerBuildStrategyRoutine ContainerBuildStrategy = "routine"
	// ContainerBuildStrategyPod 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.
	ContainerBuildStrategyPod ContainerBuildStrategy = "pod"
)

type ContainerBuildTask

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

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

func (*ContainerBuildTask) DeepCopy

func (in *ContainerBuildTask) DeepCopy() *ContainerBuildTask

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

func (*ContainerBuildTask) DeepCopyInto

func (in *ContainerBuildTask) DeepCopyInto(out *ContainerBuildTask)

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

type ContainerRegistrySpec

type ContainerRegistrySpec 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"`
}

ContainerRegistrySpec provides the configuration for the container registry

func (*ContainerRegistrySpec) DeepCopy

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

func (*ContainerRegistrySpec) DeepCopyInto

func (in *ContainerRegistrySpec) DeepCopyInto(out *ContainerRegistrySpec)

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

type KanikoTask

type KanikoTask struct {
	ContainerBuildBaseTask `json:",inline"`
	PublishTask            `json:",inline"`
	// log more information
	Verbose *bool `json:"verbose,omitempty"`
	// use a cache
	Cache KanikoTaskCache `json:"cache,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"`
	// Image used by the created Kaniko pod executor
	KanikoExecutorImage string `json:"kanikoExecutorImage,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 PlatformContainerBuild

type PlatformContainerBuild struct {
	ObjectReference `json:"meta,omitempty"`
	Spec            PlatformContainerBuildSpec `json:"spec,omitempty"`
}

func (*PlatformContainerBuild) DeepCopy

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

func (*PlatformContainerBuild) DeepCopyInto

func (in *PlatformContainerBuild) DeepCopyInto(out *PlatformContainerBuild)

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

type PlatformContainerBuildPublishStrategy

type PlatformContainerBuildPublishStrategy string

PlatformContainerBuildPublishStrategy 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` ContainerBuildStrategy.
	PlatformBuildPublishStrategyKaniko PlatformContainerBuildPublishStrategy = "Kaniko"
)

type PlatformContainerBuildSpec

type PlatformContainerBuildSpec struct {
	// the strategy to adopt for building a base image
	BuildStrategy ContainerBuildStrategy `json:"buildStrategy,omitempty"`
	// the strategy to adopt for publishing a base image
	PublishStrategy PlatformContainerBuildPublishStrategy `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 ContainerRegistrySpec `json:"registry,omitempty"`
	// how much time to wait before time out the build process
	Timeout *metav1.Duration `json:"timeout,omitempty"`
	//
	BuildStrategyOptions map[string]string `json:"BuildStrategyOptions,omitempty"`
}

func (*PlatformContainerBuildSpec) DeepCopy

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

func (*PlatformContainerBuildSpec) DeepCopyInto

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

func (*PlatformContainerBuildSpec) GetTimeout

func (b *PlatformContainerBuildSpec) GetTimeout() metav1.Duration

GetTimeout returns the specified duration or a default one

func (*PlatformContainerBuildSpec) IsOptionEnabled

func (b *PlatformContainerBuildSpec) IsOptionEnabled(option string) bool

IsOptionEnabled return whether if the BuildStrategyOptions 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 ContainerRegistrySpec `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.

func (*PublishTask) GetRepositoryImageTag

func (p *PublishTask) GetRepositoryImageTag() string

GetRepositoryImageTag gets the full qualified Repository Name for the given image in the PublishTask. For example quay.io/myrepo/myimage:latest.

Jump to

Keyboard shortcuts

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