Documentation
¶
Index ¶
Constants ¶
View Source
const ( // HardwareCRDName is the name of the Hardware CRD. HardwareCRDName = "hardware.tinkerbell.org" // TemplateCRDName is the name of the Template CRD. TemplateCRDName = "templates.tinkerbell.org" // WorkflowCRDName is the name of the Workflow CRD. WorkflowCRDName = "workflows.tinkerbell.org" // WorkflowRuleSetCRDName is the name of the WorkflowRuleSet CRD. WorkflowRuleSetCRDName = "workflowrulesets.tinkerbell.org" // JobCRDName is the name of the Job CRD. JobCRDName = "jobs.bmc.tinkerbell.org" // MachineCRDName is the name of the Machine CRD. MachineCRDName = "machines.bmc.tinkerbell.org" // TaskCRDName is the name of the Task CRD. TaskCRDName = "tasks.bmc.tinkerbell.org" )
Variables ¶
View Source
var HardwareCRD []byte
View Source
var JobCRD []byte
View Source
var MachineCRD []byte
View Source
var TaskCRD []byte
View Source
var TemplateCRD []byte
View Source
var TinkerbellDefaults = map[string][]byte{ HardwareCRDName: HardwareCRD, TemplateCRDName: TemplateCRD, WorkflowCRDName: WorkflowCRD, WorkflowRuleSetCRDName: WorkflowRuleSetCRD, JobCRDName: JobCRD, MachineCRDName: MachineCRD, TaskCRDName: TaskCRD, }
TinkerbellDefaults contains all the Tinkerbell CRDs.
View Source
var WorkflowCRD []byte
View Source
var WorkflowRuleSetCRD []byte
Functions ¶
This section is empty.
Types ¶
type ConfigOption ¶
type ConfigOption func(*Tinkerbell)
ConfigOption is a function that sets a configuration option.
func WithLogger ¶ added in v0.23.0
func WithLogger(logger logr.Logger) ConfigOption
WithLogger sets a structured logger for Kubernetes API server warnings.
func WithRestConfig ¶
func WithRestConfig(config *rest.Config) ConfigOption
type Tinkerbell ¶
type Tinkerbell struct {
CRDs map[string][]byte
Client clientset.Interface
Logger logr.Logger
// contains filtered or unexported fields
}
Tinkerbell is the struct that holds the raw custom resource definitions and a CRD client for operations.
func NewTinkerbell ¶
func NewTinkerbell(opts ...ConfigOption) (Tinkerbell, error)
NewTinkerbell returns a struct with a CRD client and the CRDs. If no CRDs are provided, it will use the default (TinkerbellDefaults) CRDs.
func (Tinkerbell) Migrate ¶
func (t Tinkerbell) Migrate(ctx context.Context) error
Migrate applies the CRDs to the cluster.
func (Tinkerbell) MigrateAndReady ¶
func (t Tinkerbell) MigrateAndReady(ctx context.Context) error
Click to show internal directories.
Click to hide internal directories.