Documentation
¶
Index ¶
- Constants
- func GenerateRandomPassword(length int) ([]byte, error)
- func RegisterIndexFields(ctx context.Context, indexer client.FieldIndexer) error
- type BMCReconciler
- type BMCSecretReconciler
- type DNSRecordTemplateData
- type EndpointReconciler
- type ServerBootConfigurationReconciler
- type ServerClaimReconciler
- type ServerClaimSchedulerReconciler
- type ServerReadinessRuleReconciler
- type ServerReadinessRuleServerReconciler
- type ServerReconciler
Constants ¶
const ( // ConditionPoweringOn indicates a server is powering on. ConditionPoweringOn = "PoweringOn" // ConditionReset indicates a reset condition. ConditionReset = "Reset" // ConditionReady indicates readiness. ConditionReady = "Ready" // ConditionWaitingForPowerOff is set while the server is waiting for the BMC // to confirm it is powered off before the claim can be released. ConditionWaitingForPowerOff = "WaitingForPowerOff" )
Shared condition types used across multiple controllers.
const ( // ReasonAuthenticationFailed indicates authentication has failed. ReasonAuthenticationFailed = "AuthenticationFailed" // ReasonInternalError indicates an internal server error. ReasonInternalError = "InternalServerError" // ReasonUnknownError indicates an unknown error. ReasonUnknownError = "UnknownError" // ReasonConnectionFailed indicates a connection failure. ReasonConnectionFailed = "ConnectionFailed" // ReasonUserReset indicates a user-requested reset. ReasonUserReset = "UserRequested" // ReasonAutoReset indicates an automatic reset. ReasonAutoReset = "AutoResetting" // ReasonConnected indicates a successful connection. ReasonConnected = "Connected" // ReasonWaitingForPowerOff is used while waiting for the BMC to confirm the host is powered off. ReasonWaitingForPowerOff = "WaitingForPowerOff" // ReasonPowerOffConfirmed marks WaitingForPowerOff as resolved. ReasonPowerOffConfirmed = "PowerOffConfirmed" // ReasonResetComplete indicates a BMC reset has completed successfully. ReasonResetComplete = "ResetComplete" )
Shared reason strings used across multiple controllers.
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" )
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomPassword ¶
GenerateRandomPassword generates a random password of the given length.
func RegisterIndexFields ¶ added in v0.2.0
func RegisterIndexFields(ctx context.Context, indexer client.FieldIndexer) error
Types ¶
type BMCReconciler ¶
type BMCReconciler struct {
client.Client
Scheme *runtime.Scheme
DefaultProtocol metalv1alpha1.ProtocolScheme
SkipCertValidation 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
// SSHResetTimeout defines the timeout for SSH reset operations (dial + command execution).
SSHResetTimeout time.Duration
}
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.24.1/pkg/reconcile
func (*BMCSecretReconciler) SetupWithManager ¶
func (r *BMCSecretReconciler) 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
DefaultProtocol metalv1alpha1.ProtocolScheme
SkipCertValidation bool
BMCOptions bmc.Options
}
EndpointReconciler reconciles a Endpoints object
func (*EndpointReconciler) 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 (*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
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 ServerClaimSchedulerReconciler ¶ added in v0.8.0
type ServerClaimSchedulerReconciler struct {
client.Client
APIReader client.Reader
MaxConcurrentReconciles int
}
ServerClaimSchedulerReconciler schedules unbound ServerClaims onto matching Servers and drives the claim phase from Unbound to Bound once the binding is complete.
func (*ServerClaimSchedulerReconciler) Reconcile ¶ added in v0.8.0
func (r *ServerClaimSchedulerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile moves a ServerClaim from unbound to bound by selecting a matching, claimable Server, claiming it and recording the server reference on the claim.
func (*ServerClaimSchedulerReconciler) SetupWithManager ¶ added in v0.8.0
func (r *ServerClaimSchedulerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ServerReadinessRuleReconciler ¶ added in v0.6.0
ServerReadinessRuleReconciler reconciles a ServerReadinessRule object
func (*ServerReadinessRuleReconciler) Reconcile ¶ added in v0.6.0
func (r *ServerReadinessRuleReconciler) 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 (*ServerReadinessRuleReconciler) SetupWithManager ¶ added in v0.6.0
func (r *ServerReadinessRuleReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ServerReadinessRuleServerReconciler ¶ added in v0.6.0
func (*ServerReadinessRuleServerReconciler) SetupWithManager ¶ added in v0.6.0
func (r *ServerReadinessRuleServerReconciler) SetupWithManager(mgr ctrl.Manager) error
type ServerReconciler ¶
type ServerReconciler struct {
client.Client
APIReader client.Reader
Scheme *runtime.Scheme
Recorder events.EventRecorder
DefaultProtocol metalv1alpha1.ProtocolScheme
SkipCertValidation bool
ManagerNamespace string
ProbeImage string
ProbeOSImage string
RegistryURL string
RegistryClientTimeout time.Duration
RegistryDataMaxAge time.Duration
RegistryResyncInterval time.Duration
EnforceFirstBoot bool
EnforcePowerOff bool
ResyncInterval time.Duration
BMCOptions bmc.Options
DiscoveryTimeout time.Duration
MaxConcurrentReconciles int
Conditions *conditionutils.Accessor
DiscoveryIgnitionPath string
}
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.