v1alpha1

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

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 (
	// VMProvisionedCondition documents the status of the provisioning of a ProxmoxMachine and its underlying ProxmoxVM.
	VMProvisionedCondition clusterv1.ConditionType = "VMProvisioned"

	// VMProvisionFailedReason used for failures during instance provisioning.
	VMProvisionFailedReason = "VMProvisionFailed"

	// VMTerminatedReason used when vm is being terminated.
	VMTerminatedReason = "VMTerminated"

	// WaitingForClusterInfrastructureReason (Severity=Info) documents a ProxmoxMachine waiting for the cluster
	// infrastructure to be ready before starting the provisioning process.
	//
	// NOTE: This reason does not apply to ProxmoxVM (this state happens before the ProxmoxVM is actually created).
	WaitingForClusterInfrastructureReason = "WaitingForClusterInfrastructure"

	// WaitingForBootstrapDataReason (Severity=Info) documents a ProxmoxMachine waiting for the bootstrap
	// script to be ready before starting the provisioning process.
	//
	// NOTE: This reason does not apply to ProxmoxVM (this state happens before the ProxmoxVM is actually created).
	WaitingForBootstrapDataReason = "WaitingForBootstrapData"

	// WaitingForStaticIPAllocationReason (Severity=Info) documents a ProxmoxVM waiting for the allocation of
	// a static IP address.
	WaitingForStaticIPAllocationReason = "WaitingForStaticIPAllocation"

	// CloningReason documents (Severity=Info) a ProxmoxMachine/ProxmoxVM currently executing the clone operation.
	CloningReason = "Cloning"

	// CloningFailedReason (Severity=Warning) documents a ProxmoxMachine/ProxmoxVM controller detecting
	// an error while provisioning; those kind of errors are usually transient and failed provisioning
	// are automatically re-tried by the controller.
	CloningFailedReason = "CloningFailed"

	// PoweringOnReason documents (Severity=Info) a ProxmoxMachine/ProxmoxVM currently executing the power on sequence.
	PoweringOnReason = "PoweringOn"

	// PoweringOnFailedReason (Severity=Warning) documents a ProxmoxMachine/ProxmoxVM controller detecting
	// an error while powering on; those kind of errors are usually transient and failed provisioning
	// are automatically re-tried by the controller.
	PoweringOnFailedReason = "PoweringOnFailed"

	// VMProvisionStarted used for starting vm provisioning.
	VMProvisionStarted = "VMProvisionStarted"

	// TaskFailure (Severity=Warning) documents a ProxmoxMachine/Proxmox task failure; the reconcile look will automatically
	// retry the operation, but a user intervention might be required to fix the problem.
	TaskFailure = "TaskFailure"

	// WaitingForNetworkAddressesReason (Severity=Info) documents a ProxmoxMachine waiting for the the machine network
	// settings to be reported after machine being powered on.
	//
	// NOTE: This reason does not apply to ProxmoxVM (this state happens after the ProxmoxVM is in ready state).
	WaitingForNetworkAddressesReason = "WaitingForNetworkAddresses"

	// NotFoundReason (Severity=Warning) documents the ProxmoxVM not found.
	NotFoundReason = "NotFound"

	// UnknownReason (Severity=Warning) documents the ProxmoxVM Unknown.
	UnknownReason = "Unknown"
)
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"
)
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 = "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 (
	// ProxmoxClusterReady documents the status of ProxmoxCluster and its underlying resources.
	ProxmoxClusterReady clusterv1.ConditionType = "ClusterReady"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.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 AdditionalNetworkDevice

type AdditionalNetworkDevice struct {
	NetworkDevice `json:",inline"`

	// Name is the network device name.
	// Must be unique within the virtual machine and different from the primary device 'net0'.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:XValidation:rule="self != 'net0'",message="additional network devices doesn't allow net0"
	Name string `json:"name"`

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

AdditionalNetworkDevice the definition of a Proxmox network device. +kubebuilder:validation:XValidation:rule="self.ipv4PoolRef != null || self.ipv6PoolRef != null",message="at least one pool reference must be set, either ipv4PoolRef or ipv6PoolRef"

func (*AdditionalNetworkDevice) DeepCopy

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

func (*AdditionalNetworkDevice) DeepCopyInto

func (in *AdditionalNetworkDevice) DeepCopyInto(out *AdditionalNetworkDevice)

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

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].
	Disk string `json:"disk"`

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

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 IPAddress

type IPAddress struct {
	// IPV4 is the IPv4 address.
	// +optional
	IPV4 string `json:"ipv4,omitempty"`

	// IPV6 is the IPv6 address.
	// +optional
	IPV6 string `json:"ipv6,omitempty"`
}

IPAddress defines the IP addresses of a network interface.

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.

type IPConfigSpec added in v0.4.0

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

	// Prefix is the network prefix to use.
	// +kubebuilder:validation:Maximum=128
	Prefix int `json:"prefix"`

	// Gateway
	// +optional
	Gateway string `json:"gateway,omitempty"`

	// Metric is the route priority applied to the default gateway
	// +kubebuilder:default=100
	Metric *uint32 `json:"metric"`
}

IPConfigSpec contains information about available IP config.

func (*IPConfigSpec) DeepCopy added in v0.4.0

func (in *IPConfigSpec) DeepCopy() *IPConfigSpec

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

func (*IPConfigSpec) DeepCopyInto added in v0.4.0

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

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

type InterfaceConfig added in v0.3.0

type InterfaceConfig struct {
	// IPv4PoolRef 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:XValidation:rule="self.apiGroup == 'ipam.cluster.x-k8s.io'",message="ipv4PoolRef allows only IPAM apiGroup ipam.cluster.x-k8s.io"
	// +kubebuilder:validation:XValidation:rule="self.kind == 'InClusterIPPool' || self.kind == 'GlobalInClusterIPPool'",message="ipv4PoolRef allows either InClusterIPPool or GlobalInClusterIPPool"
	IPv4PoolRef *corev1.TypedLocalObjectReference `json:"ipv4PoolRef,omitempty"`

	// IPv6PoolRef is a reference to an IPAM pool resource, which exposes IPv6 addresses.
	// The network device will use an available IP address from the referenced pool.
	// this can be combined with `IPv4PoolRef` in order to enable dual stack.
	// +optional
	// +kubebuilder:validation:XValidation:rule="self.apiGroup == 'ipam.cluster.x-k8s.io'",message="ipv6PoolRef allows only IPAM apiGroup ipam.cluster.x-k8s.io"
	// +kubebuilder:validation:XValidation:rule="self.kind == 'InClusterIPPool' || self.kind == 'GlobalInClusterIPPool'",message="ipv6PoolRef allows either InClusterIPPool or GlobalInClusterIPPool"
	IPv6PoolRef *corev1.TypedLocalObjectReference `json:"ipv6PoolRef,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
	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
	LinkMTU MTU `json:"linkMtu,omitempty"`
}

InterfaceConfig contains all configurables a network interface can have.

func (*InterfaceConfig) DeepCopy added in v0.3.0

func (in *InterfaceConfig) DeepCopy() *InterfaceConfig

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

func (*InterfaceConfig) DeepCopyInto added in v0.3.0

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 added in v0.4.0

type MTU *uint16

MTU is the network device Maximum Transmission Unit. MTUs below 1280 break IPv6. +optional +kubebuilder:validation:XValidation:rule="self == 1 || ( self >= 576 && self <= 65520)",message="invalid MTU value"

type NetworkDevice

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

	// Model is the network device model.
	// +optional
	// +kubebuilder:validation:Enum=e1000;virtio;rtl8139;vmxnet3
	// +kubebuilder: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
	MTU MTU `json:"mtu,omitempty"`

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

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 {
	// Default is the default network device,
	// which will be used for the primary network interface.
	// net0 is always the default network device.
	// +optional
	Default *NetworkDevice `json:"default,omitempty"`

	// AdditionalDevices defines additional network devices bound to the virtual machine.
	// +optional
	// +listType=map
	// +listMapKey=name
	AdditionalDevices []AdditionalNetworkDevice `json:"additionalDevices,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.
	Connected bool `json:"connected,omitempty"`

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

	// MACAddr is the MAC address of the network device.
	MACAddr string `json:"macAddr"`

	// NetworkName is the name of the network.
	// +optional
	NetworkName string `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.
	Machine corev1.LocalObjectReference `json:"machine"`

	// Node is the Proxmox node.
	Node string `json:"node"`
}

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
	ControlPlane []NodeLocation `json:"controlPlane,omitempty"`

	// Workers contains all deployed worker nodes.
	// +optional
	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"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +kubebuilder:validation:XValidation:rule="self.ipv4Config != null || self.ipv6Config != null",message="at least one ip config must be set, either ipv4Config or ipv6Config"
	Spec   ProxmoxClusterSpec   `json:"spec,omitempty"`
	Status ProxmoxClusterStatus `json:"status,omitempty"`
}

ProxmoxCluster is the Schema for the proxmoxclusters API.

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() clusterv1.Conditions

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) 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 clusterv1.Conditions)

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

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 ProxmoxClusterCloneSpec added in v0.4.0

type ProxmoxClusterCloneSpec struct {
	// +kubebuilder:validation:XValidation:rule="has(self.controlPlane)",message="Cowardly refusing to deploy cluster without control plane"
	ProxmoxMachineSpec map[string]ProxmoxMachineSpec `json:"machineSpec"`

	// SshAuthorizedKeys contains the authorized keys deployed to the PROXMOX VMs.
	// +optional
	SSHAuthorizedKeys []string `json:"sshAuthorizedKeys,omitempty"`

	// VirtualIPNetworkInterface is the interface the k8s control plane binds to.
	// +optional
	VirtualIPNetworkInterface string `json:"virtualIPNetworkInterface,omitempty"`
}

ProxmoxClusterCloneSpec is the configuration pertaining to all items configurable in the configuration and cloning of a proxmox VM.

func (*ProxmoxClusterCloneSpec) DeepCopy added in v0.4.0

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

func (*ProxmoxClusterCloneSpec) DeepCopyInto added in v0.4.0

func (in *ProxmoxClusterCloneSpec) DeepCopyInto(out *ProxmoxClusterCloneSpec)

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.

type ProxmoxClusterSpec

type ProxmoxClusterSpec struct {
	// ControlPlaneEndpoint represents the endpoint used to communicate with the control plane.
	// +optional
	// +kubebuilder:validation:XValidation:rule="self.port > 0 && self.port < 65536",message="port must be within 1-65535"
	ControlPlaneEndpoint *clusterv1.APIEndpoint `json:"controlPlaneEndpoint"`

	// 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.
	// +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"`

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

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

	// NodeCloneSpec is the configuration pertaining to all items configurable
	// in the configuration and cloning of a proxmox VM. Multiple types of nodes can be specified.
	// +optional
	CloneSpec *ProxmoxClusterCloneSpec `json:"cloneSpec,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 {
	// Ready indicates that the cluster is ready.
	// +optional
	// +kubebuilder:default=false
	Ready bool `json:"ready"`

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

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

	// FailureReason will be set in the event that there is a terminal problem
	// reconciling the Machine and will contain a succinct value suitable
	// for machine interpretation.
	//
	// This field should not be set for transitive errors that a controller
	// faces that are expected to be fixed automatically over
	// time (like service outages), but instead indicate that something is
	// fundamentally wrong with the Machine's spec or the configuration of
	// the controller, and that manual intervention is required. Examples
	// of terminal errors would be invalid combinations of settings in the
	// spec, values that are unsupported by the controller, or the
	// responsible controller itself being critically misconfigured.
	//
	// Any transient errors that occur during the reconciliation of ProxmoxCluster
	// can be added as events to the ProxmoxCluster object and/or logged in the
	// controller's output.
	// +optional
	FailureReason *errors.ClusterStatusError `json:"failureReason,omitempty"`

	// FailureMessage will be set in the event that there is a terminal problem
	// reconciling the Machine and will contain a more verbose string suitable
	// for logging and human consumption.
	//
	// This field should not be set for transitive errors that a controller
	// faces that are expected to be fixed automatically over
	// time (like service outages), but instead indicate that something is
	// fundamentally wrong with the Machine's spec or the configuration of
	// the controller, and that manual intervention is required. Examples
	// of terminal errors would be invalid combinations of settings in the
	// spec, values that are unsupported by the controller, or the
	// responsible controller itself being critically misconfigured.
	//
	// Any transient errors that occur during the reconciliation of ProxmoxMachines
	// can be added as events to the ProxmoxCluster object and/or logged in the
	// controller's output.
	// +optional
	FailureMessage *string `json:"failureMessage,omitempty"`

	// Conditions defines current service state of the ProxmoxCluster.
	// +optional
	Conditions clusterv1.Conditions `json:"conditions,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 added in v0.4.0

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

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

ProxmoxClusterTemplate is the Schema for the proxmoxclustertemplates API.

func (*ProxmoxClusterTemplate) DeepCopy added in v0.4.0

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

func (*ProxmoxClusterTemplate) DeepCopyInto added in v0.4.0

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 added in v0.4.0

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

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

type ProxmoxClusterTemplateList added in v0.4.0

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 added in v0.4.0

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

func (*ProxmoxClusterTemplateList) DeepCopyInto added in v0.4.0

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

func (*ProxmoxClusterTemplateList) DeepCopyObject added in v0.4.0

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

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

type ProxmoxClusterTemplateResource added in v0.4.0

type ProxmoxClusterTemplateResource struct {
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"`
	Spec       ProxmoxClusterSpec   `json:"spec"`
}

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

func (*ProxmoxClusterTemplateResource) DeepCopy added in v0.4.0

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

func (*ProxmoxClusterTemplateResource) DeepCopyInto added in v0.4.0

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

type ProxmoxClusterTemplateSpec added in v0.4.0

type ProxmoxClusterTemplateSpec struct {
	Template ProxmoxClusterTemplateResource `json:"template"`
}

ProxmoxClusterTemplateSpec defines the desired state of ProxmoxClusterTemplate.

func (*ProxmoxClusterTemplateSpec) DeepCopy added in v0.4.0

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

func (*ProxmoxClusterTemplateSpec) DeepCopyInto added in v0.4.0

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"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +kubebuilder:validation:XValidation:rule="self.full && self.format != ”",message="Must set full=true when specifying format"
	Spec   ProxmoxMachineSpec   `json:"spec,omitempty"`
	Status ProxmoxMachineStatus `json:"status,omitempty"`
}

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() clusterv1.Conditions

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

func (*ProxmoxMachine) GetNode

func (r *ProxmoxMachine) GetNode() string

GetNode get the Proxmox node used to provision this machine.

func (*ProxmoxMachine) GetTemplateID

func (r *ProxmoxMachine) GetTemplateID() int32

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

func (*ProxmoxMachine) GetVirtualMachineID

func (r *ProxmoxMachine) GetVirtualMachineID() int64

GetVirtualMachineID get the Proxmox "vmid".

func (*ProxmoxMachine) SetConditions

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

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

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.

type ProxmoxMachineSpec

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

	// ProviderID is the virtual machine BIOS UUID formatted as
	// proxmox://6c3fa683-bef9-4425-b413-eaa45a9d6191
	// +optional
	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
	// +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.
	// +optional
	Network *NetworkSpec `json:"network,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 {
	// Ready indicates the Docker infrastructure has been provisioned and is ready.
	// +optional
	Ready bool `json:"ready"`

	// Addresses contains the Proxmox VM instance associated addresses.
	// +optional
	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
	IPAddresses map[string]IPAddress `json:"ipAddresses,omitempty"`

	// Network returns the network status for each of the machine's configured.
	// network interfaces.
	// +optional
	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"`

	// FailureReason will be set in the event that there is a terminal problem
	// reconciling the Machine and will contain a succinct value suitable
	// for machine interpretation.
	//
	// This field should not be set for transitive errors that a controller
	// faces that are expected to be fixed automatically over
	// time (like service outages), but instead indicate that something is
	// fundamentally wrong with the Machine's spec or the configuration of
	// the controller, and that manual intervention is required. Examples
	// of terminal errors would be invalid combinations of settings in the
	// spec, values that are unsupported by the controller, or the
	// responsible controller itself being critically misconfigured.
	//
	// Any transient errors that occur during the reconciliation of ProxmoxMachines
	// can be added as events to the ProxmoxMachine object and/or logged in the
	// controller's output.
	// +optional
	FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"`

	// FailureMessage will be set in the event that there is a terminal problem
	// reconciling the Machine and will contain a more verbose string suitable
	// for logging and human consumption.
	//
	// This field should not be set for transitive errors that a controller
	// faces that are expected to be fixed automatically over
	// time (like service outages), but instead indicate that something is
	// fundamentally wrong with the Machine's spec or the configuration of
	// the controller, and that manual intervention is required. Examples
	// of terminal errors would be invalid combinations of settings in the
	// spec, values that are unsupported by the controller, or the
	// responsible controller itself being critically misconfigured.
	//
	// Any transient errors that occur during the reconciliation of ProxmoxMachines
	// can be added as events to the ProxmoxMachine object and/or logged in the
	// controller's output.
	// +optional
	FailureMessage *string `json:"failureMessage,omitempty"`

	// Conditions defines current service state of the ProxmoxMachine.
	// +optional
	Conditions clusterv1.Conditions `json:"conditions,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"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

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

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.

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.

type ProxmoxMachineTemplateResource

type ProxmoxMachineTemplateResource struct {
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"`
	Spec       ProxmoxMachineSpec   `json:"spec"`
}

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 ProxmoxMachineTemplateResource `json:"template"`
}

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 added in v0.3.0

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.
	// +optional
	Metric uint32 `json:"metric,omitempty"`
	// Table is the routing table used for this route.
	// +optional
	Table uint32 `json:"table,omitempty"`
}

RouteSpec describes an IPv4/IPv6 Route.

func (*RouteSpec) DeepCopy added in v0.3.0

func (in *RouteSpec) DeepCopy() *RouteSpec

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

func (*RouteSpec) DeepCopyInto added in v0.3.0

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 added in v0.4.0

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

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

Routing is shared fields across devices and VRFs.

func (*Routing) DeepCopy added in v0.4.0

func (in *Routing) DeepCopy() *Routing

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

func (*Routing) DeepCopyInto added in v0.4.0

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 added in v0.3.0

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 *uint32 `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 uint32 `json:"priority,omitempty"`
}

RoutingPolicySpec is a Linux FIB rule.

func (*RoutingPolicySpec) DeepCopy added in v0.3.0

func (in *RoutingPolicySpec) DeepCopy() *RoutingPolicySpec

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

func (*RoutingPolicySpec) DeepCopyInto added in v0.3.0

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 added in v0.2.0

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.
	// +optional
	MemoryAdjustment *uint64 `json:"memoryAdjustment,omitempty"`
}

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

func (*SchedulerHints) DeepCopy added in v0.2.0

func (in *SchedulerHints) DeepCopy() *SchedulerHints

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

func (*SchedulerHints) DeepCopyInto added in v0.2.0

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 added in v0.2.0

func (sh *SchedulerHints) GetMemoryAdjustment() uint64

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"`
}

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 VRFDevice added in v0.3.0

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

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

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

	// 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 added in v0.3.0

func (in *VRFDevice) DeepCopy() *VRFDevice

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

func (*VRFDevice) DeepCopyInto added in v0.3.0

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.
	Node string `json:"node"`

	// Name is the VM's name.
	Name string `json:"name"`

	// VMID is the VM's ID.
	VMID uint64 `json:"vmID"`

	// State is the VM's state.
	State VirtualMachineState `json:"state"`

	// Network is the status of the VM's network devices.
	Network []NetworkStatus `json:"network"`
}

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 {
	// 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
	SourceNode string `json:"sourceNode"`

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

	// 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
	// +kubebuilder:default=raw
	// +optional
	Format *TargetFileStorageFormat `json:"format,omitempty"`

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

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

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

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

	// Target node. Only allowed if the original VM is on shared storage.
	// +optional
	Target *string `json:"target,omitempty"`
}

VirtualMachineCloneSpec is information used to clone a virtual machine.

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.

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"
)

type VirtualNetworkDevices added in v0.3.0

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

VirtualNetworkDevices defines Linux software networking devices.

func (*VirtualNetworkDevices) DeepCopy added in v0.3.0

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

func (*VirtualNetworkDevices) DeepCopyInto added in v0.3.0

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

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