v1beta1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 18 Imported by: 5

Documentation

Overview

Package v1beta1 contains API Schema definitions for the baremetal v1beta1 API group +kubebuilder:object:generate=true +groupName=baremetal.openstack.org

Index

Constants

View Source
const (
	//
	// OpenStackProvisionServer conditions
	//
	// OpenStackProvisionServerReadyCondition Status=True condition which indicates if the OpenStackProvisionServer is configured and operational
	OpenStackProvisionServerReadyCondition condition.Type = "OpenStackProvisionServerReady"

	// OpenStackProvisionServerProvIntfReadyCondition Status=True condition which indicates if the OpenStackProvisionServer was provided or otherwise able to find the provisioning interface
	OpenStackProvisionServerProvIntfReadyCondition condition.Type = "OpenStackProvisionServerProvIntfReady"

	// OpenStackProvisionServerLocalImageURLReadyCondition Status=True condition which indicates if the OpenStackProvisionServer's LocalImageURL has been successfully acquired from the provisioning agent
	OpenStackProvisionServerLocalImageURLReadyCondition condition.Type = "OpenStackProvisionServerLocalImageURLReady"

	//
	// OpenStackBaremetalSet conditions
	//
	// OpenStackBaremetalSetReadyCondition Status=True condition which indicates if the OpenStackBaremetalSet is fully provisioned
	OpenStackBaremetalSetReadyCondition condition.Type = "OpenStackBaremetalSetReady"

	// OpenStackBaremetalSetProvServerReadyCondition Status=True condition which indicates if the OpenStackBaremetalSet's OpenStackProvisionServer is ready to serve its image
	OpenStackBaremetalSetProvServerReadyCondition condition.Type = "OpenStackBaremetalSetProvServerReady"

	// OpenStackBaremetalSetBmhProvisioningReadyCondition Status=True condition which indicates if the OpenStackBaremetalSet's requested BMHs have been provisioned
	OpenStackBaremetalSetBmhProvisioningReadyCondition condition.Type = "OpenStackBaremetalSetBmhProvisioningReady"
)

OpenStack Baremetal Condition Types used by API objects.

View Source
const (
	//
	// OpenStackProvisionServerReady condition messages
	//
	// OpenStackProvisionServerReadyInitMessage
	OpenStackProvisionServerReadyInitMessage = "OpenStackProvisionServer not started"

	// OpenStackProvisionServerReadyErrorMessage
	OpenStackProvisionServerReadyErrorMessage = "OpenStackProvisionServer error occured %s"

	//
	// OpenStackProvisionServerProvIntfReady condition messages
	//
	// OpenStackProvisionServerProvIntfReadyInitMessage
	OpenStackProvisionServerProvIntfReadyInitMessage = "OpenStackProvisionServerProvIntf not started"

	// OpenStackProvisionServerProvIntfReadyErrorMessage
	OpenStackProvisionServerProvIntfReadyErrorMessage = "OpenStackProvisionServerProvIntf error occured %s"

	// OpenStackProvisionServerProvIntfReadyMessage
	OpenStackProvisionServerProvIntfReadyMessage = "OpenStackProvisionServerProvIntf found"

	//
	// OpenStackProvisionServerLocalImageURLReady condition messages
	//
	// OpenStackProvisionServerLocalImageURLReadyInitMessage
	OpenStackProvisionServerLocalImageURLReadyInitMessage = "OpenStackProvisionServerLocalImageURL not started"

	// OpenStackProvisionServerLocalImageURLReadyErrorMessage
	OpenStackProvisionServerLocalImageURLReadyErrorMessage = "OpenStackProvisionServerLocalImageURL error occured %s"

	// OpenStackProvisionServerLocalImageURLReadyRunningMessage
	OpenStackProvisionServerLocalImageURLReadyRunningMessage = "OpenStackProvisionServerLocalImageURL generation in progress"

	// OpenStackProvisionServerLocalImageURLReadyMessage
	OpenStackProvisionServerLocalImageURLReadyMessage = "OpenStackProvisionServerLocalImageURL generated"

	//
	// OpenStackBaremetalSetReady condition messages
	//
	// OpenStackBaremetalSetReadyInitMessage
	OpenStackBaremetalSetReadyInitMessage = "OpenStackBaremetalSet not started"

	// OpenStackBaremetalSetReadyErrorMessage
	OpenStackBaremetalSetReadyErrorMessage = "OpenStackBaremetalSet error occured %s"

	//
	// OpenStackBaremetalSetProvServerReady condition messages
	//
	// OpenStackBaremetalSetProvServerReadyInitMessage
	OpenStackBaremetalSetProvServerReadyInitMessage = "OpenStackBaremetalSet provision server not started"

	// OpenStackBaremetalSetProvServerReadyWaitingMessage
	OpenStackBaremetalSetProvServerReadyWaitingMessage = "OpenStackBaremetalSet waiting for provision server creation"

	// OpenStackBaremetalSetProvServerReadyRunningMessage
	OpenStackBaremetalSetProvServerReadyRunningMessage = "OpenStackBaremetalSet provision server deployment in progress"

	// OpenStackBaremetalSetProvServerReadyErrorMessage
	OpenStackBaremetalSetProvServerReadyErrorMessage = "OpenStackBaremetalSet provision server error occured %s"

	// OpenStackBaremetalSetProvServerReadyMessage
	OpenStackBaremetalSetProvServerReadyMessage = "OpenStackBaremetalSet provision server ready"

	//
	// OpenStackBaremetalSetBmhProvisioningReady condition messages
	//
	// OpenStackBaremetalSetBmhProvisioningReadyInitMessage
	OpenStackBaremetalSetBmhProvisioningReadyInitMessage = "OpenStackBaremetalSet BMH provisioning not started"

	// OpenStackBaremetalSetBmhProvisioningReadyRunningMessage
	OpenStackBaremetalSetBmhProvisioningReadyRunningMessage = "OpenStackBaremetalSet BMH provisioning in progress"

	// OpenStackBaremetalSetBmhProvisioningReadyErrorMessage
	OpenStackBaremetalSetBmhProvisioningReadyErrorMessage = "OpenStackBaremetalSet BMH provisioning error occured %s"

	// OpenStackBaremetalSetBmhProvisioningReadyMessage
	OpenStackBaremetalSetBmhProvisioningReadyMessage = "OpenStackBaremetalSet BMH provisioning completed"
)

Common Messages used by API objects.

View Source
const (
	// OSContainerImage - default fall-back image for OpenStackProvisionServer int container
	OSContainerImage = "quay.io/podified-antelope-centos9/edpm-hardened-uefi:current-podified"
	// AgentImage - default fall-back image for OpenStackProvisionServer agent
	AgentImage = "quay.io/openstack-k8s-operators/openstack-baremetal-operator-agent:latest"
	// ApacheImage - default fall-back image for Apache
	ApacheImage = "registry.redhat.io/rhel8/httpd-24:latest"
	// OSImage - default fall-back image name for qcow2 image found inside OSContainerImage
	OSImage = "edpm-hardened-uefi.qcow2"
)
View Source
const (
	// ServiceName -
	ServiceName = "openstackbaremetalset"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "baremetal.openstack.org", Version: "v1beta1"}

	// 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

func AssignProvisionServerPort

func AssignProvisionServerPort(
	ctx context.Context,
	c goClient.Client,
	instance *OpenStackProvisionServer,
	portStart int32,
) error

AssignProvisionServerPort - Assigns an Apache listening port for a particular OpenStackProvisionServer.

func GetBaremetalHosts

func GetBaremetalHosts(
	ctx context.Context,
	c goClient.Client,
	namespace string,
	labelSelector map[string]string,
) (*metal3v1alpha1.BareMetalHostList, error)

GetBaremetalHosts - Get all BaremetalHosts in the chosen namespace with (optional) labels

func GetExistingProvServerPorts

func GetExistingProvServerPorts(
	ctx context.Context,
	c goClient.Client,
	instance *OpenStackProvisionServer,
) (map[string]int32, error)

GetExistingProvServerPorts - Get all ports currently in use by all OpenStackProvisionServers in this namespace

func SetupDefaults

func SetupDefaults()

SetupDefaults - initializes any CRD field defaults based on environment variables (the defaulting mechanism itself is implemented via webhooks) TODO: Move this to a common location if OpenStackBaremetalSets ever get added as well

func SetupOpenStackProvisionServerDefaults

func SetupOpenStackProvisionServerDefaults(defaults OpenStackProvisionServerDefaults)

SetupOpenStackProvisionServerDefaults - initialize OpenStackProvisionServer spec defaults for use with either internal or external webhooks

func VerifyBaremetalSetScaleDown

func VerifyBaremetalSetScaleDown(
	instance *OpenStackBaremetalSet,
	existingBmhs *metal3v1alpha1.BareMetalHostList,
	removalAnnotatedBmhCount int) error

VerifyBaremetalSetScaleDown - TODO: not needed at the current moment

func VerifyBaremetalSetScaleUp

func VerifyBaremetalSetScaleUp(
	l logr.Logger,
	instance *OpenStackBaremetalSet,
	allBmhs *metal3v1alpha1.BareMetalHostList,
	existingBmhs *metal3v1alpha1.BareMetalHostList) ([]string, error)

VerifyBaremetalSetScaleUp -

func VerifyBaremetalStatusBmhRefs

func VerifyBaremetalStatusBmhRefs(
	ctx context.Context,
	c goClient.Client,
	instance *OpenStackBaremetalSet,
) error

VerifyBaremetalStatusBmhRefs - Verify that BMHs haven't been improperly deleted outside of our prescribed annotate-and-scale-count-down method. If bad deletions have occurred, we return an error to halt further reconciliation that could lead to an inconsistent state for instance.Status.BaremetalHosts.

Types

type AutomatedCleaningMode

type AutomatedCleaningMode string

AutomatedCleaningMode is the interface to enable/disable automated cleaning +kubebuilder:validation:Enum=metadata;disabled

const (
	CleaningModeDisabled AutomatedCleaningMode = "disabled"
	CleaningModeMetadata AutomatedCleaningMode = "metadata"
)

Allowed automated cleaning modes

type CPUCountReq

type CPUCountReq struct {
	// +kubebuilder:validation:Minimum=1
	Count int `json:"count,omitempty"`
	// If ExactMatch == false, actual count > Count will match
	ExactMatch bool `json:"exactMatch,omitempty"`
}

CPUCountReq defines a specific hardware request for CPU core count

func (*CPUCountReq) DeepCopy

func (in *CPUCountReq) DeepCopy() *CPUCountReq

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

func (*CPUCountReq) DeepCopyInto

func (in *CPUCountReq) DeepCopyInto(out *CPUCountReq)

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

type CPUMhzReq

type CPUMhzReq struct {
	// +kubebuilder:validation:Minimum=1
	Mhz int `json:"mhz,omitempty"`
	// If ExactMatch == false, actual mhz > Mhz will match
	ExactMatch bool `json:"exactMatch,omitempty"`
}

CPUMhzReq defines a specific hardware request for CPU clock speed

func (*CPUMhzReq) DeepCopy

func (in *CPUMhzReq) DeepCopy() *CPUMhzReq

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

func (*CPUMhzReq) DeepCopyInto

func (in *CPUMhzReq) DeepCopyInto(out *CPUMhzReq)

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

type CPUReqs

type CPUReqs struct {
	// Arch is a scalar (string) because it wouldn't make sense to give it an "exact-match" option
	// Can be either "x86_64" or "ppc64le" if included
	// +kubebuilder:validation:Enum=x86_64;ppc64le
	Arch     string      `json:"arch,omitempty"`
	CountReq CPUCountReq `json:"countReq,omitempty"`
	MhzReq   CPUMhzReq   `json:"mhzReq,omitempty"`
}

CPUReqs defines specific CPU hardware requests

func (*CPUReqs) DeepCopy

func (in *CPUReqs) DeepCopy() *CPUReqs

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

func (*CPUReqs) DeepCopyInto

func (in *CPUReqs) DeepCopyInto(out *CPUReqs)

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

type DiskGbReq

type DiskGbReq struct {
	// +kubebuilder:validation:Minimum=1
	Gb int `json:"gb,omitempty"`
	// If ExactMatch == false, actual GB > Gb will match
	ExactMatch bool `json:"exactMatch,omitempty"`
}

DiskGbReq defines a specific hardware request for disk size

func (*DiskGbReq) DeepCopy

func (in *DiskGbReq) DeepCopy() *DiskGbReq

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

func (*DiskGbReq) DeepCopyInto

func (in *DiskGbReq) DeepCopyInto(out *DiskGbReq)

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

type DiskReqs

type DiskReqs struct {
	GbReq DiskGbReq `json:"gbReq,omitempty"`
	// SSD is scalar (bool) because it wouldn't make sense to give it an "exact-match" option
	SSDReq DiskSSDReq `json:"ssdReq,omitempty"`
}

DiskReqs defines specific disk hardware requests

func (*DiskReqs) DeepCopy

func (in *DiskReqs) DeepCopy() *DiskReqs

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

func (*DiskReqs) DeepCopyInto

func (in *DiskReqs) DeepCopyInto(out *DiskReqs)

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

type DiskSSDReq

type DiskSSDReq struct {
	SSD bool `json:"ssd,omitempty"`
	// We only actually care about SSD flag if it is true or ExactMatch is set to true.
	// This second flag is necessary as SSD's bool zero-value (false) is indistinguishable
	// from it being explicitly set to false
	ExactMatch bool `json:"exactMatch,omitempty"`
}

DiskSSDReq defines a specific hardware request for disk of type SSD (true) or rotational (false)

func (*DiskSSDReq) DeepCopy

func (in *DiskSSDReq) DeepCopy() *DiskSSDReq

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

func (*DiskSSDReq) DeepCopyInto

func (in *DiskSSDReq) DeepCopyInto(out *DiskSSDReq)

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

type HardwareReqs

type HardwareReqs struct {
	CPUReqs  CPUReqs  `json:"cpuReqs,omitempty"`
	MemReqs  MemReqs  `json:"memReqs,omitempty"`
	DiskReqs DiskReqs `json:"diskReqs,omitempty"`
}

HardwareReqs defines request hardware attributes for the BaremetalHost replicas

func (*HardwareReqs) DeepCopy

func (in *HardwareReqs) DeepCopy() *HardwareReqs

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

func (*HardwareReqs) DeepCopyInto

func (in *HardwareReqs) DeepCopyInto(out *HardwareReqs)

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

type HostStatus

type HostStatus struct {

	// +kubebuilder:validation:Required
	// IPStatus -
	IPStatus `json:",inline"`

	ProvisioningState ProvisioningState `json:"provisioningState"`

	// +kubebuilder:default=false
	// Host annotated for deletion
	AnnotatedForDeletion bool `json:"annotatedForDeletion"`

	UserDataSecretName    string `json:"userDataSecretName"`
	NetworkDataSecretName string `json:"networkDataSecretName"`
}

HostStatus represents the IPStatus and provisioning state + deployment information

func (*HostStatus) DeepCopy

func (in *HostStatus) DeepCopy() *HostStatus

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

func (*HostStatus) DeepCopyInto

func (in *HostStatus) DeepCopyInto(out *HostStatus)

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

type IPStatus

type IPStatus struct {
	Hostname string `json:"hostname"`

	// +kubebuilder:default=unassigned
	BmhRef string `json:"bmhRef"`

	// +kubebuilder:validation:Optional
	IPAddresses map[string]string `json:"ipAddresses"`
}

IPStatus represents the hostname and IP info for a specific host

func (*IPStatus) DeepCopy

func (in *IPStatus) DeepCopy() *IPStatus

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

func (*IPStatus) DeepCopyInto

func (in *IPStatus) DeepCopyInto(out *IPStatus)

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

type InstanceSpec

type InstanceSpec struct {
	// +kubebuilder:validation:Optional
	// CtlPlaneIP - Control Plane IP
	CtlPlaneIP string `json:"ctlPlaneIP"`
	// +kubebuilder:validation:Optional
	// UserData - Host User Data
	UserData *corev1.SecretReference `json:"userData,omitempty"`
	// +kubebuilder:validation:Optional
	// NetworkData - Host Network Data
	NetworkData *corev1.SecretReference `json:"networkData,omitempty"`
}

InstanceSpec Instance specific attributes

func (*InstanceSpec) DeepCopy

func (in *InstanceSpec) DeepCopy() *InstanceSpec

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

func (*InstanceSpec) DeepCopyInto

func (in *InstanceSpec) DeepCopyInto(out *InstanceSpec)

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

type MemGbReq

type MemGbReq struct {
	// +kubebuilder:validation:Minimum=1
	Gb int `json:"gb,omitempty"`
	// If ExactMatch == false, actual GB > Gb will match
	ExactMatch bool `json:"exactMatch,omitempty"`
}

MemGbReq defines a specific hardware request for memory size

func (*MemGbReq) DeepCopy

func (in *MemGbReq) DeepCopy() *MemGbReq

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

func (*MemGbReq) DeepCopyInto

func (in *MemGbReq) DeepCopyInto(out *MemGbReq)

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

type MemReqs

type MemReqs struct {
	GbReq MemGbReq `json:"gbReq,omitempty"`
}

MemReqs defines specific memory hardware requests

func (*MemReqs) DeepCopy

func (in *MemReqs) DeepCopy() *MemReqs

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

func (*MemReqs) DeepCopyInto

func (in *MemReqs) DeepCopyInto(out *MemReqs)

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

type OpenStackBaremetalSet

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

	Spec   OpenStackBaremetalSetSpec   `json:"spec,omitempty"`
	Status OpenStackBaremetalSetStatus `json:"status,omitempty"`
}

OpenStackBaremetalSet is the Schema for the openstackbaremetalsets API

func (*OpenStackBaremetalSet) DeepCopy

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

func (*OpenStackBaremetalSet) DeepCopyInto

func (in *OpenStackBaremetalSet) DeepCopyInto(out *OpenStackBaremetalSet)

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

func (*OpenStackBaremetalSet) DeepCopyObject

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

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

func (*OpenStackBaremetalSet) IsReady

func (instance *OpenStackBaremetalSet) IsReady() bool

IsReady - returns true if all requested BMHs are provisioned

func (*OpenStackBaremetalSet) SetupWebhookWithManager

func (r *OpenStackBaremetalSet) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager - register this webhook with the controller manager

func (*OpenStackBaremetalSet) ValidateCreate

func (r *OpenStackBaremetalSet) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*OpenStackBaremetalSet) ValidateDelete

func (r *OpenStackBaremetalSet) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*OpenStackBaremetalSet) ValidateUpdate

func (r *OpenStackBaremetalSet) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type OpenStackBaremetalSetList

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

OpenStackBaremetalSetList contains a list of OpenStackBaremetalSet

func (*OpenStackBaremetalSetList) DeepCopy

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

func (*OpenStackBaremetalSetList) DeepCopyInto

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

func (*OpenStackBaremetalSetList) DeepCopyObject

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

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

type OpenStackBaremetalSetSpec

type OpenStackBaremetalSetSpec struct {
	// +kubebuilder:validation:Optional
	// BaremetalHosts - Map of hostname to Instance Spec for all nodes to provision
	BaremetalHosts map[string]InstanceSpec `json:"baremetalHosts,omitempty"`
	// +kubebuilder:validation:Optional
	// OSImage - OS qcow2 image Name
	OSImage string `json:"osImage,omitempty"`
	// +kubebuilder:validation:Optional
	// UserData holds the reference to the Secret containing the user
	// data to be passed to the host before it boots. UserData can be
	// set per host in BaremetalHosts or here. If none of these are
	// provided it will use a default cloud-config.
	UserData *corev1.SecretReference `json:"userData,omitempty"`
	// +kubebuilder:validation:Optional
	// NetworkData holds the reference to the Secret containing network
	// data to be passed to the hosts. NetworkData can be set per host in
	// BaremetalHosts or here. If none of these are provided it will use
	// default NetworkData to configure CtlPlaneIP.
	NetworkData *corev1.SecretReference `json:"networkData,omitempty"`
	// When set to disabled, automated cleaning will be avoided
	// during provisioning and deprovisioning.
	// +kubebuilder:default=metadata
	// +kubebuilder:validation:Optional
	AutomatedCleaningMode AutomatedCleaningMode `json:"automatedCleaningMode,omitempty"`
	// ProvisionServerName - Optional. If supplied will be used as the base Image for the baremetalset instead of baseImageURL.
	// +kubebuilder:validation:Optional
	ProvisionServerName string `json:"provisionServerName,omitempty"`
	// ProvisioningInterface - Optional. If not provided along with ProvisionServerName, it would be discovered from CBO.  This is the provisioning interface on the OCP masters/workers.
	// +kubebuilder:validation:Optional
	ProvisioningInterface string `json:"provisioningInterface,omitempty"`
	// DeploymentSSHSecret - Name of secret holding the cloud-admin ssh keys
	DeploymentSSHSecret string `json:"deploymentSSHSecret"`
	// CtlplaneInterface - Interface on the provisioned nodes to use for ctlplane network
	CtlplaneInterface string `json:"ctlplaneInterface"`
	// CtlplaneGateway - IP of gateway for ctrlplane network (TODO: acquire this is another manner?)
	// +kubebuilder:validation:Optional
	CtlplaneGateway string `json:"ctlplaneGateway,omitempty"`
	// +kubebuilder:validation:Optional
	// +kubebuilder:default="255.255.255.0"
	// CtlplaneNetmask - Netmask to use for ctlplane network (TODO: acquire this is another manner?)
	CtlplaneNetmask string `json:"ctlplaneNetmask,omitempty"`
	// +kubebuilder:default=openshift-machine-api
	// +kubebuilder:validation:Optional
	// BmhNamespace Namespace to look for BaremetalHosts(default: openshift-machine-api)
	BmhNamespace string `json:"bmhNamespace,omitempty"`
	// +kubebuilder:validation:Optional
	// BmhLabelSelector allows for a sub-selection of BaremetalHosts based on arbitrary labels
	BmhLabelSelector map[string]string `json:"bmhLabelSelector,omitempty"`
	// +kubebuilder:validation:Optional
	// Hardware requests for sub-selection of BaremetalHosts with certain hardware specs
	HardwareReqs HardwareReqs `json:"hardwareReqs,omitempty"`
	// +kubebuilder:validation:Optional
	// PasswordSecret the name of the secret used to optionally set the root pwd by adding
	// NodeRootPassword: <base64 enc pwd>
	// to the secret data
	PasswordSecret *corev1.SecretReference `json:"passwordSecret,omitempty"`
	// +kubebuilder:default=cloud-admin
	// CloudUser to be configured for remote access
	CloudUserName string `json:"cloudUserName"`
	// DomainName is the domain name that will be set on the underlying Metal3 BaremetalHosts (TODO: acquire this is another manner?)
	// +kubebuilder:validation:Optional
	DomainName string `json:"domainName,omitempty"`
	// +kubebuilder:validation:Optional
	// BootstrapDNS - initial DNS nameserver values to set on the BaremetalHosts when they are provisioned.
	// Note that subsequent deployment will overwrite these values
	BootstrapDNS []string `json:"bootstrapDns,omitempty"`
	// +kubebuilder:validation:Optional
	// DNSSearchDomains - initial DNS nameserver values to set on the BaremetalHosts when they are provisioned.
	// Note that subsequent deployment will overwrite these values
	DNSSearchDomains []string `json:"dnsSearchDomains,omitempty"`
}

OpenStackBaremetalSetSpec defines the desired state of OpenStackBaremetalSet

func (*OpenStackBaremetalSetSpec) DeepCopy

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

func (*OpenStackBaremetalSetSpec) DeepCopyInto

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

type OpenStackBaremetalSetStatus

type OpenStackBaremetalSetStatus struct {
	// Conditions
	Conditions condition.Conditions `json:"conditions,omitempty" optional:"true"`
	// Map of hashes to track e.g. job status
	Hash map[string]string `json:"hash,omitempty"`
	// BaremetalHosts that are being processed or have been processed for this OpenStackBaremetalSet
	BaremetalHosts map[string]HostStatus `json:"baremetalHosts,omitempty" optional:"true"`
}

OpenStackBaremetalSetStatus defines the observed state of OpenStackBaremetalSet

func (*OpenStackBaremetalSetStatus) DeepCopy

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

func (*OpenStackBaremetalSetStatus) DeepCopyInto

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

type OpenStackProvisionServer

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

	Spec   OpenStackProvisionServerSpec   `json:"spec,omitempty"`
	Status OpenStackProvisionServerStatus `json:"status,omitempty"`
}

OpenStackProvisionServer used to serve custom images for baremetal provisioning with Metal3

func (*OpenStackProvisionServer) DeepCopy

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

func (*OpenStackProvisionServer) DeepCopyInto

func (in *OpenStackProvisionServer) DeepCopyInto(out *OpenStackProvisionServer)

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

func (*OpenStackProvisionServer) DeepCopyObject

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

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

func (*OpenStackProvisionServer) Default

func (r *OpenStackProvisionServer) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*OpenStackProvisionServer) IsReady

func (instance *OpenStackProvisionServer) IsReady() bool

IsReady - returns true if service is ready to serve requests

func (OpenStackProvisionServer) RbacConditionsSet

func (instance OpenStackProvisionServer) RbacConditionsSet(c *condition.Condition)

RbacConditionsSet - set the conditions for the rbac object

func (OpenStackProvisionServer) RbacNamespace

func (instance OpenStackProvisionServer) RbacNamespace() string

RbacNamespace - return the namespace

func (OpenStackProvisionServer) RbacResourceName

func (instance OpenStackProvisionServer) RbacResourceName() string

RbacResourceName - return the name to be used for rbac objects (serviceaccount, role, rolebinding)

func (*OpenStackProvisionServer) SetupWebhookWithManager

func (r *OpenStackProvisionServer) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager - register this webhook with the controller manager

func (*OpenStackProvisionServer) ValidateCreate

func (r *OpenStackProvisionServer) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*OpenStackProvisionServer) ValidateDelete

func (r *OpenStackProvisionServer) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*OpenStackProvisionServer) ValidateUpdate

func (r *OpenStackProvisionServer) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type OpenStackProvisionServerDefaults

type OpenStackProvisionServerDefaults struct {
	OSContainerImageURL string
	AgentImageURL       string
	ApacheImageURL      string
	OSImage             string
}

OpenStackProvisionServerDefaults -

func (*OpenStackProvisionServerDefaults) DeepCopy

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

func (*OpenStackProvisionServerDefaults) DeepCopyInto

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

type OpenStackProvisionServerList

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

OpenStackProvisionServerList contains a list of OpenStackProvisionServer

func (*OpenStackProvisionServerList) DeepCopy

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

func (*OpenStackProvisionServerList) DeepCopyInto

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

func (*OpenStackProvisionServerList) DeepCopyObject

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

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

type OpenStackProvisionServerSpec

type OpenStackProvisionServerSpec struct {
	// Port - The port on which the Apache server should listen
	Port int32 `json:"port"`
	// +kubebuilder:validation:Optional
	// Interface - An optional interface to use instead of the cluster's default provisioning interface (if any)
	Interface string `json:"interface,omitempty"`
	// OSImage - OS qcow2 image (compressed as gz, or uncompressed)
	OSImage string `json:"osImage"`
	// OSContainerImageURL - Container image URL for init with the OS qcow2 image (osImage)
	OSContainerImageURL string `json:"osContainerImageUrl"`
	// ApacheImageURL - Container image URL for the main container that serves the downloaded OS qcow2 image (osImage)
	ApacheImageURL string `json:"apacheImageUrl"`
	// AgentImageURL - Container image URL for the sidecar container that discovers provisioning network IPs
	AgentImageURL string `json:"agentImageUrl"`
	// +kubebuilder:validation:Optional
	// NodeSelector to target subset of worker nodes running this provision server
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// +kubebuilder:validation:Optional
	// Resources - Compute Resources required by this provision server (Limits/Requests).
	// https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	// +kubebuilder:validation:Required
	// ServiceAccount - service account name used internally to provide ProvisionServer the default SA name
	// +kubebuilder:default="provisionserver"
	ServiceAccount string `json:"serviceAccount"`
}

OpenStackProvisionServerSpec defines the desired state of OpenStackProvisionServer

func (*OpenStackProvisionServerSpec) DeepCopy

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

func (*OpenStackProvisionServerSpec) DeepCopyInto

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

type OpenStackProvisionServerStatus

type OpenStackProvisionServerStatus struct {
	// ReadyCount of provision server Apache instances
	ReadyCount int32 `json:"readyCount,omitempty"`
	// Conditions
	Conditions condition.Conditions `json:"conditions,omitempty" optional:"true"`
	// Map of hashes to track e.g. job status
	Hash map[string]string `json:"hash,omitempty"`
	// IP of the provisioning interface on the node running the ProvisionServer pod
	ProvisionIP string `json:"provisionIp,omitempty"`
	// URL of provisioning image on underlying Apache web server
	LocalImageURL string `json:"localImageUrl,omitempty"`
}

OpenStackProvisionServerStatus defines the observed state of OpenStackProvisionServer

func (*OpenStackProvisionServerStatus) DeepCopy

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

func (*OpenStackProvisionServerStatus) DeepCopyInto

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

type ProvisioningState

type ProvisioningState string

ProvisioningState - the overall state of a BMH

Jump to

Keyboard shortcuts

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