v1alpha1

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 21

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the metal3 v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +kubebuilder:object:generate=true +groupName=ipam.metal3.io

Package v1alpha1 contains API Schema definitions for the infrastructure v1alpha1 API group +kubebuilder:object:generate=true +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=ipam.metal3.io

Index

Constants

View Source
const (
	// DataFinalizer allows IPAddressReconciler to clean up resources
	// associated with IPAddress before removing it from the apiserver.
	IPAddressFinalizer = "ipaddress.ipam.metal3.io"
)
View Source
const (
	// IPClaimFinalizer allows IPClaimReconciler to clean up resources
	// associated with IPClaim before removing it from the apiserver.
	IPClaimFinalizer = "ipclaim.ipam.metal3.io"
)
View Source
const (
	// IPPoolFinalizer allows IPPoolReconciler to clean up resources
	// associated with IPPool before removing it from the apiserver.
	IPPoolFinalizer = "ippool.ipam.metal3.io"
)

Variables

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

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

Functions

This section is empty.

Types

type IPAddress

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

	Spec IPAddressSpec `json:"spec,omitempty"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:path=ipaddresses,scope=Namespaced,categories=metal3,shortName=ipa;ipaddress;m3ipa;m3ipaddress;m3ipaddresses;metal3ipa;metal3ipaddress;metal3ipaddresses +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Metal3IPAddress" +kubebuilder:storageversion +kubebuilder:object:root=true IPAddress is the Schema for the ipaddresses API.

func (*IPAddress) DeepCopy

func (in *IPAddress) DeepCopy() *IPAddress

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

func (*IPAddress) DeepCopyInto

func (in *IPAddress) DeepCopyInto(out *IPAddress)

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

func (*IPAddress) DeepCopyObject

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

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

func (*IPAddress) Default

func (c *IPAddress) Default()

func (*IPAddress) Hub

func (*IPAddress) Hub()

func (*IPAddress) SetupWebhookWithManager

func (c *IPAddress) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*IPAddress) ValidateCreate

func (c *IPAddress) ValidateCreate() (admission.Warnings, error)

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

func (*IPAddress) ValidateDelete

func (c *IPAddress) ValidateDelete() (admission.Warnings, error)

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

func (*IPAddress) ValidateUpdate

func (c *IPAddress) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

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

type IPAddressList

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

IPAddressList contains a list of IPAddress.

func (*IPAddressList) DeepCopy

func (in *IPAddressList) DeepCopy() *IPAddressList

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

func (*IPAddressList) DeepCopyInto

func (in *IPAddressList) DeepCopyInto(out *IPAddressList)

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

func (*IPAddressList) DeepCopyObject

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

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

type IPAddressSpec

type IPAddressSpec struct {

	// Claim points to the object the IPClaim was created for.
	Claim corev1.ObjectReference `json:"claim"`

	// Pool is the IPPool this was generated from.
	Pool corev1.ObjectReference `json:"pool"`

	// +kubebuilder:validation:Maximum=128
	// Prefix is the mask of the network as integer (max 128)
	Prefix int `json:"prefix,omitempty"`

	// Gateway is the gateway ip address
	Gateway *IPAddressStr `json:"gateway,omitempty"`

	// Address contains the IP address
	Address IPAddressStr `json:"address"`

	// DNSServers is the list of dns servers
	DNSServers []IPAddressStr `json:"dnsServers,omitempty"`
}

IPAddressSpec defines the desired state of IPAddress.

func (*IPAddressSpec) DeepCopy

func (in *IPAddressSpec) DeepCopy() *IPAddressSpec

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

func (*IPAddressSpec) DeepCopyInto

func (in *IPAddressSpec) DeepCopyInto(out *IPAddressSpec)

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

type IPAddressStr

type IPAddressStr string

+kubebuilder:validation:Pattern="((^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$)|(^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$))" IPAddress is used for validation of an IP address.

func GetIPAddress

func GetIPAddress(entry Pool, index int) (IPAddressStr, error)

GetIPAddress renders the IP address, taking the index, offset and step into account, it is IP version agnostic.

type IPAddressv4Str

type IPAddressv4Str string

+kubebuilder:validation:Pattern="^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$" IPAddressv4 is used for validation of an IPv6 address.

type IPAddressv6Str

type IPAddressv6Str string

+kubebuilder:validation:Pattern="^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$" IPAddressv6 is used for validation of an IPv6 address.

type IPClaim

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

	Spec   IPClaimSpec   `json:"spec,omitempty"`
	Status IPClaimStatus `json:"status,omitempty"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:path=ipclaims,scope=Namespaced,categories=cluster-api,shortName=ipc;ipclaim;m3ipc;m3ipclaim;m3ipclaims;metal3ipc;metal3ipclaim;metal3ipclaims +kubebuilder:storageversion +kubebuilder:subresource:status +kubebuilder:object:root=true +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Metal3IPClaim" IPClaim is the Schema for the ipclaims API.

func (*IPClaim) DeepCopy

func (in *IPClaim) DeepCopy() *IPClaim

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

func (*IPClaim) DeepCopyInto

func (in *IPClaim) DeepCopyInto(out *IPClaim)

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

func (*IPClaim) DeepCopyObject

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

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

func (*IPClaim) Default

func (c *IPClaim) Default()

func (*IPClaim) Hub

func (*IPClaim) Hub()

func (*IPClaim) SetupWebhookWithManager

func (c *IPClaim) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*IPClaim) ValidateCreate

func (c *IPClaim) ValidateCreate() (admission.Warnings, error)

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

func (*IPClaim) ValidateDelete

func (c *IPClaim) ValidateDelete() (admission.Warnings, error)

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

func (*IPClaim) ValidateUpdate

func (c *IPClaim) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

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

type IPClaimList

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

IPClaimList contains a list of IPClaim.

func (*IPClaimList) DeepCopy

func (in *IPClaimList) DeepCopy() *IPClaimList

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

func (*IPClaimList) DeepCopyInto

func (in *IPClaimList) DeepCopyInto(out *IPClaimList)

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

func (*IPClaimList) DeepCopyObject

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

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

type IPClaimSpec

type IPClaimSpec struct {

	// Pool is the IPPool this was generated from.
	Pool corev1.ObjectReference `json:"pool"`
}

IPClaimSpec defines the desired state of IPClaim.

func (*IPClaimSpec) DeepCopy

func (in *IPClaimSpec) DeepCopy() *IPClaimSpec

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

func (*IPClaimSpec) DeepCopyInto

func (in *IPClaimSpec) DeepCopyInto(out *IPClaimSpec)

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

type IPClaimStatus

type IPClaimStatus struct {

	// Address is the IPAddress that was generated for this claim.
	Address *corev1.ObjectReference `json:"address,omitempty"`

	// ErrorMessage contains the error message
	ErrorMessage *string `json:"errorMessage,omitempty"`
}

IPClaimStatus defines the observed state of IPClaim.

func (*IPClaimStatus) DeepCopy

func (in *IPClaimStatus) DeepCopy() *IPClaimStatus

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

func (*IPClaimStatus) DeepCopyInto

func (in *IPClaimStatus) DeepCopyInto(out *IPClaimStatus)

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

type IPPool

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

	Spec   IPPoolSpec   `json:"spec,omitempty"`
	Status IPPoolStatus `json:"status,omitempty"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:path=ippools,scope=Namespaced,categories=cluster-api,shortName=ipp;ippool;m3ipp;m3ippool;m3ippools;metal3ipp;metal3ippool;metal3ippools +kubebuilder:storageversion +kubebuilder:subresource:status +kubebuilder:object:root=true +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this template belongs" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Metal3IPPool" IPPool is the Schema for the ippools API.

func (*IPPool) DeepCopy

func (in *IPPool) DeepCopy() *IPPool

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

func (*IPPool) DeepCopyInto

func (in *IPPool) DeepCopyInto(out *IPPool)

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

func (*IPPool) DeepCopyObject

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

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

func (*IPPool) Default

func (c *IPPool) Default()

func (*IPPool) Hub

func (*IPPool) Hub()

func (*IPPool) SetupWebhookWithManager

func (c *IPPool) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*IPPool) ValidateCreate

func (c *IPPool) ValidateCreate() (admission.Warnings, error)

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

func (*IPPool) ValidateDelete

func (c *IPPool) ValidateDelete() (admission.Warnings, error)

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

func (*IPPool) ValidateUpdate

func (c *IPPool) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

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

type IPPoolList

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

IPPoolList contains a list of IPPool.

func (*IPPoolList) DeepCopy

func (in *IPPoolList) DeepCopy() *IPPoolList

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

func (*IPPoolList) DeepCopyInto

func (in *IPPoolList) DeepCopyInto(out *IPPoolList)

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

func (*IPPoolList) DeepCopyObject

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

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

type IPPoolSpec

type IPPoolSpec struct {

	// ClusterName is the name of the Cluster this object belongs to.
	ClusterName *string `json:"clusterName,omitempty"`

	// Pools contains the list of IP addresses pools
	Pools []Pool `json:"pools,omitempty"`

	// PreAllocations contains the preallocated IP addresses
	PreAllocations map[string]IPAddressStr `json:"preAllocations,omitempty"`

	// +kubebuilder:validation:Maximum=128
	// Prefix is the mask of the network as integer (max 128)
	Prefix int `json:"prefix,omitempty"`

	// Gateway is the gateway ip address
	Gateway *IPAddressStr `json:"gateway,omitempty"`

	// DNSServers is the list of dns servers
	DNSServers []IPAddressStr `json:"dnsServers,omitempty"`

	// +kubebuilder:validation:MinLength=1
	// namePrefix is the prefix used to generate the IPAddress object names
	NamePrefix string `json:"namePrefix"`
}

IPPoolSpec defines the desired state of IPPool.

func (*IPPoolSpec) DeepCopy

func (in *IPPoolSpec) DeepCopy() *IPPoolSpec

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

func (*IPPoolSpec) DeepCopyInto

func (in *IPPoolSpec) DeepCopyInto(out *IPPoolSpec)

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

type IPPoolStatus

type IPPoolStatus struct {
	// LastUpdated identifies when this status was last observed.
	// +optional
	LastUpdated *metav1.Time `json:"lastUpdated,omitempty"`

	// Allocations contains the map of objects and IP addresses they have
	Allocations map[string]IPAddressStr `json:"indexes,omitempty"`
}

IPPoolStatus defines the observed state of IPPool.

func (*IPPoolStatus) DeepCopy

func (in *IPPoolStatus) DeepCopy() *IPPoolStatus

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

func (*IPPoolStatus) DeepCopyInto

func (in *IPPoolStatus) DeepCopyInto(out *IPPoolStatus)

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

type IPSubnetStr

type IPSubnetStr string

+kubebuilder:validation:Pattern="((^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))/([0-9]|[1-2][0-9]|3[0-2])$)|(^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/([0-9]|[0-9][0-9]|1[0-1][0-9]|12[0-8])$))" IPSubnet is used for validation of an IP subnet.

type IPSubnetv4Str

type IPSubnetv4Str string

+kubebuilder:validation:Pattern="^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))/([0-9]|[1-2][0-9]|3[0-2])$" IPSubnetv4 is used for validation of an IP subnet.

type IPSubnetv6Str

type IPSubnetv6Str string

+kubebuilder:validation:Pattern="^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/([0-9]|[0-9][0-9]|1[0-1][0-9]|12[0-8])$" IPSubnetv6 is used for validation of an IP subnet.

type Pool

type Pool struct {

	// Start is the first ip address that can be rendered
	Start *IPAddressStr `json:"start,omitempty"`

	// End is the last IP address that can be rendered. It is used as a validation
	// that the rendered IP is in bound.
	End *IPAddressStr `json:"end,omitempty"`

	// Subnet is used to validate that the rendered IP is in bounds. In case the
	// Start value is not given, it is derived from the subnet ip incremented by 1
	// (`192.168.0.1` for `192.168.0.0/24`)
	Subnet *IPSubnetStr `json:"subnet,omitempty"`

	// +kubebuilder:validation:Maximum=128
	// Prefix is the mask of the network as integer (max 128)
	Prefix int `json:"prefix,omitempty"`

	// Gateway is the gateway ip address
	Gateway *IPAddressStr `json:"gateway,omitempty"`

	// DNSServers is the list of dns servers
	DNSServers []IPAddressStr `json:"dnsServers,omitempty"`
}

MetaDataIPAddress contains the info to render th ip address. It is IP-version agnostic.

func (*Pool) DeepCopy

func (in *Pool) DeepCopy() *Pool

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

func (*Pool) DeepCopyInto

func (in *Pool) DeepCopyInto(out *Pool)

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

Jump to

Keyboard shortcuts

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