scope

package
v0.0.0-...-e6dd756 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterScope

type ClusterScope struct {
	*logr.Logger

	Cluster      *clusterv1.Cluster
	MetalCluster *infrav1.MetalCluster
	// contains filtered or unexported fields
}

ClusterScope defines the basic context for an actuator to operate upon.

func NewClusterScope

func NewClusterScope(params ClusterScopeParams) (*ClusterScope, error)

NewClusterScope creates a new Scope from the supplied parameters. This is meant to be called for each reconcile iteration.

func (*ClusterScope) Close

func (s *ClusterScope) Close() error

Close closes the current scope persisting the cluster configuration and status.

func (*ClusterScope) InfraClusterName

func (s *ClusterScope) InfraClusterName() string

InfraClusterName returns the name of the Metal cluster.

func (*ClusterScope) KubernetesClusterName

func (s *ClusterScope) KubernetesClusterName() string

KubernetesClusterName is the name of the Kubernetes cluster. For the cluster scope this is the same as the CAPI cluster name.

func (*ClusterScope) Name

func (s *ClusterScope) Name() string

Name returns the CAPI cluster name.

func (*ClusterScope) Namespace

func (s *ClusterScope) Namespace() string

Namespace returns the cluster namespace.

func (*ClusterScope) PatchObject

func (s *ClusterScope) PatchObject() error

PatchObject persists the cluster configuration and status.

type ClusterScopeParams

type ClusterScopeParams struct {
	Client         client.Client
	Logger         *logr.Logger
	Cluster        *clusterv1.Cluster
	MetalCluster   *infrav1.MetalCluster
	ControllerName string
}

ClusterScopeParams defines the input parameters used to create a new Scope.

type MachineScope

type MachineScope struct {
	*logr.Logger

	Cluster      *clusterv1.Cluster
	Machine      *clusterv1.Machine
	MetalCluster *infrav1.MetalCluster
	MetalMachine *infrav1.MetalMachine
	ServerClaim  *v1alpha1.ServerClaim
	// contains filtered or unexported fields
}

MachineScope defines the basic context for an actuator to operate upon.

func NewMachineScope

func NewMachineScope(params MachineScopeParams) (*MachineScope, error)

NewMachineScope creates a new Scope from the supplied parameters. This is meant to be called for each reconcile iteration.

func (*MachineScope) Close

func (s *MachineScope) Close() error

Close closes the current scope persisting the Machine configuration and status.

func (*MachineScope) HasFailed

func (m *MachineScope) HasFailed() bool

HasFailed returns the failure state of the machine scope.

func (*MachineScope) PatchObject

func (s *MachineScope) PatchObject() error

PatchObject persists the Machine configuration and status.

func (*MachineScope) SetFailureMessage

func (m *MachineScope) SetFailureMessage(v error)

SetFailureMessage sets the MetalMachine status failure message.

func (*MachineScope) SetFailureReason

func (m *MachineScope) SetFailureReason(v capierrors.MachineStatusError)

SetFailureReason sets the MetalMachine status failure reason.

func (*MachineScope) SetNotReady

func (m *MachineScope) SetNotReady()

SetNotReady sets the MetalMachine Ready Status to false.

func (*MachineScope) SetReady

func (m *MachineScope) SetReady()

SetReady sets the MetalMachine Ready Status.

type MachineScopeParams

type MachineScopeParams struct {
	Client       client.Client
	Logger       *logr.Logger
	Cluster      *clusterv1.Cluster
	Machine      *clusterv1.Machine
	MetalCluster *infrav1.MetalCluster
	MetalMachine *infrav1.MetalMachine
}

MachineScopeParams defines the input parameters used to create a new Scope.

Jump to

Keyboard shortcuts

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