Documentation ¶
Index ¶
- type ConfigManager
- func (c *ConfigManager) Associate(ctx context.Context, nConfig *bootstrapv1.NodeConfig) error
- func (c *ConfigManager) CreateBareMetalHost(ctx context.Context) error
- func (c *ConfigManager) CreateNodeInitConfig(ctx context.Context) (string, error)
- func (c *ConfigManager) FindHost(ctx context.Context) (*bmh.BareMetalHost, bool)
- func (c *ConfigManager) NewConfigManager(client client.Client, nodeconfig *bootstrapv1.NodeConfig, ...) (*ConfigManager, error)
- func (c *ConfigManager) SetError(message string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigManager ¶
type ConfigManager struct { NodeConfig *bootstrapv1.NodeConfig Log logr.Logger // contains filtered or unexported fields }
ConfigManager is used to build cloud-init, BMC-meta, ...
func (*ConfigManager) Associate ¶
func (c *ConfigManager) Associate(ctx context.Context, nConfig *bootstrapv1.NodeConfig) error
Associate associates the nodeconfig with the baremetal machine It's invoked by the Config Controller
func (*ConfigManager) CreateBareMetalHost ¶
func (c *ConfigManager) CreateBareMetalHost(ctx context.Context) error
CreateBareMetalHost creates BMH if there is not
func (*ConfigManager) CreateNodeInitConfig ¶
func (c *ConfigManager) CreateNodeInitConfig(ctx context.Context) (string, error)
CreateNodeInitConfig creates cloud-init
func (*ConfigManager) FindHost ¶
func (c *ConfigManager) FindHost(ctx context.Context) (*bmh.BareMetalHost, bool)
FindHost return true when it founds the associated host by looking for an annotation on the machine that contains a reference to the host.
func (*ConfigManager) NewConfigManager ¶
func (c *ConfigManager) NewConfigManager(client client.Client, nodeconfig *bootstrapv1.NodeConfig, configLog logr.Logger) (*ConfigManager, error)
NewConfigManager returns a new helper for managing a config
func (*ConfigManager) SetError ¶
func (c *ConfigManager) SetError(message string)
SetError sets the ErrorMessage and ErrorReason fields on the machine and logs the message. It assumes the reason is invalid configuration, since that is currently the only relevant MachineStatusError choice.