Documentation ¶
Index ¶
- Variables
- func ValidateDuplicateDHCPPrivateOptions(PrivateOptions []v1.DHCPPrivateOptions) error
- func ValidateMaxSkew(fldPath *field.Path, maxSkew int32) *field.Error
- func ValidateNodeFieldSelectorRequirement(req core.NodeSelectorRequirement, fldPath *field.Path) field.ErrorList
- func ValidateNodeSelector(nodeSelector *core.NodeSelector, fldPath *field.Path) field.ErrorList
- func ValidateNodeSelectorRequirement(rq core.NodeSelectorRequirement, fldPath *field.Path) field.ErrorList
- func ValidateNodeSelectorTerm(term core.NodeSelectorTerm, fldPath *field.Path) field.ErrorList
- func ValidatePreferredSchedulingTerms(terms []core.PreferredSchedulingTerm, fldPath *field.Path) field.ErrorList
- func ValidateSpreadConstraintNotRepeat(fldPath *field.Path, constraint core.TopologySpreadConstraint, ...) *field.Error
- func ValidateTopologyKey(fldPath *field.Path, topologyKey string) field.ErrorList
- func ValidateVMIPresetSpec(field *k8sfield.Path, spec *v1.VirtualMachineInstancePresetSpec) []metav1.StatusCause
- func ValidateVMIRSSpec(field *k8sfield.Path, spec *v1.VirtualMachineInstanceReplicaSetSpec, ...) []metav1.StatusCause
- func ValidateVMPoolSpec(ar *admissionv1.AdmissionReview, field *k8sfield.Path, ...) []metav1.StatusCause
- func ValidateVirtualMachineInstanceMandatoryFields(field *k8sfield.Path, spec *v1.VirtualMachineInstanceSpec) []metav1.StatusCause
- func ValidateVirtualMachineInstanceMetadata(field *k8sfield.Path, metadata *metav1.ObjectMeta, ...) []metav1.StatusCause
- func ValidateVirtualMachineInstanceMigrationSpec(field *k8sfield.Path, spec *v1.VirtualMachineInstanceMigrationSpec) []metav1.StatusCause
- func ValidateVirtualMachineInstanceSpec(field *k8sfield.Path, spec *v1.VirtualMachineInstanceSpec, ...) []metav1.StatusCause
- func ValidateVirtualMachineSpec(field *k8sfield.Path, spec *v1.VirtualMachineSpec, ...) []metav1.StatusCause
- func ValidateWhenUnsatisfiable(fldPath *field.Path, action core.UnsatisfiableConstraintAction) *field.Error
- type CloneAuthFunc
- type ClusterInstancetypeAdmitter
- type ClusterPreferenceAdmitter
- type InstancetypeAdmitter
- type MigrationCreateAdmitter
- type MigrationPolicyAdmitter
- type MigrationUpdateAdmitter
- type PodEvictionAdmitter
- type PreferenceAdmitter
- type StatusAdmitter
- type VMExportAdmitter
- type VMICreateAdmitter
- type VMIPresetAdmitter
- type VMIRSAdmitter
- type VMIUpdateAdmitter
- type VMPoolAdmitter
- type VMRestoreAdmitter
- type VMSnapshotAdmitter
- type VMsAdmitter
- type VirtualMachineCloneAdmitter
Constants ¶
This section is empty.
Variables ¶
var ValidateNamespaceName = apimachineryvalidation.ValidateNamespaceName
ValidateNamespaceName can be used to check whether the given namespace name is valid. Prefix indicates this name will be used as part of generation, in which case trailing dashes are allowed.
var ValidateNodeName = apimachineryvalidation.NameIsDNSSubdomain
ValidateNodeName can be used to check whether the given node name is valid. Prefix indicates this name will be used as part of generation, in which case trailing dashes are allowed.
Functions ¶
func ValidateDuplicateDHCPPrivateOptions ¶
func ValidateDuplicateDHCPPrivateOptions(PrivateOptions []v1.DHCPPrivateOptions) error
func ValidateMaxSkew ¶ added in v0.57.0
ValidateMaxSkew tests that the argument is a valid MaxSkew.
func ValidateNodeFieldSelectorRequirement ¶ added in v0.57.0
func ValidateNodeFieldSelectorRequirement(req core.NodeSelectorRequirement, fldPath *field.Path) field.ErrorList
ValidateNodeFieldSelectorRequirement tests that the specified NodeSelectorRequirement fields has valid data
func ValidateNodeSelector ¶ added in v0.57.0
ValidateNodeSelector tests that the specified nodeSelector fields has valid data
func ValidateNodeSelectorRequirement ¶ added in v0.57.0
func ValidateNodeSelectorRequirement(rq core.NodeSelectorRequirement, fldPath *field.Path) field.ErrorList
ValidateNodeSelectorRequirement tests that the specified NodeSelectorRequirement fields has valid data
func ValidateNodeSelectorTerm ¶ added in v0.57.0
ValidateNodeSelectorTerm tests that the specified node selector term has valid data
func ValidatePreferredSchedulingTerms ¶ added in v0.57.0
func ValidatePreferredSchedulingTerms(terms []core.PreferredSchedulingTerm, fldPath *field.Path) field.ErrorList
ValidatePreferredSchedulingTerms tests that the specified SoftNodeAffinity fields has valid data
func ValidateSpreadConstraintNotRepeat ¶ added in v0.57.0
func ValidateSpreadConstraintNotRepeat(fldPath *field.Path, constraint core.TopologySpreadConstraint, restingConstraints []core.TopologySpreadConstraint) *field.Error
ValidateSpreadConstraintNotRepeat tests that if `constraint` duplicates with `existingConstraintPairs` on TopologyKey and WhenUnsatisfiable fields.
func ValidateTopologyKey ¶ added in v0.57.0
ValidateTopologyKey tests that the argument is a valid TopologyKey.
func ValidateVMIPresetSpec ¶
func ValidateVMIPresetSpec(field *k8sfield.Path, spec *v1.VirtualMachineInstancePresetSpec) []metav1.StatusCause
func ValidateVMIRSSpec ¶
func ValidateVMIRSSpec(field *k8sfield.Path, spec *v1.VirtualMachineInstanceReplicaSetSpec, config *virtconfig.ClusterConfig) []metav1.StatusCause
func ValidateVMPoolSpec ¶ added in v0.49.0
func ValidateVMPoolSpec(ar *admissionv1.AdmissionReview, field *k8sfield.Path, pool *poolv1.VirtualMachinePool, config *virtconfig.ClusterConfig) []metav1.StatusCause
func ValidateVirtualMachineInstanceMandatoryFields ¶
func ValidateVirtualMachineInstanceMandatoryFields(field *k8sfield.Path, spec *v1.VirtualMachineInstanceSpec) []metav1.StatusCause
ValidateVirtualMachineInstanceMandatoryFields should be invoked after all defaults and presets are applied. It is only meant to be used for VMI reviews, not if they are templates on other objects
func ValidateVirtualMachineInstanceMetadata ¶
func ValidateVirtualMachineInstanceMetadata(field *k8sfield.Path, metadata *metav1.ObjectMeta, config *virtconfig.ClusterConfig, accountName string) []metav1.StatusCause
func ValidateVirtualMachineInstanceMigrationSpec ¶
func ValidateVirtualMachineInstanceMigrationSpec(field *k8sfield.Path, spec *v1.VirtualMachineInstanceMigrationSpec) []metav1.StatusCause
func ValidateVirtualMachineInstanceSpec ¶
func ValidateVirtualMachineInstanceSpec(field *k8sfield.Path, spec *v1.VirtualMachineInstanceSpec, config *virtconfig.ClusterConfig) []metav1.StatusCause
func ValidateVirtualMachineSpec ¶
func ValidateVirtualMachineSpec(field *k8sfield.Path, spec *v1.VirtualMachineSpec, config *virtconfig.ClusterConfig, accountName string) []metav1.StatusCause
func ValidateWhenUnsatisfiable ¶ added in v0.57.0
func ValidateWhenUnsatisfiable(fldPath *field.Path, action core.UnsatisfiableConstraintAction) *field.Error
ValidateWhenUnsatisfiable tests that the argument is a valid UnsatisfiableConstraintAction.
Types ¶
type CloneAuthFunc ¶ added in v0.20.0
type ClusterInstancetypeAdmitter ¶ added in v0.56.0
type ClusterInstancetypeAdmitter struct{}
func (*ClusterInstancetypeAdmitter) Admit ¶ added in v0.56.0
func (f *ClusterInstancetypeAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
type ClusterPreferenceAdmitter ¶ added in v0.54.0
type ClusterPreferenceAdmitter struct{}
func (*ClusterPreferenceAdmitter) Admit ¶ added in v0.54.0
func (f *ClusterPreferenceAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
type InstancetypeAdmitter ¶ added in v0.56.0
type InstancetypeAdmitter struct{}
func (*InstancetypeAdmitter) Admit ¶ added in v0.56.0
func (f *InstancetypeAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
type MigrationCreateAdmitter ¶
type MigrationCreateAdmitter struct { ClusterConfig *virtconfig.ClusterConfig VirtClient kubecli.KubevirtClient }
func (*MigrationCreateAdmitter) Admit ¶
func (admitter *MigrationCreateAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
type MigrationPolicyAdmitter ¶ added in v0.49.0
type MigrationPolicyAdmitter struct { ClusterConfig *virtconfig.ClusterConfig Client kubecli.KubevirtClient }
MigrationPolicyAdmitter validates VirtualMachineSnapshots
func NewMigrationPolicyAdmitter ¶ added in v0.49.0
func NewMigrationPolicyAdmitter(clusterConfig *virtconfig.ClusterConfig, client kubecli.KubevirtClient) *MigrationPolicyAdmitter
NewMigrationPolicyAdmitter creates a MigrationPolicyAdmitter
func (*MigrationPolicyAdmitter) Admit ¶ added in v0.49.0
func (admitter *MigrationPolicyAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
Admit validates an AdmissionReview
type MigrationUpdateAdmitter ¶
type MigrationUpdateAdmitter struct { }
func (*MigrationUpdateAdmitter) Admit ¶
func (admitter *MigrationUpdateAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
type PodEvictionAdmitter ¶ added in v0.34.0
type PodEvictionAdmitter struct { ClusterConfig *virtconfig.ClusterConfig VirtClient kubecli.KubevirtClient }
func (*PodEvictionAdmitter) Admit ¶ added in v0.34.0
func (admitter *PodEvictionAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
type PreferenceAdmitter ¶ added in v0.54.0
type PreferenceAdmitter struct{}
func (*PreferenceAdmitter) Admit ¶ added in v0.54.0
func (f *PreferenceAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
type StatusAdmitter ¶ added in v0.33.0
type StatusAdmitter struct {
VmsAdmitter *VMsAdmitter
}
func (*StatusAdmitter) Admit ¶ added in v0.33.0
func (s *StatusAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
type VMExportAdmitter ¶ added in v0.55.0
type VMExportAdmitter struct {
Config *virtconfig.ClusterConfig
}
VMExportAdmitter validates VirtualMachineExports
func NewVMExportAdmitter ¶ added in v0.55.0
func NewVMExportAdmitter(config *virtconfig.ClusterConfig) *VMExportAdmitter
NewVMExportAdmitter creates a VMExportAdmitter
func (*VMExportAdmitter) Admit ¶ added in v0.55.0
func (admitter *VMExportAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
Admit validates an AdmissionReview
type VMICreateAdmitter ¶
type VMICreateAdmitter struct {
ClusterConfig *virtconfig.ClusterConfig
}
func (*VMICreateAdmitter) Admit ¶
func (admitter *VMICreateAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
type VMIPresetAdmitter ¶
type VMIPresetAdmitter struct { }
func (*VMIPresetAdmitter) Admit ¶
func (admitter *VMIPresetAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
type VMIRSAdmitter ¶
type VMIRSAdmitter struct {
ClusterConfig *virtconfig.ClusterConfig
}
func (*VMIRSAdmitter) Admit ¶
func (admitter *VMIRSAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
type VMIUpdateAdmitter ¶
type VMIUpdateAdmitter struct {
ClusterConfig *virtconfig.ClusterConfig
}
func (*VMIUpdateAdmitter) Admit ¶
func (admitter *VMIUpdateAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
type VMPoolAdmitter ¶ added in v0.49.0
type VMPoolAdmitter struct {
ClusterConfig *virtconfig.ClusterConfig
}
func (*VMPoolAdmitter) Admit ¶ added in v0.49.0
func (admitter *VMPoolAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
type VMRestoreAdmitter ¶ added in v0.34.0
type VMRestoreAdmitter struct { Config *virtconfig.ClusterConfig Client kubecli.KubevirtClient VMRestoreInformer cache.SharedIndexInformer }
VMRestoreAdmitter validates VirtualMachineRestores
func NewVMRestoreAdmitter ¶ added in v0.34.0
func NewVMRestoreAdmitter(config *virtconfig.ClusterConfig, client kubecli.KubevirtClient, vmRestoreInformer cache.SharedIndexInformer) *VMRestoreAdmitter
NewVMRestoreAdmitter creates a VMRestoreAdmitter
func (*VMRestoreAdmitter) Admit ¶ added in v0.34.0
func (admitter *VMRestoreAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
Admit validates an AdmissionReview
type VMSnapshotAdmitter ¶ added in v0.31.0
type VMSnapshotAdmitter struct { Config *virtconfig.ClusterConfig Client kubecli.KubevirtClient }
VMSnapshotAdmitter validates VirtualMachineSnapshots
func NewVMSnapshotAdmitter ¶ added in v0.31.0
func NewVMSnapshotAdmitter(config *virtconfig.ClusterConfig, client kubecli.KubevirtClient) *VMSnapshotAdmitter
NewVMSnapshotAdmitter creates a VMSnapshotAdmitter
func (*VMSnapshotAdmitter) Admit ¶ added in v0.31.0
func (admitter *VMSnapshotAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
Admit validates an AdmissionReview
type VMsAdmitter ¶
type VMsAdmitter struct { VirtClient kubecli.KubevirtClient DataSourceInformer cache.SharedIndexInformer InstancetypeMethods instancetype.Methods ClusterConfig *virtconfig.ClusterConfig // contains filtered or unexported fields }
func NewVMsAdmitter ¶ added in v0.20.0
func NewVMsAdmitter(clusterConfig *virtconfig.ClusterConfig, client kubecli.KubevirtClient, informers *webhooks.Informers) *VMsAdmitter
func (*VMsAdmitter) Admit ¶
func (admitter *VMsAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
func (*VMsAdmitter) AdmitStatus ¶ added in v0.33.0
func (admitter *VMsAdmitter) AdmitStatus(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
type VirtualMachineCloneAdmitter ¶ added in v0.55.0
type VirtualMachineCloneAdmitter struct { Config *virtconfig.ClusterConfig Client kubecli.KubevirtClient }
VirtualMachineCloneAdmitter validates VirtualMachineClones
func NewVMCloneAdmitter ¶ added in v0.55.0
func NewVMCloneAdmitter(config *virtconfig.ClusterConfig, client kubecli.KubevirtClient) *VirtualMachineCloneAdmitter
NewMigrationPolicyAdmitter creates a MigrationPolicyAdmitter
func (*VirtualMachineCloneAdmitter) Admit ¶ added in v0.55.0
func (admitter *VirtualMachineCloneAdmitter) Admit(ar *admissionv1.AdmissionReview) *admissionv1.AdmissionResponse
Admit validates an AdmissionReview
Source Files ¶
- instancetype-admitter.go
- migration-create-admitter.go
- migration-update-admitter.go
- migrationpolicy-admitter.go
- pod-eviction-admitter.go
- preference-admitter.go
- status-admitter.go
- validate-k8s-utils.go
- vmclone-admitter.go
- vmexport-admitter.go
- vmi-create-admitter.go
- vmi-preset-admitter.go
- vmi-update-admitter.go
- vmirs-admitter.go
- vmpool-admitter.go
- vmrestore-admitter.go
- vms-admitter.go
- vmsnapshot-admitter.go