crd

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 14 Imported by: 1

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

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 WithRestConfig

func WithRestConfig(config *rest.Config) ConfigOption

type Tinkerbell

type Tinkerbell struct {
	CRDs   map[string][]byte
	Client clientset.Interface
}

Tinkerbell is the struct that holds the raw custom resource definitions and a CRD client for operations.

func NewTinkerbell

func NewTinkerbell(opts ...ConfigOption) Tinkerbell

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

func (Tinkerbell) Ready

func (t Tinkerbell) Ready(ctx context.Context) error

Ready checks if the CRDs exist in the cluster and are established.

Jump to

Keyboard shortcuts

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