scope

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 11 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
	IroncoreMetalCluster *infrav1.IroncoreMetalCluster
	// 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
	IroncoreMetalCluster *infrav1.IroncoreMetalCluster
	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
	IroncoreMetalCluster *infrav1.IroncoreMetalCluster
	IroncoreMetalMachine *infrav1.IroncoreMetalMachine
	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 IroncoreMetalMachine status failure message.

func (*MachineScope) SetFailureReason

func (m *MachineScope) SetFailureReason(v string)

SetFailureReason sets the IroncoreMetalMachine status failure reason.

func (*MachineScope) SetNotReady

func (m *MachineScope) SetNotReady()

SetNotReady sets the IroncoreMetalMachine Ready Status to false.

func (*MachineScope) SetReady

func (m *MachineScope) SetReady()

SetReady sets the IroncoreMetalMachine Ready Status.

type MachineScopeParams

type MachineScopeParams struct {
	Client               client.Client
	Logger               *logr.Logger
	Cluster              *clusterv1.Cluster
	Machine              *clusterv1.Machine
	IroncoreMetalCluster *infrav1.IroncoreMetalCluster
	IroncoreMetalMachine *infrav1.IroncoreMetalMachine
}

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