k8s

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package k8s offers services to interact with kubernetes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Helper

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

Helper offers IP address management services for IONOS Cloud machine reconciliation.

func NewHelper

func NewHelper(c client.Client, log logr.Logger) *Helper

NewHelper creates new Helper.

func (*Helper) CreateIPAddressClaim

func (h *Helper) CreateIPAddressClaim(ctx context.Context, owner client.Object, name string, cluster string, poolRef *corev1.TypedLocalObjectReference) error

CreateIPAddressClaim creates an IPAddressClaim for a given object.

func (*Helper) GetIPAddress

func (h *Helper) GetIPAddress(ctx context.Context, key client.ObjectKey) (*ipamv1.IPAddress, error)

GetIPAddress attempts to retrieve the IPAddress.

func (*Helper) GetIPAddressClaim

func (h *Helper) GetIPAddressClaim(ctx context.Context, key client.ObjectKey) (*ipamv1.IPAddressClaim, error)

GetIPAddressClaim attempts to retrieve the IPAddressClaim.

func (*Helper) ReconcileIPAddressClaimsDeletion

func (h *Helper) ReconcileIPAddressClaimsDeletion(ctx context.Context, machineScope *scope.Machine) (requeue bool, err error)

ReconcileIPAddressClaimsDeletion removes the MachineFinalizer from the IPAddressClaims.

func (*Helper) ReconcileIPAddresses

func (h *Helper) ReconcileIPAddresses(ctx context.Context, machineScope *scope.Machine) (requeue bool, err error)

ReconcileIPAddresses prevents successful reconciliation of a IonosCloudMachine until an IPAMConfig Provider updates each IPAddressClaim associated to the IonosCloudMachine with a reference to an IPAddress. The IPAddress is stored in the status. This function is a no-op if the IonosCloudMachine has no associated IPAddressClaims.

Jump to

Keyboard shortcuts

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