scope

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package scope bundles the resolved CAPI / Stackit objects a reconcile pass operates on, together with a patch helper, mirroring the convention used by upstream CAPI providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterScope

type ClusterScope struct {
	Client         client.Client
	Cluster        *clusterv1.Cluster
	StackitCluster *infrav1.StackitCluster
	// contains filtered or unexported fields
}

ClusterScope holds the per-reconcile state for a StackitCluster.

func NewClusterScope

func NewClusterScope(
	k8sClient client.Client,
	cluster *clusterv1.Cluster,
	stackitCluster *infrav1.StackitCluster,
) (*ClusterScope, error)

NewClusterScope constructs a ClusterScope and snapshots the original resource so the patchHelper can compute a minimal patch on close.

func (*ClusterScope) ClearBastionStatus

func (s *ClusterScope) ClearBastionStatus()

func (*ClusterScope) PatchObject

func (s *ClusterScope) PatchObject(ctx context.Context) error

PatchObject writes back any spec/status changes to the StackitCluster.

func (*ClusterScope) SetAPIServerEndpoint

func (s *ClusterScope) SetAPIServerEndpoint(endpoint clusterv1.APIEndpoint)

func (*ClusterScope) SetBastionStatus

func (s *ClusterScope) SetBastionStatus(bastion *cloud.Bastion, cloudInitHash string)

func (*ClusterScope) SetConditions

func (s *ClusterScope) SetConditions(status metav1.ConditionStatus, reason, message string, conditionTypes ...string)

func (*ClusterScope) SetNotReady

func (s *ClusterScope) SetNotReady(reason, message string, conditionTypes ...string)

func (*ClusterScope) SetReady

func (s *ClusterScope) SetReady()

type MachineScope

type MachineScope struct {
	Client         client.Client
	Cluster        *clusterv1.Cluster
	Machine        *clusterv1.Machine
	StackitCluster *infrav1.StackitCluster
	StackitMachine *infrav1.StackitMachine
	// contains filtered or unexported fields
}

MachineScope holds the per-reconcile state for a StackitMachine.

func NewMachineScope

func NewMachineScope(
	k8sClient client.Client,
	cluster *clusterv1.Cluster,
	machine *clusterv1.Machine,
	stackitCluster *infrav1.StackitCluster,
	stackitMachine *infrav1.StackitMachine,
) (*MachineScope, error)

NewMachineScope constructs a MachineScope and snapshots the original StackitMachine for patching.

func (*MachineScope) ClearInstance

func (s *MachineScope) ClearInstance()

func (*MachineScope) PatchObject

func (s *MachineScope) PatchObject(ctx context.Context) error

PatchObject writes back any spec/status changes to the StackitMachine.

func (*MachineScope) SetConditions

func (s *MachineScope) SetConditions(status metav1.ConditionStatus, reason, message string, conditionTypes ...string)

func (*MachineScope) SetInstance

func (s *MachineScope) SetInstance(server *cloud.Server) string

func (*MachineScope) SetNotReady

func (s *MachineScope) SetNotReady(reason, message string, conditionTypes ...string)

func (*MachineScope) SetReady

func (s *MachineScope) SetReady()

func (*MachineScope) Tags

func (s *MachineScope) Tags() map[string]string

Jump to

Keyboard shortcuts

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