Documentation ¶
Overview ¶
package v1beta1 contains API Schema definitions for the hco v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=hco.kubevirt.io
package v1beta1 contains API Schema definitions for the hco vbeta1 API group +k8s:deepcopy-gen=package,register +groupName=hco.kubevirt.io
Index ¶
- Constants
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func GetWebhookCertDir() string
- func RegisterDefaults(scheme *runtime.Scheme) error
- type HyperConverged
- func (in *HyperConverged) DeepCopy() *HyperConverged
- func (in *HyperConverged) DeepCopyInto(out *HyperConverged)
- func (in *HyperConverged) DeepCopyObject() runtime.Object
- func (r *HyperConverged) SetupWebhookWithManager(ctx context.Context, mgr ctrl.Manager, handler WebhookHandlerIfs, ...) error
- func (r *HyperConverged) ValidateCreate() error
- func (r *HyperConverged) ValidateDelete() error
- func (r *HyperConverged) ValidateUpdate(old runtime.Object) error
- type HyperConvergedConfig
- type HyperConvergedFeatureGates
- func (in *HyperConvergedFeatureGates) DeepCopy() *HyperConvergedFeatureGates
- func (in *HyperConvergedFeatureGates) DeepCopyInto(out *HyperConvergedFeatureGates)
- func (fgs *HyperConvergedFeatureGates) IsGPUAssignmentEnabled() bool
- func (fgs *HyperConvergedFeatureGates) IsHostDevicesAssignmentEnabled() bool
- func (fgs *HyperConvergedFeatureGates) IsHotplugVolumesEnabled() bool
- func (fgs *HyperConvergedFeatureGates) IsHypervStrictCheckEnabled() bool
- func (fgs *HyperConvergedFeatureGates) IsSRIOVLiveMigrationEnabled() bool
- func (fgs *HyperConvergedFeatureGates) IsWithHostModelCPUEnabled() bool
- func (fgs *HyperConvergedFeatureGates) IsWithHostPassthroughCPUEnabled() bool
- type HyperConvergedList
- type HyperConvergedSpec
- type HyperConvergedStatus
- type Version
- type Versions
- type WebhookHandlerIfs
Constants ¶
const ( // ConditionReconcileComplete communicates the status of the HyperConverged resource's // reconcile functionality. Basically, is the Reconcile function running to completion. ConditionReconcileComplete conditionsv1.ConditionType = "ReconcileComplete" // ConditionTaintedConfiguration indicates that a hidden/debug configuration // has been applied to the HyperConverged resource via a specialized annotation. // This condition is exposed only when its value is True, and is otherwise hidden. ConditionTaintedConfiguration conditionsv1.ConditionType = "TaintedConfiguration" )
const ( DefaultWebhookCertDir = "/apiserver.local.config/certificates" WebhookCertName = "apiserver.crt" WebhookKeyName = "apiserver.key" )
const HyperConvergedName = "kubevirt-hyperconverged"
HyperConvergedName is the name of the HyperConverged resource that will be reconciled
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: hcoutils.APIVersionGroup, Version: hcoutils.APIVersionBeta} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme tbd AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
func GetWebhookCertDir ¶ added in v1.4.0
func GetWebhookCertDir() string
func RegisterDefaults ¶
RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.
Types ¶
type HyperConverged ¶
type HyperConverged struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec HyperConvergedSpec `json:"spec,omitempty"` Status HyperConvergedStatus `json:"status,omitempty"` }
HyperConverged is the Schema for the hyperconvergeds API +k8s:openapi-gen=true +kubebuilder:storageversion +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +kubebuilder:resource:scope=Namespaced,categories={all},shortName={hco,hcos} +kubebuilder:subresource:status
func (*HyperConverged) DeepCopy ¶
func (in *HyperConverged) DeepCopy() *HyperConverged
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HyperConverged.
func (*HyperConverged) DeepCopyInto ¶
func (in *HyperConverged) DeepCopyInto(out *HyperConverged)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HyperConverged) DeepCopyObject ¶
func (in *HyperConverged) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*HyperConverged) SetupWebhookWithManager ¶
func (r *HyperConverged) SetupWebhookWithManager(ctx context.Context, mgr ctrl.Manager, handler WebhookHandlerIfs, isOpenshift bool) error
func (*HyperConverged) ValidateCreate ¶
func (r *HyperConverged) ValidateCreate() error
func (*HyperConverged) ValidateDelete ¶
func (r *HyperConverged) ValidateDelete() error
func (*HyperConverged) ValidateUpdate ¶
func (r *HyperConverged) ValidateUpdate(old runtime.Object) error
type HyperConvergedConfig ¶
type HyperConvergedConfig struct { // NodePlacement describes node scheduling configuration. // +optional NodePlacement *sdkapi.NodePlacement `json:"nodePlacement,omitempty"` }
HyperConvergedConfig defines a set of configurations to pass to components
func (*HyperConvergedConfig) DeepCopy ¶
func (in *HyperConvergedConfig) DeepCopy() *HyperConvergedConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HyperConvergedConfig.
func (*HyperConvergedConfig) DeepCopyInto ¶
func (in *HyperConvergedConfig) DeepCopyInto(out *HyperConvergedConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HyperConvergedFeatureGates ¶ added in v1.3.0
type HyperConvergedFeatureGates struct { // Allow migrating a virtual machine with SRIOV interfaces. // When enabled virt-launcher pods of virtual machines with SRIOV // interfaces run with CAP_SYS_RESOURCE capability. // This may degrade virt-launcher security. // +optional // +kubebuilder:default=false SRIOVLiveMigration *bool `json:"sriovLiveMigration,omitempty"` // Allow attaching a data volume to a running VMI // +optional // +kubebuilder:default=false HotplugVolumes *bool `json:"hotplugVolumes,omitempty"` // Allow assigning GPU and vGPU devices to virtual machines // +optional // +kubebuilder:default=false GPU *bool `json:"gpu,omitempty"` // Allow assigning host devices to virtual machines // +optional // +kubebuilder:default=false HostDevices *bool `json:"hostDevices,omitempty"` // Allow migrating a virtual machine with CPU host-passthrough mode. This should be // enabled only when the Cluster is homogeneous from CPU HW perspective doc here // +optional // +kubebuilder:default=false WithHostPassthroughCPU *bool `json:"withHostPassthroughCPU,omitempty"` // Support migration for VMs with host-model CPU mode // +optional // +kubebuilder:default=true WithHostModelCPU *bool `json:"withHostModelCPU,omitempty"` // Enable HyperV strict host checking for HyperV enlightenments // Defaults to true, even when HyperConvergedFeatureGates is empty // +optional // +kubebuilder:default=true HypervStrictCheck *bool `json:"hypervStrictCheck,omitempty"` }
HyperConvergedFeatureGates is a set of optional feature gates to enable or disable new features that are not enabled by default yet. +optional +k8s:openapi-gen=true +kubebuilder:default={}
func (*HyperConvergedFeatureGates) DeepCopy ¶ added in v1.3.0
func (in *HyperConvergedFeatureGates) DeepCopy() *HyperConvergedFeatureGates
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HyperConvergedFeatureGates.
func (*HyperConvergedFeatureGates) DeepCopyInto ¶ added in v1.3.0
func (in *HyperConvergedFeatureGates) DeepCopyInto(out *HyperConvergedFeatureGates)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HyperConvergedFeatureGates) IsGPUAssignmentEnabled ¶
func (fgs *HyperConvergedFeatureGates) IsGPUAssignmentEnabled() bool
func (*HyperConvergedFeatureGates) IsHostDevicesAssignmentEnabled ¶
func (fgs *HyperConvergedFeatureGates) IsHostDevicesAssignmentEnabled() bool
func (*HyperConvergedFeatureGates) IsHotplugVolumesEnabled ¶ added in v1.3.0
func (fgs *HyperConvergedFeatureGates) IsHotplugVolumesEnabled() bool
func (*HyperConvergedFeatureGates) IsHypervStrictCheckEnabled ¶
func (fgs *HyperConvergedFeatureGates) IsHypervStrictCheckEnabled() bool
func (*HyperConvergedFeatureGates) IsSRIOVLiveMigrationEnabled ¶
func (fgs *HyperConvergedFeatureGates) IsSRIOVLiveMigrationEnabled() bool
func (*HyperConvergedFeatureGates) IsWithHostModelCPUEnabled ¶
func (fgs *HyperConvergedFeatureGates) IsWithHostModelCPUEnabled() bool
func (*HyperConvergedFeatureGates) IsWithHostPassthroughCPUEnabled ¶ added in v1.4.0
func (fgs *HyperConvergedFeatureGates) IsWithHostPassthroughCPUEnabled() bool
type HyperConvergedList ¶
type HyperConvergedList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []HyperConverged `json:"items"` }
HyperConvergedList contains a list of HyperConverged
func (*HyperConvergedList) DeepCopy ¶
func (in *HyperConvergedList) DeepCopy() *HyperConvergedList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HyperConvergedList.
func (*HyperConvergedList) DeepCopyInto ¶
func (in *HyperConvergedList) DeepCopyInto(out *HyperConvergedList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HyperConvergedList) DeepCopyObject ¶
func (in *HyperConvergedList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HyperConvergedSpec ¶
type HyperConvergedSpec struct { // LocalStorageClassName the name of the local storage class. LocalStorageClassName string `json:"localStorageClassName,omitempty"` // infra HyperConvergedConfig influences the pod configuration (currently only placement) // for all the infra components needed on the virtualization enabled cluster // but not necessarely directly on each node running VMs/VMIs. // +optional Infra HyperConvergedConfig `json:"infra,omitempty"` // workloads HyperConvergedConfig influences the pod configuration (currently only placement) of components // which need to be running on a node where virtualization workloads should be able to run. // Changes to Workloads HyperConvergedConfig can be applied only without existing workload. // +optional Workloads HyperConvergedConfig `json:"workloads,omitempty"` // featureGates is a map of feature gate flags. Setting a flag to `true` will enable // the feature. Setting `false` or removing the feature gate, disables the feature. // +optional // +TODO: Always keep the default FeatureGates in sync with the default field values in HyperConvergedFeatureGates //NOSONAR // +kubebuilder:default={sriovLiveMigration: false, hotplugVolumes: false, gpu: false, hostDevices: false, withHostPassthroughCPU: false, withHostModelCPU: true, hypervStrictCheck: true} FeatureGates *HyperConvergedFeatureGates `json:"featureGates,omitempty"` // operator version Version string `json:"version,omitempty"` }
HyperConvergedSpec defines the desired state of HyperConverged +k8s:openapi-gen=true
func (*HyperConvergedSpec) DeepCopy ¶
func (in *HyperConvergedSpec) DeepCopy() *HyperConvergedSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HyperConvergedSpec.
func (*HyperConvergedSpec) DeepCopyInto ¶
func (in *HyperConvergedSpec) DeepCopyInto(out *HyperConvergedSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HyperConvergedStatus ¶
type HyperConvergedStatus struct { // Conditions describes the state of the HyperConverged resource. // +patchMergeKey=type // +patchStrategy=merge // +optional Conditions []conditionsv1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` // RelatedObjects is a list of objects created and maintained by this // operator. Object references will be added to this list after they have // been created AND found in the cluster. // +optional RelatedObjects []corev1.ObjectReference `json:"relatedObjects,omitempty"` // Versions is a list of HCO component versions, as name/version pairs. The version with a name of "operator" // is the HCO version itself, as described here: // https://github.com/openshift/cluster-version-operator/blob/master/docs/dev/clusteroperator.md#version // +optional Versions Versions `json:"versions,omitempty"` }
HyperConvergedStatus defines the observed state of HyperConverged +k8s:openapi-gen=true
func (*HyperConvergedStatus) DeepCopy ¶
func (in *HyperConvergedStatus) DeepCopy() *HyperConvergedStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HyperConvergedStatus.
func (*HyperConvergedStatus) DeepCopyInto ¶
func (in *HyperConvergedStatus) DeepCopyInto(out *HyperConvergedStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HyperConvergedStatus) GetVersion ¶
func (hcs *HyperConvergedStatus) GetVersion(name string) (string, bool)
func (*HyperConvergedStatus) UpdateVersion ¶
func (hcs *HyperConvergedStatus) UpdateVersion(name, version string)
type Version ¶
type Version struct { Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` }
func (*Version) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Version.
func (*Version) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Versions ¶
type Versions []Version
func (Versions) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Versions.
func (Versions) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WebhookHandlerIfs ¶ added in v1.3.0
type WebhookHandlerIfs interface { Init(logger logr.Logger, cli client.Client, namespace string, isOpenshift bool) ValidateCreate(hc *HyperConverged) error ValidateUpdate(requested *HyperConverged, exists *HyperConverged) error ValidateDelete(hc *HyperConverged) error HandleMutatingNsDelete(ns *corev1.Namespace, dryRun bool) (bool, error) }