v1alpha2

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// ProxmoxClusterProxmoxAvailableCondition documents the availability of the
	// underlying Proxmox infrastructure used by the ProxmoxCluster.
	ProxmoxClusterProxmoxAvailableCondition = "ProxmoxAvailable"

	// ProxmoxClusterProxmoxAvailableProxmoxUnreachableReason documents a controller
	// detecting issues with Proxmox reachability.
	ProxmoxClusterProxmoxAvailableProxmoxUnreachableReason = "ProxmoxUnreachable"

	// ProxmoxClusterProxmoxAvailableMissingControlPlaneEndpointReason documents a
	// missing Control Plane endpoint when the cluster uses an externally managed
	// control plane.
	ProxmoxClusterProxmoxAvailableMissingControlPlaneEndpointReason = "MissingControlPlaneEndpoint"

	// ProxmoxClusterProxmoxAvailableDeletingReason documents a ProxmoxCluster being deleted.
	ProxmoxClusterProxmoxAvailableDeletingReason = "Deleting"
)

Conditions and Reasons for ProxmoxCluster.

The Ready condition is a summary condition that is set by the controller using conditions.SetSummaryCondition and aggregates the following conditions: - ProxmoxAvailable - Paused (managed by CAPI).

View Source
const (
	// ProxmoxMachineVirtualMachineProvisionedCondition documents the status of the
	// provisioning of a ProxmoxMachine and its underlying virtual machine.
	ProxmoxMachineVirtualMachineProvisionedCondition = "VirtualMachineProvisioned"

	// ProxmoxMachineVirtualMachineProvisionedCloningReason documents a ProxmoxMachine
	// currently executing the clone operation.
	ProxmoxMachineVirtualMachineProvisionedCloningReason = "Cloning"

	// ProxmoxMachineVirtualMachineProvisionedCloningFailedReason documents a ProxmoxMachine
	// controller detecting an error while cloning; these errors are usually transient
	// and the controller automatically retries.
	ProxmoxMachineVirtualMachineProvisionedCloningFailedReason = "CloningFailed"

	// ProxmoxMachineVirtualMachineProvisionedWaitingForDiskReconciliationReason documents
	// a ProxmoxMachine waiting for the disks to be resized.
	ProxmoxMachineVirtualMachineProvisionedWaitingForDiskReconciliationReason = "WaitingForDiskReconciliation"

	// ProxmoxMachineVirtualMachineProvisionedWaitingForStaticIPAllocationReason documents
	// a ProxmoxMachine waiting for the allocation of a static IP address.
	ProxmoxMachineVirtualMachineProvisionedWaitingForStaticIPAllocationReason = "WaitingForStaticIPAllocation"

	// ProxmoxMachineVirtualMachineProvisionedWaitingForBootstrapDataReconciliationReason
	// documents a ProxmoxMachine waiting for the reconciliation of bootstrap data
	// for cloud-init/ignition.
	ProxmoxMachineVirtualMachineProvisionedWaitingForBootstrapDataReconciliationReason = "WaitingForBootstrapDataReconciliation"

	// ProxmoxMachineVirtualMachineProvisionedWaitingForVMPowerUpReason documents a
	// ProxmoxMachine waiting for Proxmox to power it on.
	ProxmoxMachineVirtualMachineProvisionedWaitingForVMPowerUpReason = "WaitingForVMPowerUp"

	// ProxmoxMachineVirtualMachineProvisionedPoweringOnFailedReason documents a
	// ProxmoxMachine controller detecting an error while powering on; these errors
	// are usually transient and the controller automatically retries.
	ProxmoxMachineVirtualMachineProvisionedPoweringOnFailedReason = "PoweringOnFailed"

	// ProxmoxMachineVirtualMachineProvisionedWaitingForCloudInitReason documents a
	// ProxmoxMachine waiting for cloud-init to complete.
	ProxmoxMachineVirtualMachineProvisionedWaitingForCloudInitReason = "WaitingForCloudInit"

	// ProxmoxMachineVirtualMachineProvisionedWaitingForBootstrapReadyReason documents
	// a ProxmoxMachine waiting for the bootstrap process to complete.
	ProxmoxMachineVirtualMachineProvisionedWaitingForBootstrapReadyReason = "WaitingForBootstrapReady"

	// ProxmoxMachineVirtualMachineProvisionedWaitingForClusterAPIMachineAddressesReason
	// documents a ProxmoxMachine assigning host addresses for Cluster API.
	ProxmoxMachineVirtualMachineProvisionedWaitingForClusterAPIMachineAddressesReason = "WaitingForClusterAPIMachineAddresses"

	// ProxmoxMachineVirtualMachineProvisionedVMProvisionFailedReason documents a failure
	// during virtual machine provisioning.
	ProxmoxMachineVirtualMachineProvisionedVMProvisionFailedReason = "VMProvisionFailed"

	// ProxmoxMachineVirtualMachineProvisionedTaskFailedReason documents a Proxmox task
	// failure; the controller will automatically retry, but user intervention might
	// be required.
	ProxmoxMachineVirtualMachineProvisionedTaskFailedReason = "TaskFailed"

	// ProxmoxMachineVirtualMachineProvisionedDeletingReason documents a ProxmoxMachine
	// being deleted.
	ProxmoxMachineVirtualMachineProvisionedDeletingReason = "Deleting"

	// ProxmoxMachineVirtualMachineProvisionedDeletionFailedReason documents a failure
	// during virtual machine deletion.
	ProxmoxMachineVirtualMachineProvisionedDeletionFailedReason = "DeletionFailed"
)

Conditions and Reasons for ProxmoxMachine.

The Ready condition is a summary condition that is set by the controller using conditions.SetSummaryCondition and aggregates the following conditions: - VirtualMachineProvisioned - Paused (managed by CAPI).

View Source
const (
	// ProxmoxClusterKind is the ProxmoxCluster kind.
	ProxmoxClusterKind = "ProxmoxCluster"
	// ClusterFinalizer allows cleaning up resources associated with a
	// ProxmoxCluster before removing it from the apiserver.
	ClusterFinalizer = "proxmoxcluster.infrastructure.cluster.x-k8s.io"
	// SecretFinalizer is the finalizer for ProxmoxCluster credentials secrets.
	SecretFinalizer = "proxmoxcluster.infrastructure.cluster.x-k8s.io/secret" //nolint:gosec
)
View Source
const (
	// ProxmoxMachineKind is the ProxmoxMachine kind.
	ProxmoxMachineKind = "ProxmoxMachine"

	// MachineFinalizer allows cleaning up resources associated with a
	// ProxmoxMachine before removing it from the API Server.
	MachineFinalizer = "proxmoxmachine.infrastructure.cluster.x-k8s.io"

	// DefaultReconcilerRequeue is the default value for the reconcile retry.
	DefaultReconcilerRequeue = 10 * time.Second

	// DefaultNetworkDevice is the default network device name.
	DefaultNetworkDevice = NetName("net0")

	// DefaultSuffix is the default suffix for the network device.
	DefaultSuffix = "inet"

	// IPv4Format is the IP v4 format.
	IPv4Format = "v4"

	// IPv6Format is the IP v6 format.
	IPv6Format = "v6"
)
View Source
const (
	// VirtualMachineStateNotFound is the string representing a VM that
	// cannot be located.
	VirtualMachineStateNotFound VirtualMachineState = "notfound"

	// VirtualMachineStatePending is the string representing a VM with an in-flight task.
	VirtualMachineStatePending VirtualMachineState = "pending"

	// VirtualMachineStateReady is the string representing a powered-on VM with reported IP addresses.
	VirtualMachineStateReady VirtualMachineState = "ready"

	// ProxmoxZoneLabel is a label key used for proxmox zone objects.
	ProxmoxZoneLabel string = "topology.kubernetes.io/proxmox-zone"

	// ProxmoxIPFamilyAnnotation is an annotation key used for denoting the ip family of InClusterIPPools.
	ProxmoxIPFamilyAnnotation string = "ipam.capmox.cluster.x-k8s.io/ip-family"

	// IPv4Type marks an object as belong to the IPv4 family.
	IPv4Type string = "ipv4"

	// IPv6Type marks an object as belong to the IPv6 family.
	IPv6Type string = "ipv6"

	// ProxmoxPoolOffsetAnnotation allows multiple IP Addresses per IPPool.
	ProxmoxPoolOffsetAnnotation string = "ipam.capmox.cluster.x-k8s.io/pool-ref-counter"

	// ProxmoxGatewayMetricAnnotation is an annotation key used for denoting metric of a gateway.
	ProxmoxGatewayMetricAnnotation string = "ipam.capmox.cluster.x-k8s.io/gateway-metric"

	// ProxmoxDefaultGatewayAnnotation marks an IPAddress spec as containing a default gateway.
	ProxmoxDefaultGatewayAnnotation string = "ipam.capmox.cluster.x-k8s.io/default-gateway"
)

Variables

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

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

Functions

This section is empty.

Types

type APIEndpoint

type APIEndpoint struct {
	// host is the hostname on which the API server is serving.
	// +optional
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=512
	Host string `json:"host,omitempty"`

	// port is the port on which the API server is serving.
	// +optional
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65535
	Port int32 `json:"port,omitempty"`
}

APIEndpoint represents a reachable Kubernetes API endpoint. +kubebuilder:validation:MinProperties=1 The XValidation rule below is necessary because port uses omitempty, so a zero value is omitted from JSON and the field-level Minimum=1 constraint never fires. +kubebuilder:validation:XValidation:rule="self.port > 0 && self.port < 65536",message="port must be within 1-65535"

func (*APIEndpoint) DeepCopy

func (in *APIEndpoint) DeepCopy() *APIEndpoint

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

func (*APIEndpoint) DeepCopyInto

func (in *APIEndpoint) DeepCopyInto(out *APIEndpoint)

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

func (APIEndpoint) IsZero

func (v APIEndpoint) IsZero() bool

IsZero returns true if both host and port are zero values.

func (APIEndpoint) String

func (v APIEndpoint) String() string

String returns a formatted version HOST:PORT of this APIEndpoint.

type DiskSize

type DiskSize struct {
	// disk is the name of the disk device that should be resized.
	// Example values are: ide[0-3], scsi[0-30], sata[0-5].
	// +kubebuilder:validation:MinLength=1
	// +required
	Disk string `json:"disk,omitempty"`

	// sizeGb defines the size in gigabytes.
	//
	// As Proxmox does not support shrinking, the size
	// must be bigger than the already configured size in the
	// template.
	//
	// +kubebuilder:validation:Minimum=5
	// +required
	SizeGB int32 `json:"sizeGb,omitempty"`
}

DiskSize is contains values for the disk device and size.

func (*DiskSize) DeepCopy

func (in *DiskSize) DeepCopy() *DiskSize

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

func (*DiskSize) DeepCopyInto

func (in *DiskSize) DeepCopyInto(out *DiskSize)

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

func (*DiskSize) FormatSize

func (d *DiskSize) FormatSize() string

FormatSize returns the format required for the Proxmox API.

type IPAddressesSpec

type IPAddressesSpec struct {
	// net is the proxmox network name these ipaddresses are attached to.
	// +kubebuilder:validation:MinLength=4
	// +kubebuilder:validation:Pattern=`^(net[0-9]+|default)$`
	// +required
	NetName string `json:"net,omitempty"`

	// ipv4 is the IPv4 address.
	// +listType=set
	// +optional
	IPv4 []string `json:"ipv4,omitempty"`

	// ipv6 is the IPv6 address.
	// +listType=set
	// +optional
	IPv6 []string `json:"ipv6,omitempty"`
}

IPAddressesSpec stores the IP addresses of a network interface. Used for status.

func (*IPAddressesSpec) DeepCopy

func (in *IPAddressesSpec) DeepCopy() *IPAddressesSpec

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

func (*IPAddressesSpec) DeepCopyInto

func (in *IPAddressesSpec) DeepCopyInto(out *IPAddressesSpec)

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

type IPConfigSpec

type IPConfigSpec struct {
	// addresses is a list of IP addresses that can be assigned. This set of addresses can be non-contiguous.
	// +required
	// +listType=set
	Addresses []string `json:"addresses,omitempty"`

	// prefix is the network prefix to use.
	// +required
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=128
	Prefix int32 `json:"prefix,omitempty"`

	// gateway is the network gateway
	// +required
	// +kubebuilder:validation:MinLength=1
	Gateway string `json:"gateway,omitempty"`

	// metric is the route priority applied to the default gateway
	// +optional
	// +default=100
	// +kubebuilder:validation:Minimum=0
	Metric *int32 `json:"metric,omitempty"`
}

IPConfigSpec contains information about available IP config.

func (*IPConfigSpec) DeepCopy

func (in *IPConfigSpec) DeepCopy() *IPConfigSpec

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

func (*IPConfigSpec) DeepCopyInto

func (in *IPConfigSpec) DeepCopyInto(out *IPConfigSpec)

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

type InClusterZoneRef

type InClusterZoneRef struct {
	// zone defines the deployment proxmox-zone.
	// +default="default"
	// +optional
	Zone Zone `json:"zone,omitempty"`

	// inClusterIPPoolRefV4 is the reference to the created in-cluster IP pool.
	// +optional
	InClusterIPPoolRefV4 *corev1.LocalObjectReference `json:"inClusterIPPoolRefV4,omitempty"`

	// inClusterIPPoolRefV6 is the reference to the created in-cluster IP pool.
	// +optional
	InClusterIPPoolRefV6 *corev1.LocalObjectReference `json:"inClusterIPPoolRefV6,omitempty"`
}

InClusterZoneRef holds the InClusterIPPools associated with a zone. +kubebuilder:validation:AtLeastOneOf=InClusterIPPoolRefV4,InClusterIPPoolRefV6

func (*InClusterZoneRef) DeepCopy

func (in *InClusterZoneRef) DeepCopy() *InClusterZoneRef

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

func (*InClusterZoneRef) DeepCopyInto

func (in *InClusterZoneRef) DeepCopyInto(out *InClusterZoneRef)

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

type InterfaceConfig

type InterfaceConfig struct {
	// ipPoolRef is a reference to an IPAM Pool resource, which exposes IPv4 addresses.
	// The network device will use an available IP address from the referenced pool.
	// This can be combined with `IPv6PoolRef` in order to enable dual stack.
	// +optional
	// +kubebuilder:validation:items:XValidation:rule="self.apiGroup == 'ipam.cluster.x-k8s.io'",message="ipPoolRef allows only IPAM apiGroup ipam.cluster.x-k8s.io"
	// +kubebuilder:validation:items:XValidation:rule="self.kind == 'InClusterIPPool' || self.kind == 'GlobalInClusterIPPool'",message="ipPoolRef allows either InClusterIPPool or GlobalInClusterIPPool"
	// +listType=atomic
	IPPoolRef []corev1.TypedLocalObjectReference `json:"ipPoolRef,omitempty"`

	// dnsServers contains information about nameservers to be used for this interface.
	// If this field is not set, it will use the default dns servers from the ProxmoxCluster.
	// +optional
	// +kubebuilder:validation:MinItems=1
	// +listType=set
	DNSServers []string `json:"dnsServers,omitempty"`

	// Routing is the common spec of routes and routing policies to all interfaces and VRFs.
	Routing `json:",inline"`

	// linkMtu is the network device Maximum Transmission Unit.
	// +optional
	// +kubebuilder:validation:XValidation:rule="self == 1 || (self >= 576 && self <= 65520)",message="invalid MTU value"
	LinkMTU MTU `json:"linkMtu,omitempty"`
}

InterfaceConfig contains all configurables a network interface can have.

func (*InterfaceConfig) DeepCopy

func (in *InterfaceConfig) DeepCopy() *InterfaceConfig

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

func (*InterfaceConfig) DeepCopyInto

func (in *InterfaceConfig) DeepCopyInto(out *InterfaceConfig)

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

type MTU

type MTU *int32

MTU is the network device Maximum Transmission Unit. MTUs below 1280 break IPv6.

type MetadataSettings

type MetadataSettings struct {
	// providerIDInjection enables the injection of the `providerID` into the cloudinit metadata.
	// this will basically set the `provider-id` field in the metadata to `proxmox://<instanceID>`.
	// +required
	ProviderIDInjection *bool `json:"providerIDInjection,omitempty"`
}

MetadataSettings defines the metadata settings for the machine.

func (*MetadataSettings) DeepCopy

func (in *MetadataSettings) DeepCopy() *MetadataSettings

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

func (*MetadataSettings) DeepCopyInto

func (in *MetadataSettings) DeepCopyInto(out *MetadataSettings)

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

type NetName

type NetName string

NetName is a formally verified Proxmox network name string. +kubebuilder:validation:MinLength=4 +kubebuilder:validation:Pattern=`^net[0-9]+$`

type NetworkDevice

type NetworkDevice struct {
	// bridge is the network bridge to attach to the machine.
	// +kubebuilder:validation:MinLength=1
	// +optional
	Bridge *string `json:"bridge,omitempty"`

	// defaultIPv4 attaches the ipv4 host network to this interface.
	// +optional
	DefaultIPv4 *bool `json:"defaultIPv4,omitempty"`

	// defaultIPv6 attaches the ipv6 host network to this interface.
	// +optional
	DefaultIPv6 *bool `json:"defaultIPv6,omitempty"`

	// model is the network device model.
	// Defaults to "virtio" when not specified.
	// +optional
	// +kubebuilder:validation:Enum=e1000;virtio;rtl8139;vmxnet3
	// +default="virtio"
	Model *string `json:"model,omitempty"`

	// mtu is the network device Maximum Transmission Unit.
	// When set to 1, virtio devices inherit the MTU value from the underlying bridge.
	// +optional
	// +kubebuilder:validation:XValidation:rule="self == 1 || (self >= 576 && self <= 65520)",message="invalid MTU value"
	MTU MTU `json:"mtu,omitempty"`

	// vlan is the network L2 VLAN.
	// +optional
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=4094
	VLAN *int32 `json:"vlan,omitempty"`

	// name is the network device name.
	// +default="net0"
	// +optional
	Name NetName `json:"name,omitempty"`

	// InterfaceConfig contains all configurables a network interface can have.
	// +optional
	InterfaceConfig `json:",inline"`
}

NetworkDevice defines the required details of a virtual machine network device.

func (*NetworkDevice) DeepCopy

func (in *NetworkDevice) DeepCopy() *NetworkDevice

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

func (*NetworkDevice) DeepCopyInto

func (in *NetworkDevice) DeepCopyInto(out *NetworkDevice)

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

type NetworkSpec

type NetworkSpec struct {
	// zone is the cluster deployment zone this machine will refer to.
	// +optional
	Zone Zone `json:"zone,omitempty"`

	// networkDevices is a list of network devices.
	// +required
	// +listType=map
	// +listMapKey=name
	//nolint:kubeapilinter
	NetworkDevices []NetworkDevice `json:"networkDevices,omitempty"`

	// VirtualNetworkDevices defines virtual network devices (e.g. bridges, vlans ...).
	VirtualNetworkDevices `json:",inline"`
}

NetworkSpec defines the virtual machine's network configuration.

func (*NetworkSpec) DeepCopy

func (in *NetworkSpec) DeepCopy() *NetworkSpec

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

func (*NetworkSpec) DeepCopyInto

func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec)

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

type NetworkStatus

type NetworkStatus struct {
	// connected is a flag that indicates whether this network is currently
	// connected to the VM.
	// +required
	Connected *bool `json:"connected,omitempty"`

	// ipAddrs is one or more IP addresses reported by vm-tools.
	// +listType=set
	// +optional
	IPAddrs []string `json:"ipAddrs,omitempty"`

	// macAddr is the MAC address of the network device.
	// +required
	// +kubebuilder:validation:Pattern=`^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$`
	// +kubebuilder:validation:MinLength=17
	// +kubebuilder:validation:MaxLength=17
	MACAddr string `json:"macAddr,omitempty"`

	// networkName is the name of the network.
	// +optional
	NetworkName NetName `json:"networkName,omitempty"`
}

NetworkStatus provides information about one of a VM's networks.

func (*NetworkStatus) DeepCopy

func (in *NetworkStatus) DeepCopy() *NetworkStatus

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

func (*NetworkStatus) DeepCopyInto

func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus)

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

type NodeLocation

type NodeLocation struct {
	// machine is the reference to the ProxmoxMachine that the node is on.
	// +required
	Machine corev1.LocalObjectReference `json:"machine,omitempty"`

	// node is the Proxmox node.
	// +kubebuilder:validation:MinLength=1
	// +required
	Node string `json:"node,omitempty"`

	// zone is the zone the Machine is in.
	// +optional
	Zone Zone `json:"zone,omitempty"`
}

NodeLocation holds information about a single VM in Proxmox.

func (*NodeLocation) DeepCopy

func (in *NodeLocation) DeepCopy() *NodeLocation

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

func (*NodeLocation) DeepCopyInto

func (in *NodeLocation) DeepCopyInto(out *NodeLocation)

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

type NodeLocations

type NodeLocations struct {
	// controlPlane contains all deployed control plane nodes.
	// +optional
	// +listType=atomic
	ControlPlane []NodeLocation `json:"controlPlane,omitempty"`

	// workers contains all deployed worker nodes.
	// +optional
	// +listType=atomic
	Workers []NodeLocation `json:"workers,omitempty"`
}

NodeLocations holds information about the deployment state of control plane and worker nodes in Proxmox.

func (*NodeLocations) DeepCopy

func (in *NodeLocations) DeepCopy() *NodeLocations

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

func (*NodeLocations) DeepCopyInto

func (in *NodeLocations) DeepCopyInto(out *NodeLocations)

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

type ProxmoxCluster

type ProxmoxCluster struct {
	metav1.TypeMeta `json:",inline"`
	// metadata is the standard object metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// spec is the Proxmox Cluster spec
	// +kubebuilder:validation:XValidation:rule="self.ipv4Config != null || self.ipv6Config != null",message="at least one ip config must be set, either ipv4Config or ipv6Config"
	// +required
	Spec ProxmoxClusterSpec `json:"spec,omitzero"`

	// status is the Proxmox Cluster status
	// +optional
	//nolint:kubeapilinter
	Status ProxmoxClusterStatus `json:"status,omitempty,omitzero"`
}

ProxmoxCluster is the Schema for the proxmoxclusters API.

func (*ProxmoxCluster) AddInClusterZoneRef

func (c *ProxmoxCluster) AddInClusterZoneRef(pool client.Object)

AddInClusterZoneRef will set the Zone references status for the provided pool.

func (*ProxmoxCluster) AddNodeLocation

func (c *ProxmoxCluster) AddNodeLocation(loc NodeLocation, isControlPlane bool)

AddNodeLocation will add a node location to either the control plane or worker node locations based on the isControlPlane parameter.

func (*ProxmoxCluster) DeepCopy

func (in *ProxmoxCluster) DeepCopy() *ProxmoxCluster

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

func (*ProxmoxCluster) DeepCopyInto

func (in *ProxmoxCluster) DeepCopyInto(out *ProxmoxCluster)

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

func (*ProxmoxCluster) DeepCopyObject

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

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

func (*ProxmoxCluster) GetConditions

func (c *ProxmoxCluster) GetConditions() []metav1.Condition

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

func (*ProxmoxCluster) GetNode

func (c *ProxmoxCluster) GetNode(machineName string, isControlPlane bool) string

GetNode tries to return the Proxmox node for the provided machine name.

func (*ProxmoxCluster) HasMachine

func (c *ProxmoxCluster) HasMachine(machineName string, isControlPlane bool) bool

HasMachine returns if true if a machine was found on any node.

func (*ProxmoxCluster) Hub

func (*ProxmoxCluster) Hub()

Hub marks ProxmoxCluster type as a conversion hub.

func (*ProxmoxCluster) RemoveNodeLocation

func (c *ProxmoxCluster) RemoveNodeLocation(machineName string, isControlPlane bool)

RemoveNodeLocation removes a node location from the status.

func (*ProxmoxCluster) SetConditions

func (c *ProxmoxCluster) SetConditions(conditions []metav1.Condition)

SetConditions sets the underlying service state of the ProxmoxCluster to the predescribed []metav1.Condition.

func (*ProxmoxCluster) SetInClusterIPPoolRef

func (c *ProxmoxCluster) SetInClusterIPPoolRef(pool client.Object)

SetInClusterIPPoolRef will set the reference to the provided InClusterIPPool. If nil was provided, the status field will be cleared.

func (*ProxmoxCluster) UpdateNodeLocation

func (c *ProxmoxCluster) UpdateNodeLocation(machineName, node string, isControlPlane bool) bool

UpdateNodeLocation will update the node location based on the provided machine name. If the node location does not exist, it will be added.

The function returns true if the value was added or updated, otherwise false.

type ProxmoxClusterClassSpec

type ProxmoxClusterClassSpec struct {
	// machineType is the name of the template for ClusterClass.
	// +required
	// +kubebuilder:validation:MinLength=1
	MachineType string `json:"machineType,omitempty"`

	// proxmoxMachineSpec is the to be patched yaml object.
	ProxmoxMachineSpec `json:",inline"`
}

ProxmoxClusterClassSpec defines deployment templates for ClusterClass.

func (*ProxmoxClusterClassSpec) DeepCopy

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

func (*ProxmoxClusterClassSpec) DeepCopyInto

func (in *ProxmoxClusterClassSpec) DeepCopyInto(out *ProxmoxClusterClassSpec)

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

type ProxmoxClusterInitializationStatus

type ProxmoxClusterInitializationStatus struct {
	// provisioned is true when the infrastructure provider reports that the Cluster's infrastructure is fully provisioned.
	// NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Cluster provisioning.
	// +optional
	Provisioned *bool `json:"provisioned,omitempty"`
}

ProxmoxClusterInitializationStatus provides observations of the ProxmoxCluster initialization process. +kubebuilder:validation:MinProperties=1

func (*ProxmoxClusterInitializationStatus) DeepCopy

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

func (*ProxmoxClusterInitializationStatus) DeepCopyInto

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

type ProxmoxClusterList

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

ProxmoxClusterList contains a list of ProxmoxCluster.

func (*ProxmoxClusterList) DeepCopy

func (in *ProxmoxClusterList) DeepCopy() *ProxmoxClusterList

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

func (*ProxmoxClusterList) DeepCopyInto

func (in *ProxmoxClusterList) DeepCopyInto(out *ProxmoxClusterList)

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

func (*ProxmoxClusterList) DeepCopyObject

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

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

func (*ProxmoxClusterList) Hub

func (*ProxmoxClusterList) Hub()

Hub marks ProxmoxClusterList as a conversion hub.

type ProxmoxClusterSpec

type ProxmoxClusterSpec struct {
	// controlPlaneEndpoint represents the endpoint used to communicate with the control plane.
	// +optional
	ControlPlaneEndpoint APIEndpoint `json:"controlPlaneEndpoint,omitempty,omitzero"`

	// externalManagedControlPlane can be enabled to allow externally managed Control Planes to patch the
	// Proxmox cluster with the Load Balancer IP provided by Control Plane provider.
	// +optional
	// +default=false
	ExternalManagedControlPlane *bool `json:"externalManagedControlPlane,omitempty"`

	// allowedNodes specifies all Proxmox nodes which will be considered
	// for operations. This implies that VMs can be cloned on different nodes from
	// the node which holds the VM template.
	// +listType=set
	// +optional
	AllowedNodes []string `json:"allowedNodes,omitempty"`

	// schedulerHints allows to influence the decision on where a VM will be scheduled. For example by applying a multiplicator
	// to a node's resources, to allow for overprovisioning or to ensure a node will always have a safety buffer.
	// +optional
	SchedulerHints *SchedulerHints `json:"schedulerHints,omitempty"`

	// ipv4Config contains information about available IPv4 address pools and the gateway.
	// This can be combined with ipv6Config in order to enable dual stack.
	// Either IPv4Config or IPv6Config must be provided.
	// +optional
	// +kubebuilder:validation:XValidation:rule="self.addresses.size() > 0",message="IPv4Config addresses must be provided"
	IPv4Config *IPConfigSpec `json:"ipv4Config,omitempty,omitzero"`

	// ipv6Config contains information about available IPv6 address pools and the gateway.
	// This can be combined with ipv4Config in order to enable dual stack.
	// Either IPv4Config or IPv6Config must be provided.
	// +optional
	// +kubebuilder:validation:XValidation:rule="self.addresses.size() > 0",message="IPv6Config addresses must be provided"
	IPv6Config *IPConfigSpec `json:"ipv6Config,omitempty,omitzero"`

	// dnsServers contains information about nameservers used by the machines.
	// +required
	// +listType=set
	// +kubebuilder:validation:MinItems=1
	DNSServers []string `json:"dnsServers,omitempty"`

	// zoneConfig defines a IPAddress config per deployment zone.
	// +listType=map
	// +listMapKey=zone
	// +optional
	ZoneConfigs []ZoneConfigSpec `json:"zoneConfig,omitempty"`

	// credentialsRef is a reference to a Secret that contains the credentials to use for provisioning this cluster. If not
	// supplied then the credentials of the controller will be used.
	// if no namespace is provided, the namespace of the ProxmoxCluster will be used.
	// +optional
	CredentialsRef *corev1.SecretReference `json:"credentialsRef,omitempty"`
}

ProxmoxClusterSpec defines the desired state of a ProxmoxCluster.

func (*ProxmoxClusterSpec) DeepCopy

func (in *ProxmoxClusterSpec) DeepCopy() *ProxmoxClusterSpec

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

func (*ProxmoxClusterSpec) DeepCopyInto

func (in *ProxmoxClusterSpec) DeepCopyInto(out *ProxmoxClusterSpec)

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

type ProxmoxClusterStatus

type ProxmoxClusterStatus struct {
	// conditions represents the observations of a ProxmoxCluster's current state.
	// Known condition types are Ready, ProxmoxAvailable and Paused.
	// +optional
	// +listType=map
	// +listMapKey=type
	// +kubebuilder:validation:MaxItems=32
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// initialization provides observations of the ProxmoxCluster initialization process.
	// NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Cluster provisioning.
	// +optional
	Initialization ProxmoxClusterInitializationStatus `json:"initialization,omitempty,omitzero"`

	// inClusterIPPoolRef is the reference to the created in-cluster IP pool.
	// +listType=atomic
	// +optional
	InClusterIPPoolRef []corev1.LocalObjectReference `json:"inClusterIPPoolRef,omitempty"`

	// inClusterZoneRef lists InClusterIPPools per proxmox-zone.
	// +optional
	// +listType=map
	// +listMapKey=zone
	//nolint:kubeapilinter
	InClusterZoneRef []InClusterZoneRef `json:"inClusterZoneRef,omitempty"`

	// nodeLocations keeps track of which nodes have been selected
	// for different machines.
	// +optional
	NodeLocations *NodeLocations `json:"nodeLocations,omitempty"`
}

ProxmoxClusterStatus defines the observed state of a ProxmoxCluster.

func (*ProxmoxClusterStatus) DeepCopy

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

func (*ProxmoxClusterStatus) DeepCopyInto

func (in *ProxmoxClusterStatus) DeepCopyInto(out *ProxmoxClusterStatus)

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

type ProxmoxClusterTemplate

type ProxmoxClusterTemplate struct {
	metav1.TypeMeta `json:",inline"`
	// metadata is the standard object metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// spec is the Proxmox Cluster Template spec
	// +required
	Spec ProxmoxClusterTemplateSpec `json:"spec,omitzero"`
}

ProxmoxClusterTemplate is the Schema for the proxmoxclustertemplates API.

func (*ProxmoxClusterTemplate) DeepCopy

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

func (*ProxmoxClusterTemplate) DeepCopyInto

func (in *ProxmoxClusterTemplate) DeepCopyInto(out *ProxmoxClusterTemplate)

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

func (*ProxmoxClusterTemplate) DeepCopyObject

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

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

func (*ProxmoxClusterTemplate) Hub

func (*ProxmoxClusterTemplate) Hub()

Hub marks ProxmoxClusterTemplate type as a conversion hub.

type ProxmoxClusterTemplateList

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

ProxmoxClusterTemplateList contains a list of ProxmoxClusterTemplate.

func (*ProxmoxClusterTemplateList) DeepCopy

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

func (*ProxmoxClusterTemplateList) DeepCopyInto

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

func (*ProxmoxClusterTemplateList) DeepCopyObject

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

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

func (*ProxmoxClusterTemplateList) Hub

Hub marks ProxmoxMachineList as a conversion hub.

type ProxmoxClusterTemplateResource

type ProxmoxClusterTemplateResource struct {
	// metadata is the standard object metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty,omitzero"`

	// spec is the Proxmox Cluster spec
	// +required
	Spec ProxmoxClusterSpec `json:"spec,omitzero"`
}

ProxmoxClusterTemplateResource defines the spec and metadata for ProxmoxClusterTemplate supported by capi.

func (*ProxmoxClusterTemplateResource) DeepCopy

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

func (*ProxmoxClusterTemplateResource) DeepCopyInto

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

type ProxmoxClusterTemplateSpec

type ProxmoxClusterTemplateSpec struct {
	// template is the Proxmox Cluster template
	// +required
	Template ProxmoxClusterTemplateResource `json:"template,omitzero"`
}

ProxmoxClusterTemplateSpec defines the desired state of ProxmoxClusterTemplate.

func (*ProxmoxClusterTemplateSpec) DeepCopy

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

func (*ProxmoxClusterTemplateSpec) DeepCopyInto

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

type ProxmoxMachine

type ProxmoxMachine struct {
	metav1.TypeMeta `json:",inline"`
	// metadata is the standard object metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// spec is the Proxmox machine spec.
	// +kubebuilder:validation:XValidation:rule="[has(self.sourceNode), has(self.templateSelector)].exists_one(c, c)",message="must define either a SourceNode with a TemplateID or a TemplateSelector"
	// +kubebuilder:validation:XValidation:rule="[has(self.templateID), has(self.templateSelector)].exists_one(c, c)",message="must define either a SourceNode with a TemplateID or a TemplateSelector"
	// +required
	Spec ProxmoxMachineSpec `json:"spec,omitzero"`

	// status is the status of the Proxmox machine.
	// +optional
	//nolint:kubeapilinter
	Status ProxmoxMachineStatus `json:"status,omitempty,omitzero"`
}

ProxmoxMachine is the Schema for the proxmoxmachines API.

func (*ProxmoxMachine) DeepCopy

func (in *ProxmoxMachine) DeepCopy() *ProxmoxMachine

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

func (*ProxmoxMachine) DeepCopyInto

func (in *ProxmoxMachine) DeepCopyInto(out *ProxmoxMachine)

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

func (*ProxmoxMachine) DeepCopyObject

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

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

func (*ProxmoxMachine) GetConditions

func (r *ProxmoxMachine) GetConditions() []metav1.Condition

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

func (*ProxmoxMachine) GetIPAddresses

func (r *ProxmoxMachine) GetIPAddresses() []IPAddressesSpec

GetIPAddresses returns the ipaddress status of a machine.

func (*ProxmoxMachine) GetIPAddressesNet

func (r *ProxmoxMachine) GetIPAddressesNet(name NetName) *IPAddressesSpec

GetIPAddressesNet returns the ipaddresses status for a network or nil.

func (*ProxmoxMachine) GetSourceNode

func (r *ProxmoxMachine) GetSourceNode() string

GetSourceNode gets the Proxmox node used to clone this machine from.

func (*ProxmoxMachine) GetTemplateID

func (r *ProxmoxMachine) GetTemplateID() int32

GetTemplateID get the Proxmox template "vmid" used to provision this machine.

func (*ProxmoxMachine) GetTemplateMatchPolicy

func (r *ProxmoxMachine) GetTemplateMatchPolicy() TemplateMatchPolicy

GetTemplateMatchPolicy returns the resolution policy for selecting VM templates. If no TemplateSelector or MatchPolicy is set, TemplateMatchPolicyExact is returned.

func (*ProxmoxMachine) GetTemplateSelectorTags

func (r *ProxmoxMachine) GetTemplateSelectorTags() []string

GetTemplateSelectorTags get the tags, the desired vm template should have.

func (*ProxmoxMachine) GetVirtualMachineID

func (r *ProxmoxMachine) GetVirtualMachineID() int64

GetVirtualMachineID get the Proxmox "vmid".

func (*ProxmoxMachine) Hub

func (*ProxmoxMachine) Hub()

Hub marks ProxmoxMachine type as a conversion hub.

func (*ProxmoxMachine) SetConditions

func (r *ProxmoxMachine) SetConditions(conditions []metav1.Condition)

SetConditions sets the underlying service state of the ProxmoxMachine to the predescribed []metav1.Condition.

func (*ProxmoxMachine) SetIPAddresses

func (r *ProxmoxMachine) SetIPAddresses(ipSpec IPAddressesSpec)

SetIPAddresses will set the ipAddress state of a machine.

type ProxmoxMachineChecks

type ProxmoxMachineChecks struct {
	// skipCloudInitStatus skip checking CloudInit status which can be useful with specific Operating Systems like TalOS
	// +optional
	SkipCloudInitStatus *bool `json:"skipCloudInitStatus,omitempty"`
	// skipQemuGuestAgent skips checking QEMU Agent readiness which can be useful with specific Operating Systems like TalOS
	// +optional
	SkipQemuGuestAgent *bool `json:"skipQemuGuestAgent,omitempty"`
}

ProxmoxMachineChecks defines possibibles checks to skip.

func (*ProxmoxMachineChecks) DeepCopy

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

func (*ProxmoxMachineChecks) DeepCopyInto

func (in *ProxmoxMachineChecks) DeepCopyInto(out *ProxmoxMachineChecks)

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

type ProxmoxMachineInitializationStatus

type ProxmoxMachineInitializationStatus struct {
	// provisioned is true when the infrastructure provider reports that the Machine's infrastructure is fully provisioned.
	// NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Machine provisioning.
	// +optional
	Provisioned *bool `json:"provisioned,omitempty"`
}

ProxmoxMachineInitializationStatus provides observations of the ProxmoxMachine initialization process. +kubebuilder:validation:MinProperties=1

func (*ProxmoxMachineInitializationStatus) DeepCopy

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

func (*ProxmoxMachineInitializationStatus) DeepCopyInto

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

type ProxmoxMachineList

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

ProxmoxMachineList contains a list of ProxmoxMachine.

func (*ProxmoxMachineList) DeepCopy

func (in *ProxmoxMachineList) DeepCopy() *ProxmoxMachineList

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

func (*ProxmoxMachineList) DeepCopyInto

func (in *ProxmoxMachineList) DeepCopyInto(out *ProxmoxMachineList)

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

func (*ProxmoxMachineList) DeepCopyObject

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

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

func (*ProxmoxMachineList) Hub

func (*ProxmoxMachineList) Hub()

Hub marks ProxmoxMachineList as a conversion hub.

type ProxmoxMachineSpec

type ProxmoxMachineSpec struct {
	VirtualMachineCloneSpec `json:",inline"`

	// providerID is the virtual machine BIOS UUID formatted as
	// proxmox://6c3fa683-bef9-4425-b413-eaa45a9d6191
	// +optional
	// +kubebuilder:validation:MinLength=46
	// +kubebuilder:validation:MaxLength=46
	// +kubebuilder:validation:Pattern=`^proxmox://[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$`
	ProviderID string `json:"providerID,omitempty"`

	// virtualMachineID is the Proxmox identifier for the ProxmoxMachine VM.
	// +optional
	VirtualMachineID *int64 `json:"virtualMachineID,omitempty"`

	// numSockets is the number of CPU sockets in a virtual machine.
	// Defaults to the property value in the template from which the virtual machine is cloned.
	// +kubebuilder:validation:Minimum=1
	// +optional
	NumSockets *int32 `json:"numSockets,omitempty"`

	// numCores is the number of cores per CPU socket in a virtual machine.
	// Defaults to the property value in the template from which the virtual machine is cloned.
	// +kubebuilder:validation:Minimum=1
	// +optional
	NumCores *int32 `json:"numCores,omitempty"`

	// memoryMiB is the size of a virtual machine's memory, in MiB.
	// Defaults to the property value in the template from which the virtual machine is cloned.
	// +kubebuilder:validation:MultipleOf=8
	// +kubebuilder:validation:Minimum=0
	// +optional
	MemoryMiB *int32 `json:"memoryMiB,omitempty"`

	// disks contains a set of disk configuration options,
	// which will be applied before the first startup.
	//
	// +optional
	Disks *Storage `json:"disks,omitempty"`

	// network is the network configuration for this machine's VM.
	// +required
	//nolint:kubeapilinter
	Network *NetworkSpec `json:"network,omitzero"`

	// vmIDRange is the range of VMIDs to use for VMs.
	// +optional
	// +kubebuilder:validation:XValidation:rule="self.end >= self.start",message="end should be greater than or equal to start"
	VMIDRange *VMIDRange `json:"vmIDRange,omitempty,omitzero"`

	// checks defines possible checks to skip.
	// +optional
	Checks *ProxmoxMachineChecks `json:"checks,omitempty"`

	// metadataSettings defines the metadata settings for this machine's VM.
	// +optional
	MetadataSettings *MetadataSettings `json:"metadataSettings,omitempty,omitzero"`

	// allowedNodes specifies all Proxmox nodes which will be considered
	// for operations. This implies that VMs can be cloned on different nodes from
	// the node which holds the VM template.
	//
	// This field is optional and should only be set if you want to restrict
	// the nodes where the VM can be cloned.
	// If not set, the ProxmoxCluster will be used to determine the nodes.
	// +optional
	// +listType=set
	AllowedNodes []string `json:"allowedNodes,omitempty"`

	// tags is a list of tags to be applied to the virtual machine.
	// +optional
	// +immutable
	// +listType=set
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:items:Pattern=`^(?i)[a-z0-9_][a-z0-9_\-\+\.]*$`
	Tags []string `json:"tags,omitempty"`
}

ProxmoxMachineSpec defines the desired state of a ProxmoxMachine.

func (*ProxmoxMachineSpec) DeepCopy

func (in *ProxmoxMachineSpec) DeepCopy() *ProxmoxMachineSpec

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

func (*ProxmoxMachineSpec) DeepCopyInto

func (in *ProxmoxMachineSpec) DeepCopyInto(out *ProxmoxMachineSpec)

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

type ProxmoxMachineStatus

type ProxmoxMachineStatus struct {
	// conditions defines current service state of the ProxmoxMachine.
	// +optional
	// +listType=map
	// +listMapKey=type
	// +kubebuilder:validation:MaxItems=32
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// initialization provides observations of the ProxmoxMachine initialization process.
	// NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Machine provisioning.
	// +optional
	Initialization ProxmoxMachineInitializationStatus `json:"initialization,omitempty,omitzero"`

	// addresses contains the Proxmox VM instance associated addresses.
	// +optional
	// +listType=atomic
	Addresses []clusterv1.MachineAddress `json:"addresses,omitempty"`

	// vmStatus is used to identify the virtual machine status.
	// +optional
	VMStatus *VirtualMachineState `json:"vmStatus,omitempty"`

	// bootstrapDataProvided whether the virtual machine has an injected bootstrap data.
	// +optional
	BootstrapDataProvided *bool `json:"bootstrapDataProvided,omitempty"`

	// ipAddresses are the IP addresses used to access the virtual machine.
	// +optional
	// +listType=map
	// +listMapKey=net
	IPAddresses []IPAddressesSpec `json:"ipAddresses,omitempty"`

	// network returns the network status for each of the machine's configured
	// network interfaces.
	// +optional
	// +listType=atomic
	Network []NetworkStatus `json:"network,omitempty"`

	// proxmoxNode is the name of the proxmox node, which was chosen for this
	// machine to be deployed on.
	// +optional
	ProxmoxNode *string `json:"proxmoxNode,omitempty"`

	// taskRef is a managed object reference to a Task related to the ProxmoxMachine.
	// This value is set automatically at runtime and should not be set or
	// modified by users.
	// +optional
	TaskRef *string `json:"taskRef,omitempty"`

	// retryAfter tracks the time we can retry queueing a task.
	// +optional
	RetryAfter *metav1.Time `json:"retryAfter,omitempty"`
}

ProxmoxMachineStatus defines the observed state of a ProxmoxMachine.

func (*ProxmoxMachineStatus) DeepCopy

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

func (*ProxmoxMachineStatus) DeepCopyInto

func (in *ProxmoxMachineStatus) DeepCopyInto(out *ProxmoxMachineStatus)

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

type ProxmoxMachineTemplate

type ProxmoxMachineTemplate struct {
	metav1.TypeMeta `json:",inline"`
	// metadata is the standard object metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// spec is the machine template spec.
	// +required
	Spec ProxmoxMachineTemplateSpec `json:"spec,omitzero"`
}

ProxmoxMachineTemplate is the Schema for the proxmoxmachinetemplates API.

func (*ProxmoxMachineTemplate) DeepCopy

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

func (*ProxmoxMachineTemplate) DeepCopyInto

func (in *ProxmoxMachineTemplate) DeepCopyInto(out *ProxmoxMachineTemplate)

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

func (*ProxmoxMachineTemplate) DeepCopyObject

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

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

func (*ProxmoxMachineTemplate) Hub

func (*ProxmoxMachineTemplate) Hub()

Hub marks ProxmoxMachineTemplate as a conversion hub.

type ProxmoxMachineTemplateList

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

ProxmoxMachineTemplateList contains a list of ProxmoxMachineTemplate.

func (*ProxmoxMachineTemplateList) DeepCopy

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

func (*ProxmoxMachineTemplateList) DeepCopyInto

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

func (*ProxmoxMachineTemplateList) DeepCopyObject

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

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

func (*ProxmoxMachineTemplateList) Hub

Hub marks ProxmoxMachineTemplateList as a conversion hub.

type ProxmoxMachineTemplateResource

type ProxmoxMachineTemplateResource struct {
	// metadata is the standard object metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty,omitzero"`

	// spec is the Proxmox machine spec.
	// +required
	Spec ProxmoxMachineSpec `json:"spec,omitzero"`
}

ProxmoxMachineTemplateResource defines the spec and metadata for ProxmoxMachineTemplate supported by capi.

func (*ProxmoxMachineTemplateResource) DeepCopy

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

func (*ProxmoxMachineTemplateResource) DeepCopyInto

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

type ProxmoxMachineTemplateSpec

type ProxmoxMachineTemplateSpec struct {
	// template is the Proxmox machine template resource.
	// +required
	Template ProxmoxMachineTemplateResource `json:"template,omitzero"`
}

ProxmoxMachineTemplateSpec defines the desired state of ProxmoxMachineTemplate.

func (*ProxmoxMachineTemplateSpec) DeepCopy

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

func (*ProxmoxMachineTemplateSpec) DeepCopyInto

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

type RouteSpec

type RouteSpec struct {
	// to is the subnet to be routed.
	// +optional
	To *string `json:"to,omitempty"`
	// via is the gateway to the subnet.
	// +optional
	Via *string `json:"via,omitempty"`
	// metric is the priority of the route in the routing table.
	// +kubebuilder:validation:Minimum=0
	// +optional
	Metric *int32 `json:"metric,omitempty"`
	// table is the routing table used for this route.
	// +optional
	Table *int32 `json:"table,omitempty"`
}

RouteSpec describes an IPv4/IPv6 Route.

func (*RouteSpec) DeepCopy

func (in *RouteSpec) DeepCopy() *RouteSpec

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

func (*RouteSpec) DeepCopyInto

func (in *RouteSpec) DeepCopyInto(out *RouteSpec)

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

type Routing

type Routing struct {
	// routes are the routes associated with this interface.
	// +optional
	// +kubebuilder:validation:MinItems=1
	// +listType=atomic
	//nolint:kubeapilinter
	Routes []RouteSpec `json:"routes,omitempty"`

	// routingPolicy is an interface-specific policy inserted into FIB (forwarding information base).
	// +optional
	// +kubebuilder:validation:MinItems=1
	// +listType=atomic
	//nolint:kubeapilinter
	RoutingPolicy []RoutingPolicySpec `json:"routingPolicy,omitempty"`
}

Routing is shared fields across devices and VRFs.

func (*Routing) DeepCopy

func (in *Routing) DeepCopy() *Routing

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

func (*Routing) DeepCopyInto

func (in *Routing) DeepCopyInto(out *Routing)

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

type RoutingPolicySpec

type RoutingPolicySpec struct {
	// to is the subnet of the target.
	// +optional
	To *string `json:"to,omitempty"`

	// from is the subnet of the source.
	// +optional
	From *string `json:"from,omitempty"`

	// table is the routing table ID.
	// +optional
	Table *int32 `json:"table,omitempty"`

	// priority is the position in the ip rule FIB table.
	// +kubebuilder:validation:Maximum=4294967295
	// +kubebuilder:validation:XValidation:message="Cowardly refusing to insert FIB rule matching kernel rules",rule="(self > 0 && self < 32765) || (self > 32766)"
	// +optional
	Priority *int64 `json:"priority,omitempty"`
}

RoutingPolicySpec is a Linux FIB rule.

func (*RoutingPolicySpec) DeepCopy

func (in *RoutingPolicySpec) DeepCopy() *RoutingPolicySpec

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

func (*RoutingPolicySpec) DeepCopyInto

func (in *RoutingPolicySpec) DeepCopyInto(out *RoutingPolicySpec)

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

type SchedulerHints

type SchedulerHints struct {
	// memoryAdjustment allows to adjust a node's memory by a given percentage.
	// For example, setting it to 300 allows to allocate 300% of a host's memory for VMs,
	// and setting it to 95 limits memory allocation to 95% of a host's memory.
	// Setting it to 0 entirely disables scheduling memory constraints.
	// By default 100% of a node's memory will be used for allocation.
	// +kubebuilder:validation:Minimum=0
	// +optional
	MemoryAdjustment *int64 `json:"memoryAdjustment,omitempty"`
}

SchedulerHints allows to pass the scheduler instructions to (dis)allow over- or enforce underprovisioning of resources.

func (*SchedulerHints) DeepCopy

func (in *SchedulerHints) DeepCopy() *SchedulerHints

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

func (*SchedulerHints) DeepCopyInto

func (in *SchedulerHints) DeepCopyInto(out *SchedulerHints)

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

func (*SchedulerHints) GetMemoryAdjustment

func (sh *SchedulerHints) GetMemoryAdjustment() int64

GetMemoryAdjustment returns the memory adjustment percentage to use within the scheduler.

type Storage

type Storage struct {
	// bootVolume defines the storage size for the boot volume.
	// This field is optional, and should only be set if you want
	// to change the size of the boot volume.
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
	// +optional
	BootVolume *DiskSize `json:"bootVolume,omitempty,omitzero"`
}

Storage is the physical storage on the node.

func (*Storage) DeepCopy

func (in *Storage) DeepCopy() *Storage

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

func (*Storage) DeepCopyInto

func (in *Storage) DeepCopyInto(out *Storage)

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

type TargetFileStorageFormat

type TargetFileStorageFormat string

TargetFileStorageFormat the target format of the cloned disk.

const (
	TargetStorageFormatRaw   TargetFileStorageFormat = "raw"
	TargetStorageFormatQcow2 TargetFileStorageFormat = "qcow2"
	TargetStorageFormatVmdk  TargetFileStorageFormat = "vmdk"
)

Supported disk formats.

type TemplateMatchPolicy

type TemplateMatchPolicy string

TemplateMatchPolicy defines how MatchTags are evaluated against template tags.

const (
	// TemplateMatchPolicyExact requires an exact 1:1 match between MatchTags and the template's tags.
	TemplateMatchPolicyExact TemplateMatchPolicy = "exact"
	// TemplateMatchPolicySubset requires the template's tags to contain all MatchTags, but allows additional tags.
	TemplateMatchPolicySubset TemplateMatchPolicy = "uniqueSubset"
	// TemplateMatchPolicyBest selects a template with a matching subset and the least additional tags.
	TemplateMatchPolicyBest TemplateMatchPolicy = "bestSubset"
)

type TemplateSelector

type TemplateSelector struct {
	// matchTags specifies all tags to look for when looking up the VM template.
	// Passed tags must be an exact 1:1 match with the tags on the template you want to use.
	// If multiple VM templates with the same set of tags are found, provisioning will fail.
	//
	// +listType=set
	// +kubebuilder:validation:items:Pattern=`^(?i)[a-z0-9_][a-z0-9_\-\+\.]*$`
	// +kubebuilder:validation:MinItems=1
	// +required
	MatchTags []string `json:"matchTags,omitempty"`

	// matchPolicy controls how MatchTags are evaluated against template tags.
	// When not set, or set to "exact", the behaviour is identical to the previous implementation
	// and requires an exact 1:1 tag match. When set to "subset", the template's tags must contain
	// all MatchTags, but may include additional tags.
	//
	// +kubebuilder:validation:Enum=exact;uniqueSubset;bestSubset
	// +kubebuilder:default=exact
	// +optional
	MatchPolicy TemplateMatchPolicy `json:"matchPolicy,omitempty"`
}

TemplateSelector defines MatchTags for looking up VM templates.

func (*TemplateSelector) DeepCopy

func (in *TemplateSelector) DeepCopy() *TemplateSelector

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

func (*TemplateSelector) DeepCopyInto

func (in *TemplateSelector) DeepCopyInto(out *TemplateSelector)

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

type TemplateSource

type TemplateSource struct {
	// sourceNode is the initially selected proxmox node.
	// This node will be used to locate the template VM, which will
	// be used for cloning operations.
	//
	// Cloning will be performed according to the configuration.
	// Setting the `Target` field will tell Proxmox to clone the
	// VM on that target node.
	//
	// When Target is not set and the ProxmoxCluster contains
	// a set of `AllowedNodes`, the algorithm will instead evenly
	// distribute the VMs across the nodes from that list.
	//
	// If neither a `Target` nor `AllowedNodes` was set, the VM
	// will be cloned onto the same node as SourceNode.
	//
	// +kubebuilder:validation:MinLength=1
	// +optional
	SourceNode *string `json:"sourceNode,omitempty"`

	// templateID the vm_template vmid used for cloning a new VM.
	// +optional
	TemplateID *int32 `json:"templateID,omitempty"`

	// templateSelector defines MatchTags for looking up VM templates.
	// If a templateID is defined, templateSelector will be ignored.
	// +optional
	TemplateSelector *TemplateSelector `json:"templateSelector,omitempty,omitzero"`
}

TemplateSource defines the source of the template VM. +kubebuilder:validation:XValidation:rule="has(self.templateSelector) || (has(self.templateID) && has(self.sourceNode))",message="Must specify either templateID or templateSelector"

func (*TemplateSource) DeepCopy

func (in *TemplateSource) DeepCopy() *TemplateSource

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

func (*TemplateSource) DeepCopyInto

func (in *TemplateSource) DeepCopyInto(out *TemplateSource)

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

type VMIDRange

type VMIDRange struct {
	// start is the start of the VMID range to use for VMs.
	// +kubebuilder:validation:Minimum=100
	// +kubebuilder:validation:ExclusiveMinimum=false
	// +kubebuilder:validation:Maximum=999999999
	// +kubebuilder:validation:ExclusiveMaximum=false
	// +required
	Start int64 `json:"start,omitempty"`

	// end is the end of the VMID range to use for VMs.
	// Only used if VMIDRangeStart is set.
	// +kubebuilder:validation:Minimum=100
	// +kubebuilder:validation:ExclusiveMinimum=false
	// +kubebuilder:validation:Maximum=999999999
	// +kubebuilder:validation:ExclusiveMaximum=false
	// +required
	End int64 `json:"end,omitempty"`
}

VMIDRange defines the range of VMIDs to use for VMs.

func (*VMIDRange) DeepCopy

func (in *VMIDRange) DeepCopy() *VMIDRange

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

func (*VMIDRange) DeepCopyInto

func (in *VMIDRange) DeepCopyInto(out *VMIDRange)

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

type VRFDevice

type VRFDevice struct {
	// interfaces is the list of proxmox network devices managed by this virtual device.
	// +optional
	// +listType=atomic
	Interfaces []NetName `json:"interfaces,omitempty"`

	// name is the virtual network device name.
	// Must be unique within the virtual machine.
	// +kubebuilder:validation:MinLength=3
	// +required
	Name string `json:"name,omitempty"`

	// table is the ID of the routing table used for the l3mdev vrf device.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=4294967295
	// +kubebuilder:validation:XValidation:message="Cowardly refusing to insert l3mdev rules into kernel tables",rule="(self > 0 && self < 254) || (self > 255)"
	// +required
	Table int32 `json:"table,omitempty"`

	// Routing is the common spec of routes and routing policies to all interfaces and VRFs.
	Routing `json:",inline"`
}

VRFDevice defines Virtual Routing Flow devices.

func (*VRFDevice) DeepCopy

func (in *VRFDevice) DeepCopy() *VRFDevice

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

func (*VRFDevice) DeepCopyInto

func (in *VRFDevice) DeepCopyInto(out *VRFDevice)

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

type VirtualMachine

type VirtualMachine struct {
	// node is the VM node.
	// +required
	// +kubebuilder:validation:MinLength=1
	Node string `json:"node,omitempty"`

	// name is the VM's name.
	// +required
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name,omitempty"`

	// vmID is the VM's ID.
	// +required
	// +kubebuilder:validation:Minimum=100
	// +kubebuilder:validation:ExclusiveMinimum=false
	VMID int64 `json:"vmID,omitempty"`

	// state is the VM's state.
	// +required
	// +kubebuilder:validation:Enum=notfound;pending;ready
	State VirtualMachineState `json:"state,omitempty"`

	// network is the status of the VM's network devices.
	// +required
	// +listType=atomic
	Network []NetworkStatus `json:"network,omitempty"`
}

VirtualMachine represents data about a Proxmox virtual machine object.

func (*VirtualMachine) DeepCopy

func (in *VirtualMachine) DeepCopy() *VirtualMachine

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

func (*VirtualMachine) DeepCopyInto

func (in *VirtualMachine) DeepCopyInto(out *VirtualMachine)

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

type VirtualMachineCloneSpec

type VirtualMachineCloneSpec struct {
	TemplateSource `json:",inline"`

	// description for the new VM.
	// +optional
	Description *string `json:"description,omitempty"`

	// format for file storage. Only valid for full clone.
	// +kubebuilder:validation:Enum=raw;qcow2;vmdk
	// +optional
	Format *TargetFileStorageFormat `json:"format,omitempty"`

	// full Create a full copy of all disks.
	// This is always done when you clone a normal VM.
	// Defaults to true when not specified, creating a full clone by default.
	// +default=true
	// +optional
	Full *bool `json:"full,omitempty"`

	// pool Add the new VM to the specified pool.
	// +optional
	Pool *string `json:"pool,omitempty"`

	// snapName is the name of the snapshot.
	// +optional
	SnapName *string `json:"snapName,omitempty"`

	// storage for full clone.
	// +optional
	Storage *string `json:"storage,omitempty"`
}

VirtualMachineCloneSpec is information used to clone a virtual machine. +kubebuilder:validation:XValidation:rule="self.full || !has(self.format)",message="Must set full=true when specifying format" +kubebuilder:validation:XValidation:rule="self.full || !has(self.storage)",message="Must set full=true when specifying storage"

func (*VirtualMachineCloneSpec) DeepCopy

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

func (*VirtualMachineCloneSpec) DeepCopyInto

func (in *VirtualMachineCloneSpec) DeepCopyInto(out *VirtualMachineCloneSpec)

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

type VirtualMachineState

type VirtualMachineState string

VirtualMachineState describes the state of a VM.

type VirtualNetworkDevices

type VirtualNetworkDevices struct {
	// vrfs defines VRF Devices.
	// +optional
	// +listType=map
	// +listMapKey=name
	VRFs []VRFDevice `json:"vrfs,omitempty"`
}

VirtualNetworkDevices defines Linux software networking devices.

func (*VirtualNetworkDevices) DeepCopy

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

func (*VirtualNetworkDevices) DeepCopyInto

func (in *VirtualNetworkDevices) DeepCopyInto(out *VirtualNetworkDevices)

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

type Zone

type Zone *string

Zone is a formally verified Proxmox network zone name. Needs to adhere to Label rules. +kubebuilder:validation:Pattern=`^[a-z0-9A-Z](?:[a-z0-9A-Z-_.]{0,61}[a-z0-9A-Z])?$`

type ZoneConfigSpec

type ZoneConfigSpec struct {
	// zone is the name of your deployment zone.
	// +required
	Zone Zone `json:"zone,omitempty"`

	// ipv4Config contains information about available IPv4 address pools and the gateway.
	// This can be combined with ipv6Config in order to enable dual stack.
	// Either IPv4Config or IPv6Config must be provided.
	// +optional
	// +kubebuilder:validation:XValidation:rule="self.addresses.size() > 0",message="IPv4Config addresses must be provided"
	IPv4Config *IPConfigSpec `json:"ipv4Config,omitempty,omitzero"`

	// ipv6Config contains information about available IPv6 address pools and the gateway.
	// This can be combined with ipv4Config in order to enable dual stack.
	// Either IPv4Config or IPv6Config must be provided.
	// +optional
	// +kubebuilder:validation:XValidation:rule="self.addresses.size() > 0",message="IPv6Config addresses must be provided"
	IPv6Config *IPConfigSpec `json:"ipv6Config,omitempty,omitzero"`

	// dnsServers contains information about nameservers used by the machines in this zone.
	// +required
	// +listType=set
	// +kubebuilder:validation:MinItems=1
	DNSServers []string `json:"dnsServers,omitempty"`
}

ZoneConfigSpec is the Network Configuration for further deployment zones.

func (*ZoneConfigSpec) DeepCopy

func (in *ZoneConfigSpec) DeepCopy() *ZoneConfigSpec

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

func (*ZoneConfigSpec) DeepCopyInto

func (in *ZoneConfigSpec) DeepCopyInto(out *ZoneConfigSpec)

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