Documentation ¶
Overview ¶
+kubebuilder:object:generate=true +groupName=libvirt.karelvanhecke.com
Index ¶
Constants ¶
const ( TLSAuth = "TLS" SSHAuth = "SSH" )
Variables ¶
var ( SchemeGroupVersion = schema.GroupVersion{Group: "libvirt.karelvanhecke.com", Version: "v1alpha1"} SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec AuthSpec `json:"spec,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:subresource:status
func (*Auth) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Auth.
func (*Auth) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Auth) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AuthList ¶
type AuthList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Auth `json:"items"` }
+kubebuilder:object:root=true
func (*AuthList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthList.
func (*AuthList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AuthList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AuthSpec ¶
type AuthSpec struct { // +kubebuilder:validation:XValidation:rule="oldSelf == self",message="type is immutable" // +kubebuilder:validation:Required Type AuthType `json:"type"` // +kubebuilder:validation:Required SecretRef ResourceRef `json:"secretRef"` // +kubebuilder:validation:Optional Verify *bool `json:"verify,omitempty"` // +kubebuilder:validation:Optional Ca *string `json:"ca,omitempty"` // +kubebuilder:validation:Optional KnownHosts *string `json:"knownHosts,omitempty"` // +kubebuilder:validation:Optional Username *string `json:"username,omitempty"` }
+kubebuilder:validation:XValidation:rule="self.type == \"SSH\" ? has(self.username) && (has(self.knownHosts) || (has(self.verify) && !self.verify)) && !has(self.ca) : true",message="type SSH requires username and knownHosts (unless verify is disabled) to be set" +kubebuilder:validation:XValidation:rule="self.type == \"TLS\" ? has(self.ca) || (has(self.verify) && !self.verify) && !has(self.username) && !has(self.knownHosts) : true",message="type TLS requires ca (unless verify is disabled) to be set"
func (*AuthSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthSpec.
func (*AuthSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackingStoreRef ¶
type BackingStoreRef struct { // +kubebuilder:validation:Pattern="^[a-z0-9][a-z0-9\\-.]{0,251}[a-z0-9]|[a-z0-9]$" // +kubebuilder:validation:Required Name string `json:"name"` }
func (*BackingStoreRef) DeepCopy ¶
func (in *BackingStoreRef) DeepCopy() *BackingStoreRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackingStoreRef.
func (*BackingStoreRef) DeepCopyInto ¶
func (in *BackingStoreRef) DeepCopyInto(out *BackingStoreRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Host ¶
type Host struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec HostSpec `json:"spec,omitempty"` }
+kubebuilder:object:root=true
func (*Host) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Host.
func (*Host) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Host) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HostList ¶
type HostList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Host `json:"items"` }
+kubebuilder:object:root=true
func (*HostList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostList.
func (*HostList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HostList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HostSpec ¶
type HostSpec struct { // +kubebuilder:validation:Required Address string `json:"address"` // +kubebuilder:validation:Required AuthRef ResourceRef `json:"authRef"` // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:Required Pools []Pool `json:"pools"` // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=65535 // +kubebuilder:validation:Optional Port *int32 `json:"port,omitempty"` }
func (*HostSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostSpec.
func (*HostSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Pool ¶
type Pool struct { // +kubebuilder:validation:Required Name string `json:"name"` // +kubebuilder:validation:Optional Default *bool `json:"default,omitempty"` }
func (*Pool) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pool.
func (*Pool) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceRef ¶
type ResourceRef struct { // +kubebuilder:validation:Pattern="^[a-z0-9][a-z0-9\\-.]{0,251}[a-z0-9]|[a-z0-9]$" // +kubebuilder:validation:Required Name string `json:"name"` }
func (*ResourceRef) DeepCopy ¶
func (in *ResourceRef) DeepCopy() *ResourceRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRef.
func (*ResourceRef) DeepCopyInto ¶
func (in *ResourceRef) DeepCopyInto(out *ResourceRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Volume ¶
type Volume struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec VolumeSpec `json:"spec,omitempty"` Status VolumeStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:subresource:status
func (*Volume) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Volume.
func (*Volume) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Volume) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VolumeList ¶
type VolumeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metdata,omitempty"` Items []Volume `json:"items"` }
+kubebuilder:object:root=true
func (*VolumeList) DeepCopy ¶
func (in *VolumeList) DeepCopy() *VolumeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeList.
func (*VolumeList) DeepCopyInto ¶
func (in *VolumeList) DeepCopyInto(out *VolumeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VolumeList) DeepCopyObject ¶
func (in *VolumeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VolumeSize ¶
type VolumeSize struct { // +kubebuilder:validation:Enum=bytes;B;KB;K;KiB;MB;M;MiB;GB;G;GiB;TB;T;TiB;PB;P;PiB;EB;E;EiB // +kubebuilder:validation:Optional // +kubebuilder:validation:Default=bytes Unit *string `json:"unit,omitempty"` // +kubebuilder:validation:Minimum=1 // +kubebuilder:validaton:XValidation:rule="self > oldSelf",message="volume can only be expanded" // +kubebuilder:validation:Required Value int64 `json:"value"` }
func (*VolumeSize) DeepCopy ¶
func (in *VolumeSize) DeepCopy() *VolumeSize
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSize.
func (*VolumeSize) DeepCopyInto ¶
func (in *VolumeSize) DeepCopyInto(out *VolumeSize)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeSource ¶
type VolumeSource struct { // +kubebuilder:validation:XValidation:rule="url(self).getScheme() == 'https' || url(self).getScheme() == 'http'",message="must be a valid http(s) url" // +kubebuilder:validation:Required URL string `json:"url"` // +kubebuilder:validation:XValidation:rule="self.matches(\"^sha256:[a-fA-F0-9]{64}|sha512:[a-fA-F0-9]{128}$\")",message="must be a valid SHA256 or SHA512 checksum" // +kubebuilder:validation:Optional Checksum *string `json:"checksum,omitempty"` }
func (*VolumeSource) DeepCopy ¶
func (in *VolumeSource) DeepCopy() *VolumeSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSource.
func (*VolumeSource) DeepCopyInto ¶
func (in *VolumeSource) DeepCopyInto(out *VolumeSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeSpec ¶
type VolumeSpec struct { // +kubebuilder:validation:Enum=qcow2;raw // +kubebuilder:validation:Required Format string `json:"format"` // +kubebuilder:validation:Required HostRef ResourceRef `json:"hostRef"` // +kubebuilder:validation:Optional Size *VolumeSize `json:"size,omitempty"` // +kubebuilder:validation:Optional Pool *string `json:"pool,omitempty"` // +kubebuilder:validation:Optional Source *VolumeSource `json:"source,omitempty"` // +kubebuilder:validation:Optional BackingStoreRef *ResourceRef `json:"backingStoreRef,omitempty"` }
+kubebuilder:validation:XValidation:rule="has(self.size) ? true : has(self.source) || has(self.backingStoreRef)",message="size can only be omitted when a backing store is defined" +kubebuilder:validation:XValidation:rule="has(self.source) ? !has(self.backingStoreRef) : true",message="source and backingstore can not be defined at the same time"
func (*VolumeSpec) DeepCopy ¶
func (in *VolumeSpec) DeepCopy() *VolumeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSpec.
func (*VolumeSpec) DeepCopyInto ¶
func (in *VolumeSpec) DeepCopyInto(out *VolumeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeStatus ¶
type VolumeStatus struct {
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}
+kubebuilder:validation:Optional
func (*VolumeStatus) DeepCopy ¶
func (in *VolumeStatus) DeepCopy() *VolumeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeStatus.
func (*VolumeStatus) DeepCopyInto ¶
func (in *VolumeStatus) DeepCopyInto(out *VolumeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.