v1alpha1

package
v0.0.0-...-53bbf1f Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the image v1alpha1 API group +kubebuilder:object:generate=true +groupName=forge.build

Index

Constants

View Source
const (
	// BuildNameLabel is the label set on InfraBuild linked to a Build and
	//provisioners.
	BuildNameLabel = "forge.build/build-name"

	// BuildNamespaceLabel is the label set on Jobs linked to a Build and
	// provisioners.
	BuildNamespaceLabel = "forge.build/build-namespace"

	// ProviderNameLabel is the label set on components in the provider manifest.
	// This label allows to easily identify all the components belonging to a provider; the forgectl
	// tool uses this label for implementing provider's lifecycle operations.
	ProviderNameLabel = "forge.build/provider"

	// ManagedByLabel is an annotation that can be applied to InfraBuild resources to signify that
	// some external system is managing the build infrastructure.
	//
	// Provider InfraBuild controllers will ignore resources with this annotation.
	// An external controller must fulfill the contract of the InfraBuild resource.
	// External infrastructure providers should ensure that the annotation, once set, cannot be removed.
	ManagedByLabel = "forge.build/managed-by"

	// ManagedByAnnotation is an annotation that can be applied to InfraBuild resources to signify that
	// some external system is managing the build infrastructure.
	//
	// Provider InfraBuild controllers will ignore resources with this annotation.
	// An external controller must fulfill the contract of the InfraBuild resource.
	// External infrastructure providers should ensure that the annotation, once set, cannot be removed.
	ManagedByAnnotation = "forge.build/managed-by"

	// PausedAnnotation is an annotation that can be applied to any Cluster API
	// object to prevent a controller from processing a resource.
	//
	// Controllers working with Cluster API objects must check the existence of this annotation
	// on the reconciled object.
	PausedAnnotation = "forge.build/paused"

	// WatchLabel is a label othat can be applied to any Build API object.
	//
	// Controllers which allow for selective reconciliation may check this label and proceed
	// with reconciliation of the object only if this label and a configured value is present.
	WatchLabel = "cluster.x-k8s.io/watch-filter"

	// BuildSecretType defines the type of secret created by core components.
	BuildSecretType corev1.SecretType = "forge.build/secret" //nolint:gosec

	// ProvisionerIDLabel is the label set on job linked to a Build and
	// provisioners.
	ProvisionerIDLabel = "forge.build/provisioner-uuid"
)
View Source
const (
	// DeletingReason (Severity=Info) documents a condition not in Status=True because the underlying object it is currently being deleted.
	DeletingReason = "Deleting"

	// DeletionFailedReason (Severity=Warning) documents a condition not in Status=True because the underlying object
	// encountered problems during deletion. This is a warning because the reconciler will retry deletion.
	DeletionFailedReason = "DeletionFailed"

	// DeletedReason (Severity=Info) documents a condition not in Status=True because the underlying object was deleted.
	DeletedReason = "Deleted"

	// IncorrectExternalRefReason (Severity=Error) documents a CAPI object with an incorrect external object reference.
	IncorrectExternalRefReason = "IncorrectExternalRef"
)

Common ConditionReason used by Cluster API objects.

View Source
const (
	// InfrastructureReadyCondition reports a summary of current status of the infrastructure object defined for this cluster/machine/machinepool.
	// This condition is mirrored from the Ready condition in the infrastructure ref object, and
	// the absence of this condition might signal problems in the reconcile external loops or the fact that
	// the infrastructure provider does not implement the Ready condition yet.
	InfrastructureReadyCondition clusterv1.ConditionType = "InfrastructureReady"

	// WaitingForInfrastructureFallbackReason (Severity=Info) documents a cluster/machine/machinepool waiting for the underlying infrastructure
	// to be available.
	// NOTE: This reason is used only as a fallback when the infrastructure object is not reporting its own ready condition.
	WaitingForInfrastructureFallbackReason = "WaitingForInfrastructure"
)
View Source
const (
	// ClusterClassVariablesReconciledCondition reports if the ClusterClass variables, including both inline and external
	// variables, have been successfully reconciled.
	// This signals that the ClusterClass is ready to be used to default and validate variables on Clusters using
	// this ClusterClass.
	ClusterClassVariablesReconciledCondition clusterv1.ConditionType = "VariablesReconciled"

	// VariableDiscoveryFailedReason (Severity=Error) documents a ClusterClass with VariableDiscovery extensions that
	// failed.
	VariableDiscoveryFailedReason = "VariableDiscoveryFailed"
)

Conditions and condition Reasons for the ClusterClass object.

View Source
const (
	// BuildInitializedCondition reports if the build has been initialized such that the
	// image is exported and can be used.
	BuildInitializedCondition clusterv1.ConditionType = "ControlPlaneInitialized"

	// WaitingForProvisionersReason (Severity=Info) documents a build waiting for the provisioners.
	WaitingForProvisionersReason = "WaitingForProvisionersReason"

	// WaitingForConnectionReason (Severity=Info) documents a build waiting for the connection to the infrastructure.
	WaitingForConnectionReason = "WaitingForConnection"

	// MachineReadyCondition reports the ready condition from the Machine object that is used as the builder machine.
	MachineReadyCondition clusterv1.ConditionType = "MachineReady"

	// WaitingForControlPlaneFallbackReason (Severity=Info) documents a cluster waiting for the control plane
	// to be available.
	// NOTE: This reason is used only as a fallback when the control plane object is not reporting its own ready condition.
	WaitingForControlPlaneFallbackReason = "WaitingForControlPlane"

	// WaitingForControlPlaneAvailableReason (Severity=Info) documents a Cluster API object
	// waiting for the control plane machine to be available.
	//
	// NOTE: Having the control plane machine available is a pre-condition for joining additional control planes
	// or workers nodes.
	WaitingForControlPlaneAvailableReason = "WaitingForControlPlaneAvailable"
)
View Source
const (
	// BootstrapReadyCondition reports a summary of current status of the bootstrap object defined for this machine.
	// This condition is mirrored from the Ready condition in the bootstrap ref object, and
	// the absence of this condition might signal problems in the reconcile external loops or the fact that
	// the bootstrap provider does not implement the Ready condition yet.
	BootstrapReadyCondition clusterv1.ConditionType = "BootstrapReady"

	// WaitingForDataSecretFallbackReason (Severity=Info) documents a machine waiting for the bootstrap data secret
	// to be available.
	// NOTE: This reason is used only as a fallback when the bootstrap object is not reporting its own ready condition.
	WaitingForDataSecretFallbackReason = "WaitingForDataSecret"

	// DrainingSucceededCondition provide evidence of the status of the node drain operation which happens during the machine
	// deletion process.
	DrainingSucceededCondition clusterv1.ConditionType = "DrainingSucceeded"

	// DrainingReason (Severity=Info) documents a machine node being drained.
	DrainingReason = "Draining"

	// DrainingFailedReason (Severity=Warning) documents a machine node drain operation failed.
	DrainingFailedReason = "DrainingFailed"

	// PreDrainDeleteHookSucceededCondition reports a machine waiting for a PreDrainDeleteHook before being delete.
	PreDrainDeleteHookSucceededCondition clusterv1.ConditionType = "PreDrainDeleteHookSucceeded"

	// PreTerminateDeleteHookSucceededCondition reports a machine waiting for a PreDrainDeleteHook before being delete.
	PreTerminateDeleteHookSucceededCondition clusterv1.ConditionType = "PreTerminateDeleteHookSucceeded"

	// WaitingExternalHookReason (Severity=Info) provide evidence that we are waiting for an external hook to complete.
	WaitingExternalHookReason = "WaitingExternalHook"

	// VolumeDetachSucceededCondition reports a machine waiting for volumes to be detached.
	VolumeDetachSucceededCondition clusterv1.ConditionType = "VolumeDetachSucceeded"

	// WaitingForVolumeDetachReason (Severity=Info) provide evidence that a machine node waiting for volumes to be attached.
	WaitingForVolumeDetachReason = "WaitingForVolumeDetach"
)
View Source
const (
	// MachineHealthCheckSucceededCondition is set on machines that have passed a healthcheck by the MachineHealthCheck controller.
	// In the event that the health check fails it will be set to False.
	MachineHealthCheckSucceededCondition clusterv1.ConditionType = "HealthCheckSucceeded"

	// MachineHasFailureReason is the reason used when a machine has either a FailureReason or a FailureMessage set on its status.
	MachineHasFailureReason = "MachineHasFailure"

	// HasRemediateMachineAnnotationReason is the reason that gets set at the MachineHealthCheckSucceededCondition when a machine
	// has the RemediateMachineAnnotation set.
	HasRemediateMachineAnnotationReason = "HasRemediateMachineAnnotation"

	// NodeStartupTimeoutReason is the reason used when a machine's node does not appear within the specified timeout.
	NodeStartupTimeoutReason = "NodeStartupTimeout"

	// UnhealthyNodeConditionReason is the reason used when a machine's node has one of the MachineHealthCheck's unhealthy conditions.
	UnhealthyNodeConditionReason = "UnhealthyNode"
)
View Source
const (
	// MachineOwnerRemediatedCondition is set on machines that have failed a healthcheck by the MachineHealthCheck controller.
	// MachineOwnerRemediatedCondition is set to False after a health check fails, but should be changed to True by the owning controller after remediation succeeds.
	MachineOwnerRemediatedCondition clusterv1.ConditionType = "OwnerRemediated"

	// WaitingForRemediationReason is the reason used when a machine fails a health check and remediation is needed.
	WaitingForRemediationReason = "WaitingForRemediation"

	// RemediationFailedReason is the reason used when a remediation owner fails to remediate an unhealthy machine.
	RemediationFailedReason = "RemediationFailed"

	// RemediationInProgressReason is the reason used when an unhealthy machine is being remediated by the remediation owner.
	RemediationInProgressReason = "RemediationInProgress"

	// ExternalRemediationTemplateAvailableCondition is set on machinehealthchecks when MachineHealthCheck controller uses external remediation.
	// ExternalRemediationTemplateAvailableCondition is set to false if external remediation template is not found.
	ExternalRemediationTemplateAvailableCondition clusterv1.ConditionType = "ExternalRemediationTemplateAvailable"

	// ExternalRemediationTemplateNotFoundReason is the reason used when a machine health check fails to find external remediation template.
	ExternalRemediationTemplateNotFoundReason = "ExternalRemediationTemplateNotFound"

	// ExternalRemediationRequestAvailableCondition is set on machinehealthchecks when MachineHealthCheck controller uses external remediation.
	// ExternalRemediationRequestAvailableCondition is set to false if creating external remediation request fails.
	ExternalRemediationRequestAvailableCondition clusterv1.ConditionType = "ExternalRemediationRequestAvailable"

	// ExternalRemediationRequestCreationFailedReason is the reason used when a machine health check fails to create external remediation request.
	ExternalRemediationRequestCreationFailedReason = "ExternalRemediationRequestCreationFailed"
)
View Source
const (
	// MachineNodeHealthyCondition provides info about the operational state of the Kubernetes node hosted on the machine by summarizing  node conditions.
	// If the conditions defined in a Kubernetes node (i.e., NodeReady, NodeMemoryPressure, NodeDiskPressure, NodePIDPressure, and NodeNetworkUnavailable) are in a healthy state, it will be set to True.
	MachineNodeHealthyCondition clusterv1.ConditionType = "NodeHealthy"

	// WaitingForNodeRefReason (Severity=Info) documents a machine.spec.providerId is not assigned yet.
	WaitingForNodeRefReason = "WaitingForNodeRef"

	// NodeProvisioningReason (Severity=Info) documents machine in the process of provisioning a node.
	// NB. provisioning --> NodeRef == "".
	NodeProvisioningReason = "NodeProvisioning"

	// NodeNotFoundReason (Severity=Error) documents a machine's node has previously been observed but is now gone.
	// NB. provisioned --> NodeRef != "".
	NodeNotFoundReason = "NodeNotFound"

	// NodeConditionsFailedReason (Severity=Warning) documents a node is not in a healthy state due to the failed state of at least 1 Kubelet condition.
	NodeConditionsFailedReason = "NodeConditionsFailed"

	// NodeInspectionFailedReason documents a failure in inspecting the node.
	// This reason is used when the Machine controller is unable to list Nodes to find
	// the corresponding Node for a Machine by ProviderID.
	NodeInspectionFailedReason = "NodeInspectionFailed"
)

Conditions and condition Reasons for the Machine's Node object.

View Source
const (
	// RemediationAllowedCondition is set on MachineHealthChecks to show the status of whether the MachineHealthCheck is
	// allowed to remediate any Machines or whether it is blocked from remediating any further.
	RemediationAllowedCondition clusterv1.ConditionType = "RemediationAllowed"

	// TooManyUnhealthyReason is the reason used when too many Machines are unhealthy and the MachineHealthCheck is blocked
	// from making any further remediations.
	TooManyUnhealthyReason = "TooManyUnhealthy"
)
View Source
const (
	// MachineDeploymentAvailableCondition means the MachineDeployment is available, that is, at least the minimum available
	// machines required (i.e. Spec.Replicas-MaxUnavailable when MachineDeploymentStrategyType = RollingUpdate) are up and running for at least minReadySeconds.
	MachineDeploymentAvailableCondition clusterv1.ConditionType = "Available"

	// MachineSetReadyCondition reports a summary of current status of the MachineSet owned by the MachineDeployment.
	MachineSetReadyCondition clusterv1.ConditionType = "MachineSetReady"

	// WaitingForMachineSetFallbackReason (Severity=Info) documents a MachineDeployment waiting for the underlying MachineSet
	// to be available.
	// NOTE: This reason is used only as a fallback when the MachineSet object is not reporting its own ready condition.
	WaitingForMachineSetFallbackReason = "WaitingForMachineSet"

	// WaitingForAvailableMachinesReason (Severity=Warning) reflects the fact that the required minimum number of machines for a machinedeployment are not available.
	WaitingForAvailableMachinesReason = "WaitingForAvailableMachines"
)
View Source
const (
	// MachinesCreatedCondition documents that the machines controlled by the MachineSet are created.
	// When this condition is false, it indicates that there was an error when cloning the infrastructure/bootstrap template or
	// when generating the machine object.
	MachinesCreatedCondition clusterv1.ConditionType = "MachinesCreated"

	// MachinesReadyCondition reports an aggregate of current status of the machines controlled by the MachineSet.
	MachinesReadyCondition clusterv1.ConditionType = "MachinesReady"

	// PreflightCheckFailedReason (Severity=Error) documents a MachineSet failing preflight checks
	// to create machine(s).
	PreflightCheckFailedReason = "PreflightCheckFailed"

	// BootstrapTemplateCloningFailedReason (Severity=Error) documents a MachineSet failing to
	// clone the bootstrap template.
	BootstrapTemplateCloningFailedReason = "BootstrapTemplateCloningFailed"

	// InfrastructureTemplateCloningFailedReason (Severity=Error) documents a MachineSet failing to
	// clone the infrastructure template.
	InfrastructureTemplateCloningFailedReason = "InfrastructureTemplateCloningFailed"

	// MachineCreationFailedReason (Severity=Error) documents a MachineSet failing to
	// generate a machine object.
	MachineCreationFailedReason = "MachineCreationFailed"

	// ResizedCondition documents a MachineSet is resizing the set of controlled machines.
	ResizedCondition clusterv1.ConditionType = "Resized"

	// ScalingUpReason (Severity=Info) documents a MachineSet is increasing the number of replicas.
	ScalingUpReason = "ScalingUp"

	// ScalingDownReason (Severity=Info) documents a MachineSet is decreasing the number of replicas.
	ScalingDownReason = "ScalingDown"
)
View Source
const (
	// TopologyReconciledCondition provides evidence about the reconciliation of a Cluster topology into
	// the managed objects of the Cluster.
	// Status false means that for any reason, the values defined in Cluster.spec.topology are not yet applied to
	// managed objects on the Cluster; status true means that Cluster.spec.topology have been applied to
	// the objects in the Cluster (but this does not imply those objects are already reconciled to the spec provided).
	TopologyReconciledCondition clusterv1.ConditionType = "TopologyReconciled"

	// TopologyReconcileFailedReason (Severity=Error) documents the reconciliation of a Cluster topology
	// failing due to an error.
	TopologyReconcileFailedReason = "TopologyReconcileFailed"

	// TopologyReconciledControlPlaneUpgradePendingReason (Severity=Info) documents reconciliation of a Cluster topology
	// not yet completed because Control Plane is not yet updated to match the desired topology spec.
	TopologyReconciledControlPlaneUpgradePendingReason = "ControlPlaneUpgradePending"

	// TopologyReconciledMachineDeploymentsCreatePendingReason (Severity=Info) documents reconciliation of a Cluster topology
	// not yet completed because at least one of the MachineDeployments is yet to be created.
	// This generally happens because new MachineDeployment creations are held off while the ControlPlane is not stable.
	TopologyReconciledMachineDeploymentsCreatePendingReason = "MachineDeploymentsCreatePending"

	// TopologyReconciledMachineDeploymentsUpgradePendingReason (Severity=Info) documents reconciliation of a Cluster topology
	// not yet completed because at least one of the MachineDeployments is not yet updated to match the desired topology spec.
	TopologyReconciledMachineDeploymentsUpgradePendingReason = "MachineDeploymentsUpgradePending"

	// TopologyReconciledMachineDeploymentsUpgradeDeferredReason (Severity=Info) documents reconciliation of a Cluster topology
	// not yet completed because the upgrade for at least one of the MachineDeployments has been deferred.
	TopologyReconciledMachineDeploymentsUpgradeDeferredReason = "MachineDeploymentsUpgradeDeferred"

	// TopologyReconciledMachinePoolsUpgradePendingReason (Severity=Info) documents reconciliation of a Cluster topology
	// not yet completed because at least one of the MachinePools is not yet updated to match the desired topology spec.
	TopologyReconciledMachinePoolsUpgradePendingReason = "MachinePoolsUpgradePending"

	// TopologyReconciledMachinePoolsCreatePendingReason (Severity=Info) documents reconciliation of a Cluster topology
	// not yet completed because at least one of the MachinePools is yet to be created.
	// This generally happens because new MachinePool creations are held off while the ControlPlane is not stable.
	TopologyReconciledMachinePoolsCreatePendingReason = "MachinePoolsCreatePending"

	// TopologyReconciledMachinePoolsUpgradeDeferredReason (Severity=Info) documents reconciliation of a Cluster topology
	// not yet completed because the upgrade for at least one of the MachinePools has been deferred.
	TopologyReconciledMachinePoolsUpgradeDeferredReason = "MachinePoolsUpgradeDeferred"

	// TopologyReconciledHookBlockingReason (Severity=Info) documents reconciliation of a Cluster topology
	// not yet completed because at least one of the lifecycle hooks is blocking.
	TopologyReconciledHookBlockingReason = "LifecycleHookBlocking"

	// TopologyReconciledClusterClassNotReconciledReason (Severity=Info) documents reconciliation of a Cluster topology not
	// yet completed because the ClusterClass has not reconciled yet. If this condition persists there may be an issue
	// with the ClusterClass surfaced in the ClusterClass status or controller logs.
	TopologyReconciledClusterClassNotReconciledReason = "ClusterClassNotReconciled"
)

Conditions and condition reasons for Clusters with a managed Topology.

View Source
const (
	// ClusterClassRefVersionsUpToDateCondition documents if the references in the ClusterClass are
	// up-to-date (i.e. they are using the latest apiVersion of the current Cluster API contract from
	// the corresponding CRD).
	ClusterClassRefVersionsUpToDateCondition clusterv1.ConditionType = "RefVersionsUpToDate"

	// ClusterClassOutdatedRefVersionsReason (Severity=Warning) that the references in the ClusterClass are not
	// up-to-date (i.e. they are not using the latest apiVersion of the current Cluster API contract from
	// the corresponding CRD).
	ClusterClassOutdatedRefVersionsReason = "OutdatedRefVersions"
)

Conditions and condition reasons for ClusterClass.

View Source
const (
	// ConditionSeverityError specifies that a condition with `Status=False` is an error.
	ConditionSeverityError clusterv1.ConditionSeverity = "Error"

	// ConditionSeverityWarning specifies that a condition with `Status=False` is a warning.
	ConditionSeverityWarning clusterv1.ConditionSeverity = "Warning"

	// ConditionSeverityInfo specifies that a condition with `Status=False` is informative.
	ConditionSeverityInfo clusterv1.ConditionSeverity = "Info"

	// ConditionSeverityNone should apply only to conditions with `Status=True`.
	ConditionSeverityNone clusterv1.ConditionSeverity = ""
)
View Source
const (
	// BuildFinalizer is the finalizer used by the Build controller to
	// cleanup the build resources when a Build is being deleted.
	BuildFinalizer = "build.forge.build"
)
View Source
const (
	// ProvisionersReadyCondition reports a summary of current status of the build object defined for this machine.
	// This condition is mirrored from the Ready condition in the provisioners.
	ProvisionersReadyCondition clusterv1.ConditionType = "ProvisionersReady"
)
View Source
const (
	// ReadyCondition defines the Ready condition type that summarizes the operational state of a Cluster API object.
	ReadyCondition clusterv1.ConditionType = "Ready"
)
View Source
const (
	// TemplateSuffix is the object kind suffix used by template types.
	TemplateSuffix = "Template"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "forge.build", Version: "v1alpha1"}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = schemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Build

type Build struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BuildSpec   `json:"spec,omitempty"`
	Status BuildStatus `json:"status,omitempty"`
}

Build is the Schema for the builds API

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.

func (*Build) DeepCopyObject

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

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

func (*Build) GetConditions

func (c *Build) GetConditions() clusterv1.Conditions

GetConditions returns the set of conditions for this object.

func (*Build) SetConditions

func (c *Build) SetConditions(conditions clusterv1.Conditions)

SetConditions sets the conditions on this object.

type BuildList

type BuildList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Build `json:"items"`
}

BuildList contains a list of Build

func (*BuildList) DeepCopy

func (in *BuildList) DeepCopy() *BuildList

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

func (*BuildList) DeepCopyInto

func (in *BuildList) DeepCopyInto(out *BuildList)

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

func (*BuildList) DeepCopyObject

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

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

type BuildPhase

type BuildPhase string

BuildPhase BuildStatus defines the observed state of Build

const (
	BuildPhasePending     BuildPhase = "Pending"
	BuildPhaseBuilding    BuildPhase = "Building"
	BuildPhaseTerminating BuildPhase = "Terminating"
	BuildPhaseCompleted   BuildPhase = "Completed"
	BuildPhaseFailed      BuildPhase = "Failed"
	BuildPhaseUnknown     BuildPhase = "Unknown"
)

type BuildSpec

type BuildSpec struct {
	// Paused can be used to prevent controllers from processing the Cluster and all its associated objects.
	// +optional
	Paused bool `json:"paused,omitempty"`

	// Connector is the connector to the infrastructure machine
	// e.g., connector: {type: "ssh", credentials: {name: "aws-credentials", namespace: "default"}}
	// +kubebuilder:validation:Required
	Connector ConnectorSpec `json:"connector"`

	// InfrastructureRef is a reference to the infrastructure object which contains the types of machines to build.
	// e.g. infrastructureRef: {kind: "AWSBuild", name: "ubuntu-2204"}
	// +kubebuilder:validation:Required
	InfrastructureRef *corev1.ObjectReference `json:"infrastructureRef"`

	// Provisioners is a list of provisioners to run on the infrastructure machine
	// +optional
	Provisioners []ProvisionerSpec `json:"provisioners,omitempty"`

	// DeleteCascade is a flag to specify whether the built image(s)
	// going to be cleaned up when the build is deleted.
	// +optional
	DeleteCascade bool `json:"deleteCascade,omitempty"`
}

BuildSpec defines the desired state of Build

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 {
	// FailureDomains is a slice of failure domain objects synced from the infrastructure provider.
	// +optional
	FailureDomains FailureDomains `json:"failureDomains,omitempty"`

	// FailureReason indicates that there is a fatal problem reconciling the
	// state, and will be set to a token value suitable for
	// programmatic interpretation.
	// +optional
	FailureReason *builderror.BuildStatusError `json:"failureReason,omitempty"`

	// FailureMessage indicates that there is a fatal problem reconciling the
	// state, and will be set to a descriptive error message.
	// +optional
	FailureMessage *string `json:"failureMessage,omitempty"`

	// Conditions define the current service state of the cluster.
	// +optional
	Conditions clusterv1.Conditions `json:"conditions,omitempty"`

	// InfrastructureReady is the state of the machine, which will be seted to true after it successfully in running state
	//+optional
	InfrastructureReady bool `json:"infrastructureReady,omitempty"`

	// Connected describes if the connection to the underlying infrastructure machine has been established
	//+optional
	Connected bool `json:"connected,omitempty"`

	// ProvisionersReady describes the state of provisioners for the Build
	// once all provisioners have finished successfully, this will be true
	//+optional
	ProvisionersReady bool `json:"provisionersReady,omitempty"`

	// Build Phase which is used to track the state of the build process
	// E.g. Pending, Building, Terminating, Failed etc.
	//+optional
	Phase string `json:"phase,omitempty"`

	// Ready is the state of the build process, true if machine image is ready, false if not
	//+optional
	Ready bool `json:"ready,omitempty"`
}

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.

func (*BuildStatus) GetTypedPhase

func (c *BuildStatus) GetTypedPhase() BuildPhase

GetTypedPhase attempts to parse the Phase field and return the typed ClusterPhase representation as described in `machine_phase_types.go`.

func (*BuildStatus) SetTypedPhase

func (c *BuildStatus) SetTypedPhase(p BuildPhase)

SetTypedPhase sets the Phase field to the string representation of ClusterPhase.

type Condition

type Condition struct {
	// Type of condition in CamelCase or in foo.example.com/CamelCase.
	// Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
	// can be useful (see .node.status.conditions), the ability to deconflict is important.
	Type clusterv1.ConditionType `json:"type"`

	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`

	// Severity provides an explicit classification of Reason code, so the users or machines can immediately
	// understand the current situation and act accordingly.
	// The Severity field MUST be set only when Status=False.
	// +optional
	Severity clusterv1.ConditionSeverity `json:"severity,omitempty"`

	// Last time the condition transitioned from one status to another.
	// This should be when the underlying condition changed. If that is not known, then using the time when
	// the API field changed is acceptable.
	LastTransitionTime metav1.Time `json:"lastTransitionTime"`

	// The reason for the condition's last transition in CamelCase.
	// The specific API may choose whether or not this field is considered a guaranteed API.
	// This field may not be empty.
	// +optional
	Reason string `json:"reason,omitempty"`

	// A human readable message indicating details about the transition.
	// This field may be empty.
	// +optional
	Message string `json:"message,omitempty"`
}

Condition defines an observation of a Cluster API resource operational state.

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

type ConnectionSpec

type ConnectionSpec struct {
	// Username is the username to connect to the infrastructure machine.
	// +required
	// +kubebuilder:default:="root"
	Username string `json:"username"`

	// CredentialsRef is a reference to the secret which contains the credentials to connect to the infrastructure machine.
	// The secret should contain the following keys:
	// - username: The username to connect to the machine
	// - password: The password for authentication (if applicable)
	// - privateKey: The SSH private key for authentication (if applicable)
	// +optional
	SSHCredentialsRef *corev1.SecretReference `json:"sshCredentialsRef,omitempty"`

	// GenerateSSHKey is a flag to specify whether the controller should generate a new private key for the connection.
	// GenerateSSHKey will take precedence over the privateKey in the secret.
	// +optional
	GenerateSSHKey bool `json:"generateSSHKey,omitempty"`
}

ConnectionSpec defines the schema of connector to the infrastructure machine.

func (*ConnectionSpec) DeepCopy

func (in *ConnectionSpec) DeepCopy() *ConnectionSpec

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

func (*ConnectionSpec) DeepCopyInto

func (in *ConnectionSpec) DeepCopyInto(out *ConnectionSpec)

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

type ConnectorSpec

type ConnectorSpec struct {
	// Type is the type of connector to the infrastructure machine.
	// e.g., type: "ssh"
	Type string `json:"type"`

	// Credentials is a reference to the secret containing the credentials to connect to the infrastructure machine
	// The secret should contain the following
	// - username
	// - password and/or privateKey
	// - host
	Credentials *corev1.LocalObjectReference `json:"credentials,omitempty"`
}

ConnectorSpec defines the connector to the infrastructure machine

func (*ConnectorSpec) DeepCopy

func (in *ConnectorSpec) DeepCopy() *ConnectorSpec

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

func (*ConnectorSpec) DeepCopyInto

func (in *ConnectorSpec) DeepCopyInto(out *ConnectorSpec)

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

type FailureDomainSpec

type FailureDomainSpec struct {
	// Infrastructure determines if this failure domain is suitable for use by infrastructure machines.
	// +optional
	Infrastructure bool `json:"controlPlane,omitempty"`

	// Attributes is a free form map of attributes an infrastructure provider might use or require.
	// +optional
	Attributes map[string]string `json:"attributes,omitempty"`
}

FailureDomainSpec is the Schema for Forge API failure domains. It allows controllers to understand how many failure domains a build can optionally span across.

func (*FailureDomainSpec) DeepCopy

func (in *FailureDomainSpec) DeepCopy() *FailureDomainSpec

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

func (*FailureDomainSpec) DeepCopyInto

func (in *FailureDomainSpec) DeepCopyInto(out *FailureDomainSpec)

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

type FailureDomains

type FailureDomains map[string]FailureDomainSpec

FailureDomains is a slice of FailureDomains.

func (FailureDomains) DeepCopy

func (in FailureDomains) DeepCopy() FailureDomains

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

func (FailureDomains) DeepCopyInto

func (in FailureDomains) DeepCopyInto(out *FailureDomains)

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

func (FailureDomains) FilterControlPlane

func (in FailureDomains) FilterControlPlane() FailureDomains

FilterControlPlane returns a FailureDomain slice containing only the domains suitable to be used for control plane nodes.

func (FailureDomains) GetIDs

func (in FailureDomains) GetIDs() []*string

GetIDs returns a slice containing the ids for failure domains.

type ProvisionerSpec

type ProvisionerSpec struct {
	// UUID is the unique identifier of the provisioner
	// +optional
	UUID *string `json:"uuid,omitempty"`

	// Type is the type of provisioner to run on the infrastructure machine
	// e.g., type: "builtin" or type: "external"
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Enum=built-in/shell;external
	Type ProvisionerType `json:"type"`

	// AllowFail is a flag to allow the provisioner to fail
	// +optional
	AllowFail bool `json:"allowFail,omitempty"`

	// Run is the command to run on the infrastructure machine
	// +optional
	Run *string `json:"run,omitempty"`

	// RunConfigMapRef is the reference of the configmap containing the script to run on the infrastructure machine
	// +optional
	RunConfigMapRef *corev1.ObjectReference `json:"runConfigMapRef,omitempty"`

	// Ref is a reference to the provisioner object which contains the types of provisioners to run.
	Ref *corev1.ObjectReference `json:"ref,omitempty"`

	// Retries is the number of retries for the provisioner
	// before marking it as failed
	// +optional
	// +kube:validation:Minimum=0
	// +kube:validation:default=1
	Retries *int32 `json:"retries,omitempty"`

	// Status is the status of the provisioner
	// +optional
	// +kubebuilder:validation:Enum=Pending;Running;Completed;Failed;Unknown
	// +kubebuilder:default="Pending"
	Status *ProvisionerStatus `json:"status,omitempty"`

	// FailureReason is the reason of the provisioner failure
	// +optional
	FailureReason *string `json:"failureReason,omitempty"`

	// FailureMessage is the message of the provisioner failure
	// +optional
	FailureMessage *string `json:"failureMessage,omitempty"`
}

ProvisionerSpec defines the provisioner to run on the infrastructure machine

func (*ProvisionerSpec) DeepCopy

func (in *ProvisionerSpec) DeepCopy() *ProvisionerSpec

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

func (*ProvisionerSpec) DeepCopyInto

func (in *ProvisionerSpec) DeepCopyInto(out *ProvisionerSpec)

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

type ProvisionerStatus

type ProvisionerStatus string
const (
	ProvisionerStatusPending   ProvisionerStatus = "Pending"
	ProvisionerStatusRunning   ProvisionerStatus = "Running"
	ProvisionerStatusCompleted ProvisionerStatus = "Completed"
	ProvisionerStatusFailed    ProvisionerStatus = "Failed"
	ProvisionerStatusUnknown   ProvisionerStatus = "Unknown"
)

type ProvisionerType

type ProvisionerType string
const (
	ProvisionerTypeShell    ProvisionerType = "built-in/shell"
	ProvisionerTypeExternal ProvisionerType = "external"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳