Documentation ¶
Overview ¶
* arm64 utilities are in the webhooks package because they are used both * by validation and mutation webhooks.
* arm64 utilities are in the webhooks package because they are used both * by validation and mutation webhooks.
* hyperv utilities are in the webhooks package because they are used both * by validation and mutation webhooks.
* s390x utilities are in the webhooks package because they are used both * by validation and mutation webhooks.
Index ¶
- Variables
- func GetNamespace() string
- func IsARM64(vmiSpec *v1.VirtualMachineInstanceSpec) bool
- func IsKubeVirtServiceAccount(serviceAccount string) booldeprecated
- func IsPPC64(vmiSpec *v1.VirtualMachineInstanceSpec) bool
- func IsS390X(vmiSpec *v1.VirtualMachineInstanceSpec) bool
- func KubeVirtServiceAccounts(kubeVirtNamespace string) map[string]struct{}
- func SetAmd64Defaults(spec *v1.VirtualMachineInstanceSpec)
- func SetArm64Defaults(spec *v1.VirtualMachineInstanceSpec)
- func SetDefaultGuestCPUTopology(clusterConfig *virtconfig.ClusterConfig, spec *v1.VirtualMachineInstanceSpec)
- func SetDefaultVirtualMachine(clusterConfig *virtconfig.ClusterConfig, vm *v1.VirtualMachine) error
- func SetDefaultVirtualMachineInstance(clusterConfig *virtconfig.ClusterConfig, vmi *v1.VirtualMachineInstance) error
- func SetHypervFeatureDependencies(spec *v1.VirtualMachineInstanceSpec) error
- func SetS390xDefaults(spec *v1.VirtualMachineInstanceSpec)
- func ValidateVirtualMachineInstanceArm64Setting(field *k8sfield.Path, spec *v1.VirtualMachineInstanceSpec) []metav1.StatusCause
- func ValidateVirtualMachineInstanceHyperv(field *k8sfield.Path, spec *v1.VirtualMachineInstanceSpec) []metav1.StatusCause
- func ValidateVirtualMachineInstanceHypervFeatureDependencies(field *k8sfield.Path, spec *v1.VirtualMachineInstanceSpec) []metav1.StatusCause
- func ValidateVirtualMachineInstanceHypervMode(field *k8sfield.Path, spec *v1.VirtualMachineInstanceSpec) []metav1.StatusCause
- type HypervFeature
- type Informers
Constants ¶
This section is empty.
Variables ¶
var Arch = runtime.GOARCH
var MigrationGroupVersionResource = metav1.GroupVersionResource{ Group: v1.VirtualMachineInstanceMigrationGroupVersionKind.Group, Version: v1.VirtualMachineInstanceMigrationGroupVersionKind.Version, Resource: "virtualmachineinstancemigrations", }
var VirtualMachineGroupVersionResource = metav1.GroupVersionResource{ Group: v1.VirtualMachineGroupVersionKind.Group, Version: v1.VirtualMachineGroupVersionKind.Version, Resource: "virtualmachines", }
var VirtualMachineInstanceGroupVersionResource = metav1.GroupVersionResource{ Group: v1.VirtualMachineInstanceGroupVersionKind.Group, Version: v1.VirtualMachineInstanceGroupVersionKind.Version, Resource: "virtualmachineinstances", }
var VirtualMachineInstancePresetGroupVersionResource = metav1.GroupVersionResource{ Group: v1.VirtualMachineInstancePresetGroupVersionKind.Group, Version: v1.VirtualMachineInstancePresetGroupVersionKind.Version, Resource: "virtualmachineinstancepresets", }
var VirtualMachineInstanceReplicaSetGroupVersionResource = metav1.GroupVersionResource{ Group: v1.VirtualMachineInstanceReplicaSetGroupVersionKind.Group, Version: v1.VirtualMachineInstanceReplicaSetGroupVersionKind.Version, Resource: "virtualmachineinstancereplicasets", }
var VirtualMachinePoolGroupVersionResource = metav1.GroupVersionResource{ Group: poolv1.SchemeGroupVersion.Group, Version: poolv1.SchemeGroupVersion.Version, Resource: "virtualmachinepools", }
Functions ¶
func GetNamespace ¶ added in v1.3.0
func GetNamespace() string
func IsARM64 ¶ added in v0.41.0
func IsARM64(vmiSpec *v1.VirtualMachineInstanceSpec) bool
func IsKubeVirtServiceAccount
deprecated
added in
v0.38.0
func IsPPC64 ¶ added in v0.41.0
func IsPPC64(vmiSpec *v1.VirtualMachineInstanceSpec) bool
func IsS390X ¶ added in v1.3.0
func IsS390X(vmiSpec *v1.VirtualMachineInstanceSpec) bool
func KubeVirtServiceAccounts ¶ added in v1.3.0
func SetAmd64Defaults ¶ added in v0.59.0
func SetAmd64Defaults(spec *v1.VirtualMachineInstanceSpec)
SetAmd64Defaults is mutating function for mutating-webhook
func SetArm64Defaults ¶ added in v0.59.0
func SetArm64Defaults(spec *v1.VirtualMachineInstanceSpec)
SetArm64Defaults is mutating function for mutating-webhook
func SetDefaultGuestCPUTopology ¶ added in v1.0.0
func SetDefaultGuestCPUTopology(clusterConfig *virtconfig.ClusterConfig, spec *v1.VirtualMachineInstanceSpec)
func SetDefaultVirtualMachine ¶ added in v0.59.0
func SetDefaultVirtualMachine(clusterConfig *virtconfig.ClusterConfig, vm *v1.VirtualMachine) error
func SetDefaultVirtualMachineInstance ¶ added in v0.59.0
func SetDefaultVirtualMachineInstance(clusterConfig *virtconfig.ClusterConfig, vmi *v1.VirtualMachineInstance) error
func SetHypervFeatureDependencies ¶ added in v0.59.0
func SetHypervFeatureDependencies(spec *v1.VirtualMachineInstanceSpec) error
func SetS390xDefaults ¶ added in v1.3.0
func SetS390xDefaults(spec *v1.VirtualMachineInstanceSpec)
SetS390xDefaults is mutating function for mutating-webhook
func ValidateVirtualMachineInstanceArm64Setting ¶ added in v0.41.0
func ValidateVirtualMachineInstanceArm64Setting(field *k8sfield.Path, spec *v1.VirtualMachineInstanceSpec) []metav1.StatusCause
ValidateVirtualMachineInstanceArm64Setting is a validation function for validating-webhook to filter unsupported setting on Arm64
func ValidateVirtualMachineInstanceHyperv ¶ added in v1.3.0
func ValidateVirtualMachineInstanceHyperv(field *k8sfield.Path, spec *v1.VirtualMachineInstanceSpec) []metav1.StatusCause
func ValidateVirtualMachineInstanceHypervFeatureDependencies ¶ added in v0.19.0
func ValidateVirtualMachineInstanceHypervFeatureDependencies(field *k8sfield.Path, spec *v1.VirtualMachineInstanceSpec) []metav1.StatusCause
func ValidateVirtualMachineInstanceHypervMode ¶ added in v1.3.0
func ValidateVirtualMachineInstanceHypervMode(field *k8sfield.Path, spec *v1.VirtualMachineInstanceSpec) []metav1.StatusCause
Types ¶
type HypervFeature ¶ added in v0.19.0
type HypervFeature struct { State **v1.FeatureState Field *k8sfield.Path Requires *HypervFeature }
func (HypervFeature) IsRequirementFulfilled ¶ added in v0.19.0
func (hf HypervFeature) IsRequirementFulfilled() (metav1.StatusCause, bool)
func (HypervFeature) String ¶ added in v0.19.0
func (hf HypervFeature) String() string
func (HypervFeature) TryToSetRequirement ¶ added in v0.19.0
func (hf HypervFeature) TryToSetRequirement() error
a requirement is compatible if 1. it is already enabled (either by the user or by us previously) 2. the user has not set it, so we can do on its behalf
type Informers ¶
type Informers struct { VMIPresetInformer cache.SharedIndexInformer VMRestoreInformer cache.SharedIndexInformer DataVolumeInformer cache.SharedIndexInformer DataSourceInformer cache.SharedIndexInformer NamespaceInformer cache.SharedIndexInformer }