Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the infra.hkc.io v1alpha1 API group. +kubebuilder:object:generate=true +groupName=infra.hkc.io
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "infra.hkc.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type HCloudLoadBalancer ¶
type HCloudLoadBalancer struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec HCloudLoadBalancerSpec `json:"spec,omitempty"`
Status HCloudLoadBalancerStatus `json:"status,omitempty"`
}
HCloudLoadBalancer is the Schema for the hcloudloadbalancers API.
func (*HCloudLoadBalancer) DeepCopy ¶
func (in *HCloudLoadBalancer) DeepCopy() *HCloudLoadBalancer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HCloudLoadBalancer.
func (*HCloudLoadBalancer) DeepCopyInto ¶
func (in *HCloudLoadBalancer) DeepCopyInto(out *HCloudLoadBalancer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HCloudLoadBalancer) DeepCopyObject ¶
func (in *HCloudLoadBalancer) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HCloudLoadBalancerList ¶
type HCloudLoadBalancerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []HCloudLoadBalancer `json:"items"`
}
HCloudLoadBalancerList contains a list of HCloudLoadBalancer.
func (*HCloudLoadBalancerList) DeepCopy ¶
func (in *HCloudLoadBalancerList) DeepCopy() *HCloudLoadBalancerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HCloudLoadBalancerList.
func (*HCloudLoadBalancerList) DeepCopyInto ¶
func (in *HCloudLoadBalancerList) DeepCopyInto(out *HCloudLoadBalancerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HCloudLoadBalancerList) DeepCopyObject ¶
func (in *HCloudLoadBalancerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HCloudLoadBalancerSpec ¶
type HCloudLoadBalancerSpec struct {
// LoadBalancerType is the Hetzner load balancer type (e.g. lb11, lb21, lb31).
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
LoadBalancerType string `json:"loadBalancerType"`
// Location is the Hetzner datacenter location (e.g. fsn1, nbg1, hel1).
// +optional
Location string `json:"location,omitempty"`
// NetworkZone is the Hetzner network zone (e.g. eu-central, us-east).
// +optional
NetworkZone string `json:"networkZone,omitempty"`
// Algorithm selects the balancing algorithm. Supported values are
// "round_robin" and "least_connections".
// +optional
// +kubebuilder:default:=round_robin
// +kubebuilder:validation:Enum=round_robin;least_connections
Algorithm string `json:"algorithm,omitempty"`
// ServerSelector selects HCloudServer resources to attach as targets.
// This matches the Kubernetes labels on HCloudServer objects.
// +optional
ServerSelector *metav1.LabelSelector `json:"serverSelector,omitempty"`
// Labels to attach to the Hetzner Cloud load balancer resource.
// +optional
Labels map[string]string `json:"labels,omitempty"`
}
HCloudLoadBalancerSpec defines the desired state of an HCloudLoadBalancer. +kubebuilder:validation:XValidation:rule="!has(self.location) || !has(self.networkZone)",message="location and networkZone are mutually exclusive" +kubebuilder:validation:XValidation:rule="self.loadBalancerType == oldSelf.loadBalancerType",message="loadBalancerType is immutable after creation" +kubebuilder:validation:XValidation:rule="!has(oldSelf.location) || !has(self.location) || self.location == oldSelf.location",message="location is immutable after creation" +kubebuilder:validation:XValidation:rule="!has(oldSelf.networkZone) || !has(self.networkZone) || self.networkZone == oldSelf.networkZone",message="networkZone is immutable after creation"
func (*HCloudLoadBalancerSpec) DeepCopy ¶
func (in *HCloudLoadBalancerSpec) DeepCopy() *HCloudLoadBalancerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HCloudLoadBalancerSpec.
func (*HCloudLoadBalancerSpec) DeepCopyInto ¶
func (in *HCloudLoadBalancerSpec) DeepCopyInto(out *HCloudLoadBalancerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HCloudLoadBalancerStatus ¶
type HCloudLoadBalancerStatus struct {
// LoadBalancerID is the Hetzner Cloud internal load balancer ID.
// +optional
LoadBalancerID int64 `json:"loadBalancerID,omitempty"`
// PublicIPv4 is the load balancer's public IPv4 address.
// +optional
PublicIPv4 string `json:"publicIPv4,omitempty"`
// PublicIPv6 is the load balancer's public IPv6 address.
// +optional
PublicIPv6 string `json:"publicIPv6,omitempty"`
// AttachedServerIDs are server IDs currently attached as targets.
// +optional
AttachedServerIDs []int64 `json:"attachedServerIDs,omitempty"`
// Conditions represent the latest available observations of the load balancer's current state.
// +optional
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
HCloudLoadBalancerStatus defines the observed state of an HCloudLoadBalancer.
func (*HCloudLoadBalancerStatus) DeepCopy ¶
func (in *HCloudLoadBalancerStatus) DeepCopy() *HCloudLoadBalancerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HCloudLoadBalancerStatus.
func (*HCloudLoadBalancerStatus) DeepCopyInto ¶
func (in *HCloudLoadBalancerStatus) DeepCopyInto(out *HCloudLoadBalancerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HCloudServer ¶
type HCloudServer struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec HCloudServerSpec `json:"spec,omitempty"`
Status HCloudServerStatus `json:"status,omitempty"`
}
HCloudServer is the Schema for the hcloudservers API. It represents a Hetzner Cloud virtual machine managed by the hcloud-operator.
func (*HCloudServer) DeepCopy ¶
func (in *HCloudServer) DeepCopy() *HCloudServer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HCloudServer.
func (*HCloudServer) DeepCopyInto ¶
func (in *HCloudServer) DeepCopyInto(out *HCloudServer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HCloudServer) DeepCopyObject ¶
func (in *HCloudServer) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HCloudServerList ¶
type HCloudServerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []HCloudServer `json:"items"`
}
HCloudServerList contains a list of HCloudServer.
func (*HCloudServerList) DeepCopy ¶
func (in *HCloudServerList) DeepCopy() *HCloudServerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HCloudServerList.
func (*HCloudServerList) DeepCopyInto ¶
func (in *HCloudServerList) DeepCopyInto(out *HCloudServerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HCloudServerList) DeepCopyObject ¶
func (in *HCloudServerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HCloudServerSpec ¶
type HCloudServerSpec struct {
// ServerType is the Hetzner Cloud server type (e.g. cx21, cx31, cpx41).
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
ServerType string `json:"serverType"`
// Image is the OS image to use (e.g. ubuntu-22.04, debian-12).
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
Image string `json:"image"`
// Location is the Hetzner datacenter location (e.g. fsn1, nbg1, hel1, ash, hil).
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
Location string `json:"location"`
// Labels to attach to the Hetzner Cloud server resource.
// +optional
Labels map[string]string `json:"labels,omitempty"`
// SSHKeys is a list of SSH key names or IDs to inject into the server on creation.
// +optional
SSHKeys []string `json:"sshKeys,omitempty"`
// UserData is cloud-init user-data to pass to the server on first boot.
// Must be a valid cloud-config or shell script. Applied once at creation time.
// +optional
// +kubebuilder:validation:MaxLength=32768
UserData string `json:"userData,omitempty"`
}
HCloudServerSpec defines the desired state of an HCloudServer. +kubebuilder:validation:XValidation:rule="self.serverType == oldSelf.serverType",message="serverType is immutable after creation" +kubebuilder:validation:XValidation:rule="self.image == oldSelf.image",message="image is immutable after creation" +kubebuilder:validation:XValidation:rule="self.location == oldSelf.location",message="location is immutable after creation"
func (*HCloudServerSpec) DeepCopy ¶
func (in *HCloudServerSpec) DeepCopy() *HCloudServerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HCloudServerSpec.
func (*HCloudServerSpec) DeepCopyInto ¶
func (in *HCloudServerSpec) DeepCopyInto(out *HCloudServerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HCloudServerStatus ¶
type HCloudServerStatus struct {
// ServerID is the Hetzner Cloud internal server ID.
// +optional
ServerID int64 `json:"serverID,omitempty"`
// State is the current Hetzner server state (e.g. running, stopped, initializing).
// +optional
State string `json:"state,omitempty"`
// PublicIPv4 is the server's public IPv4 address.
// +optional
PublicIPv4 string `json:"publicIPv4,omitempty"`
// PublicIPv6 is the server's public IPv6 network prefix.
// +optional
PublicIPv6 string `json:"publicIPv6,omitempty"`
// Conditions represent the latest available observations of the server's current state.
// +optional
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
HCloudServerStatus defines the observed state of an HCloudServer.
func (*HCloudServerStatus) DeepCopy ¶
func (in *HCloudServerStatus) DeepCopy() *HCloudServerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HCloudServerStatus.
func (*HCloudServerStatus) DeepCopyInto ¶
func (in *HCloudServerStatus) DeepCopyInto(out *HCloudServerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HCloudVolume ¶
type HCloudVolume struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec HCloudVolumeSpec `json:"spec,omitempty"`
Status HCloudVolumeStatus `json:"status,omitempty"`
}
HCloudVolume is the Schema for the hcloudvolumes API. It represents a Hetzner Cloud Volume managed by the hcloud-operator.
func (*HCloudVolume) DeepCopy ¶
func (in *HCloudVolume) DeepCopy() *HCloudVolume
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HCloudVolume.
func (*HCloudVolume) DeepCopyInto ¶
func (in *HCloudVolume) DeepCopyInto(out *HCloudVolume)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HCloudVolume) DeepCopyObject ¶
func (in *HCloudVolume) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HCloudVolumeList ¶
type HCloudVolumeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []HCloudVolume `json:"items"`
}
HCloudVolumeList contains a list of HCloudVolume.
func (*HCloudVolumeList) DeepCopy ¶
func (in *HCloudVolumeList) DeepCopy() *HCloudVolumeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HCloudVolumeList.
func (*HCloudVolumeList) DeepCopyInto ¶
func (in *HCloudVolumeList) DeepCopyInto(out *HCloudVolumeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HCloudVolumeList) DeepCopyObject ¶
func (in *HCloudVolumeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HCloudVolumeSpec ¶
type HCloudVolumeSpec struct {
// Size of the volume in GB (minimum 10, maximum 10240).
// +kubebuilder:validation:Required
Size int `json:"size"`
// Location of the volume (e.g. fsn1, nbg1, hel1).
// Required if ServerRef is not provided.
// +optional
Location string `json:"location,omitempty"`
// ServerRef is a reference to an HCloudServer in the same namespace to attach this volume to.
// +optional
ServerRef *corev1.LocalObjectReference `json:"serverRef,omitempty"`
// Format is the filesystem format to create on the volume (e.g., ext4, xfs).
// If empty, the volume is not formatted.
// +optional
Format string `json:"format,omitempty"`
// Labels to attach to the Hetzner Cloud volume.
// +optional
Labels map[string]string `json:"labels,omitempty"`
}
HCloudVolumeSpec defines the desired state of an HCloudVolume. +kubebuilder:validation:XValidation:rule="self.size >= 10 && self.size <= 10240",message="size must be between 10 and 10240 GB" +kubebuilder:validation:XValidation:rule="!has(oldSelf.location) || !has(self.location) || self.location == oldSelf.location",message="location is immutable after creation"
func (*HCloudVolumeSpec) DeepCopy ¶
func (in *HCloudVolumeSpec) DeepCopy() *HCloudVolumeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HCloudVolumeSpec.
func (*HCloudVolumeSpec) DeepCopyInto ¶
func (in *HCloudVolumeSpec) DeepCopyInto(out *HCloudVolumeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HCloudVolumeStatus ¶
type HCloudVolumeStatus struct {
// VolumeID is the Hetzner Cloud internal volume ID.
// +optional
VolumeID int64 `json:"volumeID,omitempty"`
// State is the current Hetzner volume state (e.g. creating, available).
// +optional
State string `json:"state,omitempty"`
// AttachedServerID is the Hetzner Cloud server ID this volume is currently attached to.
// +optional
AttachedServerID int64 `json:"attachedServerID,omitempty"`
// LinuxDevice is the path to the device on the Linux server (e.g., /dev/disk/by-id/scsi-0HC_Volume_12345).
// +optional
LinuxDevice string `json:"linuxDevice,omitempty"`
// Conditions represent the latest available observations of the volume's current state.
// +optional
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
HCloudVolumeStatus defines the observed state of an HCloudVolume.
func (*HCloudVolumeStatus) DeepCopy ¶
func (in *HCloudVolumeStatus) DeepCopy() *HCloudVolumeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HCloudVolumeStatus.
func (*HCloudVolumeStatus) DeepCopyInto ¶
func (in *HCloudVolumeStatus) DeepCopyInto(out *HCloudVolumeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.