Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group. +kubebuilder:object:generate=true +groupName=kanod.io
Index ¶
- Constants
- Variables
- type HardwareReference
- type HostAddress
- type HostAddressType
- type HostAddresses
- type HostClaim
- type HostClaimList
- type HostClaimSpec
- type HostClaimStatus
- type HostQuota
- type HostQuotaList
- type HostQuotaSpec
- type HostQuotaStatus
- type HostSelector
- type HostSelectorRequirement
- type HostStatusError
- type Image
- type NIC
- type ProvisionState
- type Quota
Constants ¶
const ( HostDomain = "host.kanod.io" HostFinalizer = "host.kanod.io" PausedAnnotation = "kanod.io/paused" SyncedLabelsAnnotation = "kanod.io/synced-labels" SyncedAnnotationsAnnotation = "kanod.io/synced-annotations" HostKindLabel = "host.kanod.io/kind" )
const ( // AssociateBMHCondition documents the status of associated the Host with a BaremetalHost. AssociateBMHCondition = "AssociateBMH" // WaitingForClusterInfrastructureReason used when waiting for cluster // infrastructure to be ready before proceeding. // WaitingForClusterInfrastructureReason = "WaitingForClusterInfrastructure" // WaitingForBootstrapReadyReason used when waiting for bootstrap to be ready before proceeding. // WaitingForBootstrapReadyReason = "WaitingForBootstrapReady" // MissingBMHReason used when BMH is not yet accessible MissingBMHReason = "MissingBMH" // AssociateBMHFailedReason documents any errors while associating Host with a BaremetalHost. AssociateBMHFailedReason = "AssociateBMHFailed" // HostPausedReason is used when Host or Cluster is paused. HostPausedReason = "HostPaused" // PauseAnnotationRemoveFailedReason is used when failed to remove/check pause annotation on associated bmh. PauseAnnotationRemoveFailedReason = "PauseAnnotationRemoveFailed" // PauseAnnotationSetFailedReason is used when failed to set pause annotation on associated bmh. PauseAnnotationSetFailedReason = "PauseAnnotationSetFailed" // DeletingReason DeletingReason = "Deleting" // DeletionFailedReason DeletionFailedReason = "DeletionFailed" // HostAssociatedReason is used when condition is true HostAssociatedReason = "HostAssociated" )
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "kanod.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type HardwareReference ¶ added in v0.2.0
type HardwareReference struct {
// `namespace` is the namespace of the HardwareDetail bound
Namespace string `json:"namespace"`
// `name` is the name of the HardwareDetail bound
Name string `json:"name"`
}
func (*HardwareReference) DeepCopy ¶ added in v0.2.0
func (in *HardwareReference) DeepCopy() *HardwareReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HardwareReference.
func (*HardwareReference) DeepCopyInto ¶ added in v0.2.0
func (in *HardwareReference) DeepCopyInto(out *HardwareReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostAddress ¶
type HostAddress struct {
// Host address type identifies the source of the the address,
// one of Hostname, ExternalIP, InternalIP, ExternalDNS or InternalDNS.
Type HostAddressType `json:"type"`
// The machine address.
Address string `json:"address"`
}
HostAddress contains information for the node's address.
func (*HostAddress) DeepCopy ¶
func (in *HostAddress) DeepCopy() *HostAddress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostAddress.
func (*HostAddress) DeepCopyInto ¶
func (in *HostAddress) DeepCopyInto(out *HostAddress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostAddressType ¶
type HostAddressType string
HostAddressType describes a valid HostAddress type.
const ( HostHostName HostAddressType = "Hostname" HostExternalIP HostAddressType = "ExternalIP" HostInternalIP HostAddressType = "InternalIP" HostExternalDNS HostAddressType = "ExternalDNS" HostInternalDNS HostAddressType = "InternalDNS" )
Define the HostAddressType constants.
type HostAddresses ¶
type HostAddresses []HostAddress
HostAddresses is a slice of HostAddress items to be used by infrastructure providers.
func (HostAddresses) DeepCopy ¶
func (in HostAddresses) DeepCopy() HostAddresses
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostAddresses.
func (HostAddresses) DeepCopyInto ¶
func (in HostAddresses) DeepCopyInto(out *HostAddresses)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostClaim ¶
type HostClaim struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec HostClaimSpec `json:"spec,omitempty"`
Status HostClaimStatus `json:"status,omitempty"`
}
+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Whether the host is ready or not" +kubebuilder:printcolumn:name="Online",type="string",JSONPath=".spec.online",description="Whether the host is online or not" HostClaim is the Schema for the hostclaims API
func (*HostClaim) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostClaim.
func (*HostClaim) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HostClaim) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*HostClaim) GetConditions ¶
GetConditions returns the list of conditions for an HostClaim API object.
func (*HostClaim) SetConditions ¶
SetConditions will set the given conditions on an HostClaim object.
type HostClaimList ¶
type HostClaimList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []HostClaim `json:"items"`
}
HostClaimList contains a list of Host
func (*HostClaimList) DeepCopy ¶
func (in *HostClaimList) DeepCopy() *HostClaimList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostClaimList.
func (*HostClaimList) DeepCopyInto ¶
func (in *HostClaimList) DeepCopyInto(out *HostClaimList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HostClaimList) DeepCopyObject ¶
func (in *HostClaimList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HostClaimSpec ¶
type HostClaimSpec struct {
// Kind identifies the type of the target of the claim. If not set will default
// to host.kanod.io/kind selector
Kind string `json:"kind,omitempty"`
// Should the compute resource be powered on? Changing this value will trigger
// a change in power state of the host.
Online bool `json:"online"`
// ConsumerRef can be used to store information about something
// that is using a HostClaim. When it is not empty, the HostClaim is
// considered "in use".
ConsumerRef *corev1.ObjectReference `json:"consumerRef,omitempty"`
// Image holds the details of the image to be provisioned.
Image *Image `json:"image,omitempty"`
// UserData holds the reference to the Secret containing the user
// data to be passed to the host before it boots.
UserData *corev1.SecretReference `json:"userData,omitempty"`
// NetworkData holds the reference to the Secret containing network
// configuration (e.g content of network_data.json) which is passed
// to the Config Drive.
NetworkData *corev1.SecretReference `json:"networkData,omitempty"`
// MetaData holds the reference to the Secret containing host metadata
// (e.g. meta_data.json) which is passed to the Config Drive.
MetaData *corev1.SecretReference `json:"metaData,omitempty"`
// When set to disabled, automated cleaning of host disks will be skipped
// during provisioning and deprovisioning.
// +kubebuilder:validation:Enum:=metadata;disabled
// +optional
AutomatedCleaningMode *string `json:"automatedCleaningMode,omitempty"`
// HostSelector specifies matching criteria for labels on BareMetalHosts.
// This is used to limit the set of BareMetalHost objects considered for
// claiming for a metal3machine.
// +optional
HostSelector HostSelector `json:"hostSelector,omitempty"`
}
HostClaimSpec defines the desired state of Host
func (*HostClaimSpec) DeepCopy ¶
func (in *HostClaimSpec) DeepCopy() *HostClaimSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostClaimSpec.
func (*HostClaimSpec) DeepCopyInto ¶
func (in *HostClaimSpec) DeepCopyInto(out *HostClaimSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostClaimStatus ¶
type HostClaimStatus struct {
// LastUpdated identifies when this status was last observed.
// +optional
LastUpdated *metav1.Time `json:"lastUpdated,omitempty"`
// Conditions defines current service state of the Host.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Ready is the state of the HostClaim
// Value true means the reconciliation completed.
Ready bool `json:"ready,omitempty"`
// HardwareData is a pointer to the name of the bound HardwareData
// structure.
// +optional
HardwareData *HardwareReference `json:"hardwareData,omitempty"`
// HostUID is the UID of the underlying compute. It is used
// as ID by the capm3 controller.
// +optional
HostUID string `json:"hostUID,omitempty"`
// The MACAddress of the interface used to boot the underlying compute resource
BootMACAddress string `json:"bootMACAddress,omitempty"`
// The currently detected power state of the host. This field may get
// briefly out of sync with the actual state of the hardware while
// provisioning processes are running.
PoweredOn bool `json:"poweredOn,omitempty"`
}
HostClaimStatus defines the observed state of Host
func (*HostClaimStatus) DeepCopy ¶
func (in *HostClaimStatus) DeepCopy() *HostClaimStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostClaimStatus.
func (*HostClaimStatus) DeepCopyInto ¶
func (in *HostClaimStatus) DeepCopyInto(out *HostClaimStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostQuota ¶
type HostQuota struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec HostQuotaSpec `json:"spec,omitempty"`
Status HostQuotaStatus `json:"status,omitempty"`
}
+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="REQUEST",type="string",JSONPath=`.status.usedQuota` HostQuota is the Schema for the hostquotas API
func (*HostQuota) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostQuota.
func (*HostQuota) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HostQuota) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HostQuotaList ¶
type HostQuotaList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []HostQuota `json:"items"`
}
HostQuotaList contains a list of HostQuota
func (*HostQuotaList) DeepCopy ¶
func (in *HostQuotaList) DeepCopy() *HostQuotaList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostQuotaList.
func (*HostQuotaList) DeepCopyInto ¶
func (in *HostQuotaList) DeepCopyInto(out *HostQuotaList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HostQuotaList) DeepCopyObject ¶
func (in *HostQuotaList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HostQuotaSpec ¶
type HostQuotaSpec struct {
// Hard contains a list of Quota constraints
Hard []Quota `json:"hard,omitempty"`
}
HostQuotaSpec defines the desired state of HostQuota
func (*HostQuotaSpec) DeepCopy ¶
func (in *HostQuotaSpec) DeepCopy() *HostQuotaSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostQuotaSpec.
func (*HostQuotaSpec) DeepCopyInto ¶
func (in *HostQuotaSpec) DeepCopyInto(out *HostQuotaSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostQuotaStatus ¶
type HostQuotaStatus struct {
// Hard is a copy of the quota specified for which the last reconciliation was done.
Hard []Quota `json:"quotas,omitempty"`
// Used contains the host count/reource usage for each kind of constraint on hostclaims
Used []Quota `json:"used,omitempty"`
UsedQuota string `json:"usedQuota,omitempty"`
}
HostQuotaStatus defines the observed state of HostQuota
func (*HostQuotaStatus) DeepCopy ¶
func (in *HostQuotaStatus) DeepCopy() *HostQuotaStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostQuotaStatus.
func (*HostQuotaStatus) DeepCopyInto ¶
func (in *HostQuotaStatus) DeepCopyInto(out *HostQuotaStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostSelector ¶
type HostSelector struct {
// Key/value pairs of labels that must exist on a chosen BareMetalHost
// +optional
MatchLabels map[string]string `json:"matchLabels,omitempty"`
// Label match expressions that must be true on a chosen BareMetalHost
// +optional
MatchExpressions []HostSelectorRequirement `json:"matchExpressions,omitempty"`
}
HostSelector specifies matching criteria for labels on BareMetalHosts. This is used to limit the set of BareMetalHost objects considered for claiming for a Machine.
func (*HostSelector) DeepCopy ¶
func (in *HostSelector) DeepCopy() *HostSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostSelector.
func (*HostSelector) DeepCopyInto ¶
func (in *HostSelector) DeepCopyInto(out *HostSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostSelectorRequirement ¶
type HostSelectorRequirement struct {
Key string `json:"key"`
Operator selection.Operator `json:"operator"`
Values []string `json:"values"`
}
func (*HostSelectorRequirement) DeepCopy ¶
func (in *HostSelectorRequirement) DeepCopy() *HostSelectorRequirement
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostSelectorRequirement.
func (*HostSelectorRequirement) DeepCopyInto ¶
func (in *HostSelectorRequirement) DeepCopyInto(out *HostSelectorRequirement)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostStatusError ¶
type HostStatusError string
const ( CreateHostError HostStatusError = "CreateError" DeleteHostError HostStatusError = "DeleteError" UpdateHostError HostStatusError = "UpdateError" )
type Image ¶
type Image struct {
// URL is a location of an image to deploy.
URL string `json:"url"`
// Checksum is the checksum for the image.
Checksum string `json:"checksum,omitempty"`
// ChecksumType is the checksum algorithm for the image, e.g md5, sha256 or sha512.
// The special value "auto" can be used to detect the algorithm from the checksum.
// If missing, MD5 is used. If in doubt, use "auto".
// +kubebuilder:validation:Enum=md5;sha256;sha512;auto
// +optional
ChecksumType *string `json:"checksumType,omitempty"`
// DiskFormat contains the format of the image (raw, qcow2, ...).
// Needs to be set to raw for raw images streaming.
// Note live-iso means an iso referenced by the url will be live-booted
// and not deployed to disk, and in this case the checksum options
// are not required and if specified will be ignored.
// +kubebuilder:validation:Enum=raw;qcow2;vdi;vmdk;live-iso
// +optional
DiskFormat *string `json:"format,omitempty"`
}
Image holds the details of an image either to provisioned or that has been provisioned.
func (*Image) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image.
func (*Image) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NIC ¶
type NIC struct {
// The name of the network interface, e.g. "en0"
Name string `json:"name"`
// The device MAC address
MAC string `json:"MAC"`
// The IP address of the interface. This will be an IPv4 or IPv6 address
// if one is present. If both IPv4 and IPv6 addresses are present in a
// dual-stack environment, two nics will be output, one with each IP.
IP string `json:"ip,omitempty"`
// Whether the NIC is PXE Bootable
PXE bool `json:"pxe,omitempty"`
}
func (*NIC) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NIC.
func (*NIC) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProvisionState ¶
type ProvisionState string
ProvisionState describes synthetically the provisioning state of the underlying resource.
type Quota ¶
type Quota struct {
// LabelSelector contains a map of label/value for HostClaim selection
LabelSelector map[string]string `json:"labelSelector,omitempty"`
// LabelName contains the name of the label in the HostClaim resource
LabelName string `json:"labelName"`
// LabelName contains the value of the label in the HostClaim resource
LabelValue string `json:"labelValue,omitempty"`
// LabelName contains the limits
// if Aggregate is false : this limits is the maximum count of HostClaim resources
// if Aggregate is true : this limits is the maximum value of the aggragation of label values
Quantity int `json:"quantity"`
// Aggregate indicate if the label value must be aggregated
Aggregate bool `json:"aggregate,omitempty"`
}
Quota defines the max number of HostClaim (quota) for a given label or label/value
func (*Quota) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Quota.
func (*Quota) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.