Documentation
¶
Index ¶
Constants ¶
View Source
const ( // GroupTinkerbell is the API group for core Tinkerbell resources. GroupTinkerbell = "tinkerbell.org" // GroupBMC is the API group for BMC resources. GroupBMC = "bmc.tinkerbell.org" )
Variables ¶
View Source
var AvailableVersions = []string{"v1alpha1", "v1alpha2"}
AvailableVersions lists all supported CRD API versions.
View Source
var CRDsByVersion = map[string]map[string][]byte{ "v1alpha1": TinkerbellDefaults, "v1alpha2": TinkerbellV1Alpha2, }
CRDsByVersion maps API version strings to their CRD source maps.
View Source
var TinkerbellDefaults = map[string][]byte{
"hardware.tinkerbell.org": mustReadCRD("bases/v1alpha1/tinkerbell.org_hardware.yaml"),
"templates.tinkerbell.org": mustReadCRD("bases/v1alpha1/tinkerbell.org_templates.yaml"),
"workflows.tinkerbell.org": mustReadCRD("bases/v1alpha1/tinkerbell.org_workflows.yaml"),
"workflowrulesets.tinkerbell.org": mustReadCRD("bases/v1alpha1/tinkerbell.org_workflowrulesets.yaml"),
"jobs.bmc.tinkerbell.org": mustReadCRD("bases/v1alpha1/bmc.tinkerbell.org_jobs.yaml"),
"machines.bmc.tinkerbell.org": mustReadCRD("bases/v1alpha1/bmc.tinkerbell.org_machines.yaml"),
"tasks.bmc.tinkerbell.org": mustReadCRD("bases/v1alpha1/bmc.tinkerbell.org_tasks.yaml"),
}
TinkerbellDefaults contains all the v1alpha1 Tinkerbell CRDs.
View Source
var TinkerbellV1Alpha2 = map[string][]byte{
"hardware.tinkerbell.org": mustReadCRD("bases/v1alpha2/tinkerbell.org_hardware.yaml"),
"tasks.tinkerbell.org": mustReadCRD("bases/v1alpha2/tinkerbell.org_tasks.yaml"),
"bmcs.tinkerbell.org": mustReadCRD("bases/v1alpha2/tinkerbell.org_bmcs.yaml"),
"workflows.tinkerbell.org": mustReadCRD("bases/v1alpha2/tinkerbell.org_workflows.yaml"),
"policies.tinkerbell.org": mustReadCRD("bases/v1alpha2/tinkerbell.org_policies.yaml"),
"jobs.bmc.tinkerbell.org": mustReadCRD("bases/v1alpha2/bmc.tinkerbell.org_jobs.yaml"),
}
TinkerbellV1Alpha2 contains all the v1alpha2 Tinkerbell CRDs.
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.