Documentation
¶
Index ¶
- Constants
- func GenerateRandomPassword(length int) ([]byte, error)
- func GetCondition(acc *conditionutils.Accessor, conditions []metav1.Condition, ...) (*metav1.Condition, error)
- func GetImageCredentialsForSecretRef(ctx context.Context, c client.Client, secretRef *corev1.SecretReference) (string, string, error)
- func GetServerByName(ctx context.Context, c client.Client, serverName string) (*metalv1alpha1.Server, error)
- func GetServerMaintenanceForObjectReference(ctx context.Context, c client.Client, ref *metalv1alpha1.ObjectReference) (*metalv1alpha1.ServerMaintenance, error)
- func RegisterIndexFields(ctx context.Context, indexer client.FieldIndexer) error
- type BIOSSettingsReconciler
- type BIOSSettingsSetReconciler
- type BIOSVersionReconciler
- type BIOSVersionSetReconciler
- type BMCReconciler
- type BMCSecretReconciler
- type BMCSettingsReconciler
- type BMCSettingsSetReconciler
- type BMCVersionReconciler
- type BMCVersionSetReconciler
- type DNSRecordTemplateData
- type EndpointReconciler
- type ServerBootConfigurationReconciler
- type ServerClaimReconciler
- type ServerMaintenanceReconciler
- type ServerReconciler
Constants ¶
const ( BIOSSettingsFinalizer = "metal.ironcore.dev/biossettings" BIOSServerMaintenanceConditionCreated = "ServerMaintenanceCreated" BIOSServerMaintenanceReasonCreated = "ServerMaintenanceHasBeenCreated" BIOSServerMaintenanceConditionDeleted = "ServerMaintenanceDeleted" BIOSServerMaintenanceReasonDeleted = "ServerMaintenanceHasBeenDeleted" BIOSVersionUpdateConditionPending = "BIOSVersionUpdatePending" BIOSVersionUpgradeReasonPending = "BIOSVersionNeedsTObeUpgraded" BIOSPendingSettingConditionCheck = "BIOSSettingsCheckPendingSettings" BIOSPendingSettingsReasonFound = "BIOSPendingSettingsFound" BIOSSettingsConditionDuplicateKey = "BIOSSettingsDuplicateKeys" BIOSSettingsReasonFoundDuplicateKeys = "BIOSSettingsDuplicateKeysFound" BIOSSettingConditionUpdateStartTime = "BIOSSettingUpdateStartTime" BIOSSettingsReasonUpdateStartTime = "BIOSSettingsUpdateHasStarted" BIOSSettingConditionUpdateTimedOut = "BIOSSettingsTimedOut" BIOSSettingsReasonUpdateTimedOut = "BIOSSettingsTimedOutDuringUpdate" BIOSSettingsConditionServerPowerOn = "ServerPowerOnCondition" BIOSSettingsReasonServerPoweredOn = "ServerPoweredHasBeenPoweredOn" BMCConditionReset = "BMCResetIssued" BMCReasonReset = "BMCResetIssued" BIOSSettingsConditionIssuedUpdate = "SettingsUpdateIssued" BIOSSettingReasonIssuedUpdate = "BIOSSettingUpdateIssued" BIOSSettingsConditionUnknownPendingSettings = "UnknownPendingSettingState" BIOSSettingsReasonUnexpectedPendingSettings = "UnexpectedPendingSettingsPostUpdateHasBeenIssued" BIOSSettingsConditionRebootPostUpdate = "ServerRebootPostUpdateHasBeenIssued" BIOSSettingsReasonSkipReboot = "SkipServerRebootPostUpdateHasBeenIssued" BIOSSettingsReasonRebootNeeded = "RebootPostSettingUpdate" BIOSSettingsConditionRebootPowerOff = "RebootPowerOff" BIOSSettingsReasonRebootServerPowerOff = "PowerOffCompletedDuringReboot" BIOSSettingsConditionRebootPowerOn = "RebootPowerOn" BIOSSettingsReasonRebootServerPowerOn = "PowerOnCompletedDuringReboot" BIOSSettingsConditionVerifySettings = "VerifySettingsPostUpdate" BIOSSettingsReasonVerificationCompleted = "VerificationCompleted" BIOSSettingsConditionWrongSettings = "SettingsProvidedNotValid" BIOSSettingsReasonWrongSettings = "SettingsProvidedAreNotValid" )
const ( BIOSVersionFinalizer = "metal.ironcore.dev/biosversion" ConditionBIOSUpgradeIssued = "BIOSUpgradeIssued" ConditionBIOSUpgradeCompleted = "BIOSUpgradeCompleted" ConditionBIOSUpgradePowerOn = "BIOSUpgradePowerOn" ConditionBIOSUpgradePowerOff = "BIOSUpgradePowerOff" ConditionBIOSUpgradeVerification = "BIOSUpgradeVerification" ReasonUpgradeIssued = "UpgradeIssued" ReasonUpgradeIssueFailed = "UpgradeIssueFailed" ReasonRebootPowerOff = "RebootPowerOff" ReasonRebootPowerOn = "RebootPowerOn" ReasonBIOSVersionVerified = "BIOSVersionVerified" ReasonBIOSVersionVerification = "BIOSVersionVerificationFailed" ReasonUpgradeTaskFailed = "UpgradeTaskFailed" ReasonUpgradeTaskCompleted = "UpgradeTaskCompleted" )
const ( BMCSettingFinalizer = "metal.ironcore.dev/bmcsettings" BMCResetPostSettingApplyCondition = "BMCResetPostSettingApply" BMCPoweredOffCondition = "BMCPoweredOff" BMCPoweredOffReason = "BMCPowerIsCurrentlyPoweredOff" BMCVersionUpdatePendingCondition = "BMCVersionUpdatePending" BMCVersionUpgradePendingReason = "BMCVersionUpgradeIsPending" )
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" // PoweringOnCondition is the condition type for powering on a server PoweringOnCondition = "PoweringOn" )
const BIOSVersionSetFinalizer = "metal.ironcore.dev/biosversionset"
const (
BMCFinalizer = "metal.ironcore.dev/bmc"
)
const BMCSettingsSetFinalizer = "metal.ironcore.dev/bmcsettingsset"
const BMCVersionSetFinalizer = "metal.ironcore.dev/bmcversionset"
const (
EndpointFinalizer = "metal.ironcore.dev/endpoint"
)
const (
ServerClaimFinalizer = "metal.ironcore.dev/serverclaim"
)
const (
// ServerMaintenanceFinalizer is the finalizer for the ServerMaintenance resource.
ServerMaintenanceFinalizer = "metal.ironcore.dev/servermaintenance"
)
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomPassword ¶
GenerateRandomPassword generates a random password of the given length.
func GetCondition ¶ added in v0.2.0
func GetCondition(acc *conditionutils.Accessor, conditions []metav1.Condition, conditionType string) (*metav1.Condition, error)
GetCondition finds a condition in a condition slice.
func GetImageCredentialsForSecretRef ¶ added in v0.2.0
func GetServerByName ¶ added in v0.2.0
func GetServerByName(ctx context.Context, c client.Client, serverName string) (*metalv1alpha1.Server, error)
GetServerByName returns a Server object by its name or an error in case the object can not be found.
func GetServerMaintenanceForObjectReference ¶ added in v0.2.0
func GetServerMaintenanceForObjectReference(ctx context.Context, c client.Client, ref *metalv1alpha1.ObjectReference) (*metalv1alpha1.ServerMaintenance, error)
GetServerMaintenanceForObjectReference returns a ServerMaintenance object for a given reference.
func RegisterIndexFields ¶ added in v0.2.0
func RegisterIndexFields(ctx context.Context, indexer client.FieldIndexer) error
Types ¶
type BIOSSettingsReconciler ¶ added in v0.2.0
type BIOSSettingsReconciler struct {
client.Client
ManagerNamespace string
Insecure bool
Scheme *runtime.Scheme
BMCOptions bmc.Options
ResyncInterval time.Duration
TimeoutExpiry time.Duration
Conditions *conditionutils.Accessor
}
BIOSSettingsReconciler reconciles a BIOSSettings object
func (*BIOSSettingsReconciler) Reconcile ¶ added in v0.2.0
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 ¶ added in v0.2.0
func (r *BIOSSettingsReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type BIOSSettingsSetReconciler ¶
BIOSSettingsSetReconciler reconciles a BIOSSettingsSet object
func (*BIOSSettingsSetReconciler) SetupWithManager ¶
func (r *BIOSSettingsSetReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type BIOSVersionReconciler ¶
type BIOSVersionReconciler struct {
client.Client
ManagerNamespace string
Insecure bool
Scheme *runtime.Scheme
BMCOptions bmc.Options
ResyncInterval time.Duration
Conditions *conditionutils.Accessor
}
BIOSVersionReconciler reconciles a BIOSVersion object
func (*BIOSVersionReconciler) SetupWithManager ¶
func (r *BIOSVersionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type BIOSVersionSetReconciler ¶
BIOSVersionSetReconciler reconciles a BIOSVersionSet object
func (*BIOSVersionSetReconciler) Reconcile ¶
func (r *BIOSVersionSetReconciler) 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 (*BIOSVersionSetReconciler) SetupWithManager ¶
func (r *BIOSVersionSetReconciler) 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
// BMCFailureResetDelay defines the duration after which a BMC will be reset upon repeated connection failures.
BMCFailureResetDelay time.Duration
BMCOptions bmc.Options
ManagerNamespace string
// BMCResetWaitTime defines the duration to wait after a BMC reset before attempting reconciliation again.
BMCResetWaitTime time.Duration
// BMCClientRetryInterval defines the duration to requeue reconciliation after a BMC client error/reset/unavailablility.
BMCClientRetryInterval time.Duration
// DNSRecordTemplatePath is the path to the file containing the DNSRecord template.
DNSRecordTemplate string
Conditions *conditionutils.Accessor
}
BMCReconciler reconciles a BMC object
func (*BMCReconciler) 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 (*BMCReconciler) SetupWithManager ¶
func (r *BMCReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type BMCSecretReconciler ¶
BMCSecretReconciler reconciles a BMCSecret object
func (*BMCSecretReconciler) 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 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
Conditions *conditionutils.Accessor
}
BMCSettingsReconciler reconciles a BMCSettings object
func (*BMCSettingsReconciler) SetupWithManager ¶
func (r *BMCSettingsReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type BMCSettingsSetReconciler ¶ added in v0.2.0
func (*BMCSettingsSetReconciler) Reconcile ¶ added in v0.2.0
func (r *BMCSettingsSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
+kubebuilder:rbac:groups=metal.ironcore.dev,resources=bmcsettingssets,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=metal.ironcore.dev,resources=bmcsettingssets/status,verbs=get;update;patch +kubebuilder:rbac:groups=metal.ironcore.dev,resources=bmcsettingssets/finalizers,verbs=update +kubebuilder:rbac:groups=metal.ironcore.dev,resources=bmcsettings,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=metal.ironcore.dev,resources=bmcs,verbs=get;list;watch +kubebuilder:rbac:groups=metal.ironcore.dev,resources=servers,verbs=get;list;watch +kubebuilder:rbac:groups=metal.ironcore.dev,resources=servermaintenances,verbs=get;list;watch
func (*BMCSettingsSetReconciler) SetupWithManager ¶ added in v0.2.0
func (r *BMCSettingsSetReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type BMCVersionReconciler ¶
type BMCVersionReconciler struct {
client.Client
ManagerNamespace string
Insecure bool
Scheme *runtime.Scheme
BMCOptions bmc.Options
ResyncInterval time.Duration
Conditions *conditionutils.Accessor
}
BMCVersionReconciler reconciles a BMCVersion object
func (*BMCVersionReconciler) Reconcile ¶
func (r *BMCVersionReconciler) 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 (*BMCVersionReconciler) SetupWithManager ¶
func (r *BMCVersionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type BMCVersionSetReconciler ¶
BMCVersionSetReconciler reconciles a BMCVersionSet object
func (*BMCVersionSetReconciler) SetupWithManager ¶
func (r *BMCVersionSetReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type DNSRecordTemplateData ¶ added in v0.2.0
type DNSRecordTemplateData struct {
Name string
Namespace string
metalv1alpha1.BMCSpec
metalv1alpha1.BMCStatus
Labels map[string]string
}
DNSRecordTemplateData contains the data used to render the DNS record YAML template
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) SetupWithManager ¶
func (r *EndpointReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ServerBootConfigurationReconciler ¶
ServerBootConfigurationReconciler reconciles a ServerBootConfiguration object
func (*ServerBootConfigurationReconciler) Reconcile ¶
func (r *ServerBootConfigurationReconciler) 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 (*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 ¶
ServerMaintenanceReconciler reconciles a ServerMaintenance object
func (*ServerMaintenanceReconciler) Reconcile ¶
func (r *ServerMaintenanceReconciler) 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 (*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
Conditions *conditionutils.Accessor
}
ServerReconciler reconciles a Server object
func (*ServerReconciler) 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 (*ServerReconciler) SetupWithManager ¶
func (r *ServerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Source Files
¶
- biossettings_controller.go
- biossettingsset_controller.go
- biosversion_controller.go
- biosversionset_controller.go
- bmc_controller.go
- bmcsecret_controller.go
- bmcsettings_controller.go
- bmcsettingsset_controller.go
- bmcversion_controller.go
- bmcversionset_controller.go
- endpoint_controller.go
- helper.go
- index_fields.go
- server_controller.go
- serverbootconfiguration_controller.go
- serverclaim_controller.go
- servermaintenance_controller.go