baremetal

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package baremetal implements functions to manage the lifecycle of baremetal machines as inventory

Index

Constants

View Source
const (
	// ProviderIDPrefix is a prefix for ProviderID.
	ProviderIDPrefix = "hcloud://"

	// FailureMessageMaintenanceMode indicates that host is in maintenance mode.
	FailureMessageMaintenanceMode = "host machine in maintenance mode"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NotFoundError

type NotFoundError struct {
}

NotFoundError represents that an object was not found.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service defines struct with machine scope to reconcile Hetzner bare metal machines.

func NewService

func NewService(scope *scope.BareMetalMachineScope) *Service

NewService outs a new service with machine scope.

func (*Service) Delete

func (s *Service) Delete(ctx context.Context) (_ *ctrl.Result, err error)

Delete implements delete method of bare metal machine.

func (*Service) DeleteOwnerRef

func (s *Service) DeleteOwnerRef(refList []metav1.OwnerReference) ([]metav1.OwnerReference, error)

DeleteOwnerRef removes the ownerreference to this BareMetalMachine.

func (*Service) GetBaremetalHostID

func (s *Service) GetBaremetalHostID(ctx context.Context) (*string, error)

GetBaremetalHostID return the provider identifier for this machine.

func (*Service) GetProviderIDAndBMHID

func (s *Service) GetProviderIDAndBMHID() (string, *string)

GetProviderIDAndBMHID returns providerID and bmhID.

func (*Service) Reconcile

func (s *Service) Reconcile(ctx context.Context) (_ *ctrl.Result, err error)

Reconcile implements reconcilement of Hetzner bare metal machines.

func (*Service) SetOwnerRef

func (s *Service) SetOwnerRef(refList []metav1.OwnerReference, controller bool) ([]metav1.OwnerReference, error)

SetOwnerRef adds an ownerreference to this Hetzner bare metal machine.

Jump to

Keyboard shortcuts

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