v1alpha1

package
v0.11.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 6

Documentation

Overview

package v1alpha1 contains API Schema definitions for the infrastructure v1alpha1 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io +k8s:openapi-gen=true

package v1alpha1 contains API Schema definitions for the infrastructure v1alpha1 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io

Index

Constants

View Source
const (
	// OpenstackFloatingIPPoolReadyCondition reports on the current status of the floating ip pool. Ready indicates that the pool is ready to be used.
	OpenstackFloatingIPPoolReadyCondition = "OpenstackFloatingIPPoolReadyCondition"

	// MaxIPsReachedReason is set when the maximum number of floating IPs has been reached.
	MaxIPsReachedReason = "MaxIPsReached"

	// UnableToFindFloatingIPNetworkReason is used when the floating ip network is not found.
	UnableToFindNetwork = "UnableToFindNetwork"

	CreateServerError ServerStatusError = "CreateError"
)
View Source
const (
	// OpenStackFloatingIPPoolFinalizer allows ReconcileOpenStackFloatingIPPool to clean up resources associated with OpenStackFloatingIPPool before
	// removing it from the apiserver.
	OpenStackFloatingIPPoolFinalizer = "openstackfloatingippool.infrastructure.cluster.x-k8s.io"

	OpenStackFloatingIPPoolNameIndex = "spec.poolRef.name"

	// OpenStackFloatingIPPoolIP.
	DeleteFloatingIPFinalizer = "openstackfloatingippool.infrastructure.cluster.x-k8s.io/delete-floating-ip"
)
View Source
const (
	// OpenStackServerFinalizer allows ReconcileOpenStackServer to clean up resources associated with OpenStackServer before
	// removing it from the apiserver.
	OpenStackServerFinalizer = "openstackserver.infrastructure.cluster.x-k8s.io"
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

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

Functions

This section is empty.

Types

type OpenStackFloatingIPPool

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

	Spec   OpenStackFloatingIPPoolSpec   `json:"spec,omitempty"`
	Status OpenStackFloatingIPPoolStatus `json:"status,omitempty"`
}

OpenStackFloatingIPPool is the Schema for the openstackfloatingippools API.

func (*OpenStackFloatingIPPool) DeepCopy

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

func (*OpenStackFloatingIPPool) DeepCopyInto

func (in *OpenStackFloatingIPPool) DeepCopyInto(out *OpenStackFloatingIPPool)

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

func (*OpenStackFloatingIPPool) DeepCopyObject

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

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

func (*OpenStackFloatingIPPool) GetConditions

func (r *OpenStackFloatingIPPool) GetConditions() clusterv1.Conditions

GetConditions returns the observations of the operational state of the OpenStackFloatingIPPool resource.

func (*OpenStackFloatingIPPool) GetFloatingIPTag

func (r *OpenStackFloatingIPPool) GetFloatingIPTag() string

func (*OpenStackFloatingIPPool) GetIdentityRef added in v0.11.0

GetIdentifyRef returns the FloatingIPPool's namespace and IdentityRef.

func (*OpenStackFloatingIPPool) SetConditions

func (r *OpenStackFloatingIPPool) SetConditions(conditions clusterv1.Conditions)

SetConditions sets the underlying service state of the OpenStackFloatingIPPool to the predescribed clusterv1.Conditions.

type OpenStackFloatingIPPoolList

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

OpenStackFloatingIPPoolList contains a list of OpenStackFloatingIPPool.

func (*OpenStackFloatingIPPoolList) DeepCopy

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

func (*OpenStackFloatingIPPoolList) DeepCopyInto

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

func (*OpenStackFloatingIPPoolList) DeepCopyObject

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

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

type OpenStackFloatingIPPoolSpec

type OpenStackFloatingIPPoolSpec struct {
	// PreAllocatedFloatingIPs is a list of floating IPs precreated in OpenStack that should be used by this pool.
	// These are used before allocating new ones and are not deleted from OpenStack when the pool is deleted.
	PreAllocatedFloatingIPs []string `json:"preAllocatedFloatingIPs,omitempty"`

	// MaxIPs is the maximum number of floating ips that can be allocated from this pool, if nil there is no limit.
	// If set, the pool will stop allocating floating ips when it reaches this number of ClaimedIPs.
	// +optional
	MaxIPs *int `json:"maxIPs,omitempty"`

	// IdentityRef is a reference to a identity to be used when reconciling this pool.
	// +kubebuilder:validation:Required
	IdentityRef infrav1.OpenStackIdentityReference `json:"identityRef"`

	// FloatingIPNetwork is the external network to use for floating ips, if there's only one external network it will be used by default
	// +optional
	FloatingIPNetwork *infrav1.NetworkParam `json:"floatingIPNetwork"`

	// The stratergy to use for reclaiming floating ips when they are released from a machine
	// +kubebuilder:validation:Enum=Retain;Delete
	ReclaimPolicy ReclaimPolicy `json:"reclaimPolicy"`
}

OpenStackFloatingIPPoolSpec defines the desired state of OpenStackFloatingIPPool.

func (*OpenStackFloatingIPPoolSpec) DeepCopy

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

func (*OpenStackFloatingIPPoolSpec) DeepCopyInto

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

type OpenStackFloatingIPPoolStatus

type OpenStackFloatingIPPoolStatus struct {
	// +kubebuilder:default={}
	// +optional
	ClaimedIPs []string `json:"claimedIPs"`

	// +kubebuilder:default={}
	// +optional
	AvailableIPs []string `json:"availableIPs"`

	// FailedIPs contains a list of floating ips that failed to be allocated
	// +optional
	FailedIPs []string `json:"failedIPs,omitempty"`

	// floatingIPNetwork contains information about the network used for floating ips
	// +optional
	FloatingIPNetwork *infrav1.NetworkStatus `json:"floatingIPNetwork,omitempty"`

	Conditions clusterv1.Conditions `json:"conditions,omitempty"`
}

OpenStackFloatingIPPoolStatus defines the observed state of OpenStackFloatingIPPool.

func (*OpenStackFloatingIPPoolStatus) DeepCopy

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

func (*OpenStackFloatingIPPoolStatus) DeepCopyInto

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

type OpenStackServer added in v0.11.0

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

	Spec   OpenStackServerSpec   `json:"spec,omitempty"`
	Status OpenStackServerStatus `json:"status,omitempty"`
}

OpenStackServer is the Schema for the openstackservers API.

func (*OpenStackServer) DeepCopy added in v0.11.0

func (in *OpenStackServer) DeepCopy() *OpenStackServer

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

func (*OpenStackServer) DeepCopyInto added in v0.11.0

func (in *OpenStackServer) DeepCopyInto(out *OpenStackServer)

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

func (*OpenStackServer) DeepCopyObject added in v0.11.0

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

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

func (*OpenStackServer) GetConditions added in v0.11.0

func (r *OpenStackServer) GetConditions() clusterv1.Conditions

GetConditions returns the observations of the operational state of the OpenStackServer resource.

func (*OpenStackServer) GetIdentityRef added in v0.11.0

func (r *OpenStackServer) GetIdentityRef() (*string, *infrav1.OpenStackIdentityReference)

GetIdentifyRef returns the Server's namespace and IdentityRef.

func (*OpenStackServer) SetConditions added in v0.11.0

func (r *OpenStackServer) SetConditions(conditions clusterv1.Conditions)

SetConditions sets the underlying service state of the OpenStackServer to the predescribed clusterv1.Conditions.

type OpenStackServerList added in v0.11.0

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

OpenStackServerList contains a list of OpenStackServer.

func (*OpenStackServerList) DeepCopy added in v0.11.0

func (in *OpenStackServerList) DeepCopy() *OpenStackServerList

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

func (*OpenStackServerList) DeepCopyInto added in v0.11.0

func (in *OpenStackServerList) DeepCopyInto(out *OpenStackServerList)

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

func (*OpenStackServerList) DeepCopyObject added in v0.11.0

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

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

type OpenStackServerSpec added in v0.11.0

type OpenStackServerSpec struct {
	// AdditionalBlockDevices is a list of specifications for additional block devices to attach to the server instance.
	// +listType=map
	// +listMapKey=name
	// +optional
	AdditionalBlockDevices []infrav1.AdditionalBlockDevice `json:"additionalBlockDevices,omitempty"`

	// AvailabilityZone is the availability zone in which to create the server instance.
	//+optional
	AvailabilityZone optional.String `json:"availabilityZone,omitempty"`

	// ConfigDrive is a flag to enable config drive for the server instance.
	// +optional
	ConfigDrive optional.Bool `json:"configDrive,omitempty"`

	// The flavor reference for the flavor for the server instance.
	// +optional
	// +kubebuilder:validation:MinLength=1
	Flavor *string `json:"flavor,omitempty"`

	// FlavorID allows flavors to be specified by ID.  This field takes precedence
	// over Flavor.
	// +optional
	// +kubebuilder:validation:MinLength=1
	FlavorID *string `json:"flavorID,omitempty"`

	// FloatingIPPoolRef is a reference to a FloatingIPPool to allocate a floating IP from.
	// +optional
	FloatingIPPoolRef *corev1.TypedLocalObjectReference `json:"floatingIPPoolRef,omitempty"`

	// IdentityRef is a reference to a secret holding OpenStack credentials.
	// +required
	IdentityRef infrav1.OpenStackIdentityReference `json:"identityRef"`

	// The image to use for the server instance.
	// +required
	Image infrav1.ImageParam `json:"image"`

	// Ports to be attached to the server instance.
	// +required
	Ports []infrav1.PortOpts `json:"ports"`

	// RootVolume is the specification for the root volume of the server instance.
	// +optional
	RootVolume *infrav1.RootVolume `json:"rootVolume,omitempty"`

	// SSHKeyName is the name of the SSH key to inject in the instance.
	// +required
	SSHKeyName string `json:"sshKeyName"`

	// SecurityGroups is a list of security groups names to assign to the instance.
	// +optional
	SecurityGroups []infrav1.SecurityGroupParam `json:"securityGroups,omitempty"`

	// ServerGroup is the server group to which the server instance belongs.
	// +optional
	ServerGroup *infrav1.ServerGroupParam `json:"serverGroup,omitempty"`

	// ServerMetadata is a map of key value pairs to add to the server instance.
	// +listType=map
	// +listMapKey=key
	// +optional
	ServerMetadata []infrav1.ServerMetadata `json:"serverMetadata,omitempty"`

	// Tags which will be added to the machine and all dependent resources
	// which support them. These are in addition to Tags defined on the
	// cluster.
	// Requires Nova api 2.52 minimum!
	// +listType=set
	Tags []string `json:"tags,omitempty"`

	// Trunk is a flag to indicate if the server instance is created on a trunk port or not.
	// +optional
	Trunk optional.Bool `json:"trunk,omitempty"`

	// UserDataRef is a reference to a secret containing the user data to
	// be injected into the server instance.
	// +optional
	UserDataRef *corev1.LocalObjectReference `json:"userDataRef,omitempty"`

	// SchedulerHintAdditionalProperties are arbitrary key/value pairs that provide additional hints
	// to the OpenStack scheduler. These hints can influence how instances are placed on the infrastructure,
	// such as specifying certain host aggregates or availability zones.
	// +optional
	// +listType=map
	// +listMapKey=name
	SchedulerHintAdditionalProperties []infrav1.SchedulerHintAdditionalProperty `json:"schedulerHintAdditionalProperties,omitempty"`
}

OpenStackServerSpec defines the desired state of OpenStackServer. +kubebuilder:validation:XValidation:message="at least one of flavor or flavorID must be set",rule=(has(self.flavor) || has(self.flavorID))

func (*OpenStackServerSpec) DeepCopy added in v0.11.0

func (in *OpenStackServerSpec) DeepCopy() *OpenStackServerSpec

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

func (*OpenStackServerSpec) DeepCopyInto added in v0.11.0

func (in *OpenStackServerSpec) DeepCopyInto(out *OpenStackServerSpec)

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

type OpenStackServerStatus added in v0.11.0

type OpenStackServerStatus struct {
	// Ready is true when the OpenStack server is ready.
	// +kubebuilder:default=false
	Ready bool `json:"ready"`

	// InstanceID is the ID of the server instance.
	// +optional
	InstanceID optional.String `json:"instanceID,omitempty"`

	// InstanceState is the state of the server instance.
	// +optional
	InstanceState *infrav1.InstanceState `json:"instanceState,omitempty"`

	// Addresses is the list of addresses of the server instance.
	// +optional
	Addresses []corev1.NodeAddress `json:"addresses,omitempty"`

	// Resolved contains parts of the machine spec with all external
	// references fully resolved.
	// +optional
	Resolved *ResolvedServerSpec `json:"resolved,omitempty"`

	// Resources contains references to OpenStack resources created for the machine.
	// +optional
	Resources *ServerResources `json:"resources,omitempty"`

	// Conditions defines current service state of the OpenStackServer.
	// +optional
	Conditions clusterv1.Conditions `json:"conditions,omitempty"`
}

OpenStackServerStatus defines the observed state of OpenStackServer.

func (*OpenStackServerStatus) DeepCopy added in v0.11.0

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

func (*OpenStackServerStatus) DeepCopyInto added in v0.11.0

func (in *OpenStackServerStatus) DeepCopyInto(out *OpenStackServerStatus)

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

type ReclaimPolicy

type ReclaimPolicy string

ReclaimPolicy is a string type alias to represent reclaim policies for floating ips.

const (
	// ReclaimDelete is the reclaim policy for floating ips.
	ReclaimDelete ReclaimPolicy = "Delete"
	// ReclaimRetain is the reclaim policy for floating ips.
	ReclaimRetain ReclaimPolicy = "Retain"
)

type ResolvedServerSpec added in v0.11.0

type ResolvedServerSpec struct {
	// ServerGroupID is the ID of the server group the server should be added to and is calculated based on ServerGroupFilter.
	// +optional
	ServerGroupID string `json:"serverGroupID,omitempty"`

	// ImageID is the ID of the image to use for the server and is calculated based on ImageFilter.
	// +optional
	ImageID string `json:"imageID,omitempty"`

	// FlavorID is the ID of the flavor to use.
	// +optional
	FlavorID string `json:"flavorID,omitempty"`

	// Ports is the fully resolved list of ports to create for the server.
	// +optional
	Ports []infrav1.ResolvedPortSpec `json:"ports,omitempty"`
}

ResolvedServerSpec contains resolved references to resources required by the server.

func (*ResolvedServerSpec) DeepCopy added in v0.11.0

func (in *ResolvedServerSpec) DeepCopy() *ResolvedServerSpec

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

func (*ResolvedServerSpec) DeepCopyInto added in v0.11.0

func (in *ResolvedServerSpec) DeepCopyInto(out *ResolvedServerSpec)

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

type ServerResources added in v0.11.0

type ServerResources struct {
	// Ports is the status of the ports created for the server.
	// +optional
	Ports []infrav1.PortStatus `json:"ports,omitempty"`
}

ServerResources contains references to OpenStack resources created for the server.

func (*ServerResources) DeepCopy added in v0.11.0

func (in *ServerResources) DeepCopy() *ServerResources

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

func (*ServerResources) DeepCopyInto added in v0.11.0

func (in *ServerResources) DeepCopyInto(out *ServerResources)

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

type ServerStatusError added in v0.11.0

type ServerStatusError string

Jump to

Keyboard shortcuts

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