Documentation ¶
Overview ¶
Package vmoperator contains reconcilers and related functions for VM Operator based VSphereMachines.
Index ¶
- Constants
- func GenerateVirtualMachineName(machineName string, namingStrategy *vmwarev1.VirtualMachineNamingStrategy) (string, error)
- type CPService
- type RPService
- type VmopMachineService
- func (v *VmopMachineService) FetchVSphereCluster(ctx context.Context, cluster *clusterv1.Cluster, ...) (capvcontext.MachineContext, error)
- func (v *VmopMachineService) FetchVSphereMachine(ctx context.Context, name apitypes.NamespacedName) (capvcontext.MachineContext, error)
- func (v *VmopMachineService) GetHostInfo(ctx context.Context, machineCtx capvcontext.MachineContext) (string, error)
- func (v *VmopMachineService) GetMachinesInCluster(ctx context.Context, namespace, clusterName string) ([]client.Object, error)
- func (v *VmopMachineService) ReconcileDelete(ctx context.Context, machineCtx capvcontext.MachineContext) error
- func (v *VmopMachineService) ReconcileNormal(ctx context.Context, machineCtx capvcontext.MachineContext) (bool, error)
- func (v *VmopMachineService) SyncFailureReason(_ context.Context, machineCtx capvcontext.MachineContext) (bool, error)
Constants ¶
const ( // ControlPlaneVMClusterModuleGroupName is the name used for the control plane Cluster Module. ControlPlaneVMClusterModuleGroupName = "control-plane-group" // ClusterModuleNameAnnotationKey is key for the Cluster Module annotation. ClusterModuleNameAnnotationKey = "vsphere-cluster-module-group" // ProviderTagsAnnotationKey is the key used for the provider tags annotation. ProviderTagsAnnotationKey = "vsphere-tag" // ControlPlaneVMVMAntiAffinityTagValue is the value used for ProviderTagsAnnotationKey when the machine is a control plane machine. ControlPlaneVMVMAntiAffinityTagValue = "CtrlVmVmAATag" // WorkerVMVMAntiAffinityTagValue is the value used for ProviderTagsAnnotationKey when the machine is a worker machine. WorkerVMVMAntiAffinityTagValue = "WorkerVmVmAATag" )
Variables ¶
This section is empty.
Functions ¶
func GenerateVirtualMachineName ¶ added in v1.11.0
func GenerateVirtualMachineName(machineName string, namingStrategy *vmwarev1.VirtualMachineNamingStrategy) (string, error)
GenerateVirtualMachineName generates the name of a VirtualMachine based on the naming strategy.
Types ¶
type CPService ¶
CPService represents the ability to reconcile a ControlPlaneEndpoint.
func (*CPService) ReconcileControlPlaneEndpointService ¶
func (s *CPService) ReconcileControlPlaneEndpointService(ctx context.Context, clusterCtx *vmware.ClusterContext, netProvider services.NetworkProvider) (*clusterv1.APIEndpoint, error)
ReconcileControlPlaneEndpointService manages the lifecycle of a control plane endpoint managed by a vmoperator VirtualMachineService.
type RPService ¶
RPService represents the ability to reconcile a VirtualMachineSetResourcePolicy via vmoperator.
func (*RPService) ReconcileResourcePolicy ¶
func (s *RPService) ReconcileResourcePolicy(ctx context.Context, clusterCtx *vmware.ClusterContext) (string, error)
ReconcileResourcePolicy ensures that a VirtualMachineSetResourcePolicy exists for the cluster Returns the name of a policy if it exists, otherwise returns an error.
type VmopMachineService ¶
VmopMachineService reconciles VM Operator VM.
func (*VmopMachineService) FetchVSphereCluster ¶
func (v *VmopMachineService) FetchVSphereCluster(ctx context.Context, cluster *clusterv1.Cluster, machineContext capvcontext.MachineContext) (capvcontext.MachineContext, error)
FetchVSphereCluster adds the VSphereCluster for the cluster to the MachineContext.
func (*VmopMachineService) FetchVSphereMachine ¶
func (v *VmopMachineService) FetchVSphereMachine(ctx context.Context, name apitypes.NamespacedName) (capvcontext.MachineContext, error)
FetchVSphereMachine returns a MachineContext with a VSphereMachine for the passed NamespacedName.
func (*VmopMachineService) GetHostInfo ¶ added in v1.3.2
func (v *VmopMachineService) GetHostInfo(ctx context.Context, machineCtx capvcontext.MachineContext) (string, error)
GetHostInfo returns the hostname or IP address of the infrastructure host for the VM Operator VM.
func (*VmopMachineService) GetMachinesInCluster ¶ added in v1.9.0
func (v *VmopMachineService) GetMachinesInCluster( ctx context.Context, namespace, clusterName string) ([]client.Object, error)
GetMachinesInCluster returns a list of VSphereMachine objects belonging to the cluster.
func (*VmopMachineService) ReconcileDelete ¶
func (v *VmopMachineService) ReconcileDelete(ctx context.Context, machineCtx capvcontext.MachineContext) error
ReconcileDelete reconciles delete events for VM Operator VM.
func (*VmopMachineService) ReconcileNormal ¶
func (v *VmopMachineService) ReconcileNormal(ctx context.Context, machineCtx capvcontext.MachineContext) (bool, error)
ReconcileNormal reconciles create and update events for VM Operator VMs.
func (*VmopMachineService) SyncFailureReason ¶
func (v *VmopMachineService) SyncFailureReason(_ context.Context, machineCtx capvcontext.MachineContext) (bool, error)
SyncFailureReason returns true if there is a Failure on the VM Operator VM.