vmoperator

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package vmoperator contains reconcilers and related functions for VM Operator based VSphereMachines.

Index

Constants

View Source
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

This section is empty.

Types

type CPService

type CPService struct {
	Client client.Client
}

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

type RPService struct {
	Client client.Client
}

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

type VmopMachineService struct {
	Client                                client.Client
	ConfigureControlPlaneVMReadinessProbe bool
}

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL