controller

package
v0.0.0-...-34fee86 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// DefaultIgnitionSecretKeyName is the default key name for the ignition secret
	DefaultIgnitionSecretKeyName = "ignition"
	// DefaultIgnitionFormatKey is the key for the ignition format annotation
	DefaultIgnitionFormatKey = "format"
	// DefaultIgnitionFormatValue is the value for the ignition format annotation
	DefaultIgnitionFormatValue = "fcos"
	// SSHKeyPairSecretPrivateKeyName is the key name for the private key in the SSH key pair secret
	SSHKeyPairSecretPrivateKeyName = "pem"
	// SSHKeyPairSecretPublicKeyName is the key name for the public key in the SSH key pair secret
	SSHKeyPairSecretPublicKeyName = "pub"
	// SSHKeyPairSecretPasswordKeyName is the key name for the password in the SSH key pair secret
	SSHKeyPairSecretPasswordKeyName = "password"
	// ServerFinalizer is the finalizer for the server
	ServerFinalizer = "metal.ironcore.dev/server"
	// InternalAnnotationTypeKeyName is the key name for the internal annotation type
	InternalAnnotationTypeKeyName = "metal.ironcore.dev/type"
	// IsDefaultServerBootConfigOSImageKeyName is the key name for the is default OS image annotation
	IsDefaultServerBootConfigOSImageKeyName = "metal.ironcore.dev/is-default-os-image"
	// InternalAnnotationTypeValue is the value for the internal annotation type
	InternalAnnotationTypeValue = "Internal"
)
View Source
const BMCFinalizer = "metal.ironcore.dev/bmc"
View Source
const BMCSettingFinalizer = "firmware.ironcore.dev/out-of-band-management"
View Source
const (
	EndpointFinalizer = "metal.ironcore.dev/endpoint"
)
View Source
const (
	ServerClaimFinalizer = "metal.ironcore.dev/serverclaim"
)
View Source
const (
	// ServerMaintenanceFinalizer is the finalizer for the ServerMaintenance resource.
	ServerMaintenanceFinalizer = "metal.ironcore.dev/servermaintenance"
)

Variables

This section is empty.

Functions

func BuildServerClaim

func BuildServerClaim(
	ctx context.Context,
	k8sClient client.Client,
	server metalv1alpha1.Server,
	nameSpace string,
	ignitionData map[string][]byte,
	requiredPower metalv1alpha1.Power,
	claimImage string,
) *metalv1alpha1.ServerClaim

func GenerateRandomPassword

func GenerateRandomPassword(length int) ([]byte, error)

GenerateRandomPassword generates a random password of the given length.

func TransistionServerFromInitialToAvailableState

func TransistionServerFromInitialToAvailableState(
	ctx context.Context,
	k8sClient client.Client,
	server *metalv1alpha1.Server,
	BootConfigNameSpace string,
)

TransistionServerFromInitialToAvailableState transistions the server to AvailableState

func TransistionServerToReserveredState

func TransistionServerToReserveredState(
	ctx context.Context,
	k8sClient client.Client,
	serverClaim *metalv1alpha1.ServerClaim,
	server *metalv1alpha1.Server,
	nameSpace string,
)

TransistionServerToReserveredState transistions the server to Reserved

Types

type BIOSVersionReconciler

type BIOSVersionReconciler struct {
	client.Client
	ManagerNamespace string
	Insecure         bool
	Scheme           *runtime.Scheme
	BMCOptions       bmc.Options
	ResyncInterval   time.Duration
}

BIOSVersionReconciler reconciles a BIOSVersion object

func (*BIOSVersionReconciler) Reconcile

func (r *BIOSVersionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*BIOSVersionReconciler) SetupWithManager

func (r *BIOSVersionReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type BMCReconciler

type BMCReconciler struct {
	client.Client
	Scheme            *runtime.Scheme
	Insecure          bool
	BMCPollingOptions bmc.Options
}

BMCReconciler reconciles a BMC object

func (*BMCReconciler) Reconcile

func (r *BMCReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*BMCReconciler) SetupWithManager

func (r *BMCReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type BMCSecretReconciler

type BMCSecretReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

BMCSecretReconciler reconciles a BMCSecret object

func (*BMCSecretReconciler) Reconcile

func (r *BMCSecretReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the BMCSecret object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.0/pkg/reconcile

func (*BMCSecretReconciler) SetupWithManager

func (r *BMCSecretReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type BMCSettingsReconciler

type BMCSettingsReconciler struct {
	client.Client
	ManagerNamespace string
	ResyncInterval   time.Duration
	Insecure         bool
	Scheme           *runtime.Scheme
	BMCOptions       bmc.Options
}

BMCSettingsReconciler reconciles a BMCSettings object

func (*BMCSettingsReconciler) Reconcile

func (r *BMCSettingsReconciler) Reconcile(
	ctx context.Context,
	req ctrl.Request,
) (ctrl.Result, error)

func (*BMCSettingsReconciler) SetupWithManager

func (r *BMCSettingsReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type BiosSettingsReconciler

type BiosSettingsReconciler struct {
	client.Client
	ManagerNamespace string
	Insecure         bool
	Scheme           *runtime.Scheme
	BMCOptions       bmc.Options
	ResyncInterval   time.Duration
	TimeoutExpiry    time.Duration
}

BiosSettingsReconciler reconciles a BIOSSettings object

func (*BiosSettingsReconciler) Reconcile

func (r *BiosSettingsReconciler) Reconcile(
	ctx context.Context,
	req ctrl.Request,
) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*BiosSettingsReconciler) SetupWithManager

func (r *BiosSettingsReconciler) SetupWithManager(
	mgr ctrl.Manager,
) error

SetupWithManager sets up the controller with the Manager.

type EndpointReconciler

type EndpointReconciler struct {
	client.Client
	Scheme      *runtime.Scheme
	MACPrefixes *macdb.MacPrefixes
	Insecure    bool
	BMCOptions  bmc.Options
}

EndpointReconciler reconciles a Endpoints object

func (*EndpointReconciler) Reconcile

func (r *EndpointReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*EndpointReconciler) SetupWithManager

func (r *EndpointReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ServerBootConfigurationReconciler

type ServerBootConfigurationReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

ServerBootConfigurationReconciler reconciles a ServerBootConfiguration object

func (*ServerBootConfigurationReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*ServerBootConfigurationReconciler) SetupWithManager

func (r *ServerBootConfigurationReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ServerClaimReconciler

type ServerClaimReconciler struct {
	client.Client
	Cache                   cache.Cache
	Scheme                  *runtime.Scheme
	MaxConcurrentReconciles int
}

ServerClaimReconciler reconciles a ServerClaim object

func (*ServerClaimReconciler) Reconcile

func (r *ServerClaimReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*ServerClaimReconciler) SetupWithManager

func (r *ServerClaimReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ServerMaintenanceReconciler

type ServerMaintenanceReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

ServerMaintenanceReconciler reconciles a ServerMaintenance object

func (*ServerMaintenanceReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ServerMaintenance object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.20.2/pkg/reconcile

func (*ServerMaintenanceReconciler) SetupWithManager

func (r *ServerMaintenanceReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ServerReconciler

type ServerReconciler struct {
	client.Client
	Scheme                  *runtime.Scheme
	Insecure                bool
	ManagerNamespace        string
	ProbeImage              string
	RegistryURL             string
	ProbeOSImage            string
	RegistryResyncInterval  time.Duration
	EnforceFirstBoot        bool
	EnforcePowerOff         bool
	ResyncInterval          time.Duration
	BMCOptions              bmc.Options
	DiscoveryTimeout        time.Duration
	MaxConcurrentReconciles int
}

ServerReconciler reconciles a Server object

func (*ServerReconciler) Reconcile

func (r *ServerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*ServerReconciler) SetupWithManager

func (r *ServerReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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