Documentation ¶
Index ¶
- func NewProvider(datacenterConfig *v1alpha1.TinkerbellDatacenterConfig, ...) *tinkerbellProvider
- func NewProviderCustomDep(datacenterConfig *v1alpha1.TinkerbellDatacenterConfig, ...) *tinkerbellProvider
- func NewTinkerbellTemplateBuilder(datacenterSpec *v1alpha1.TinkerbellDatacenterConfigSpec, ...) providers.TemplateBuilder
- type ProviderKubectlClient
- type ProviderPbnjClient
- type ProviderTinkClient
- type SSHAuthKeyGenerator
- type TinkerbellClients
- type TinkerbellTemplateBuilder
- func (vs *TinkerbellTemplateBuilder) CPMachineTemplateName(clusterName string) string
- func (vs *TinkerbellTemplateBuilder) EtcdMachineTemplateName(clusterName string) string
- func (vs *TinkerbellTemplateBuilder) GenerateCAPISpecControlPlane(clusterSpec *cluster.Spec, buildOptions ...providers.BuildMapOption) (content []byte, err error)
- func (vs *TinkerbellTemplateBuilder) GenerateCAPISpecWorkers(clusterSpec *cluster.Spec, ...) (content []byte, err error)
- func (vs *TinkerbellTemplateBuilder) KubeadmConfigTemplateName(clusterName, workerNodeGroupName string) string
- func (vs *TinkerbellTemplateBuilder) WorkerMachineTemplateName(clusterName, workerNodeGroupName string) string
- type Validator
- func (v *Validator) ValidateBMCSecretCreds(ctx context.Context, hc hardware.HardwareConfig) error
- func (v *Validator) ValidateClusterMachineConfigs(ctx context.Context, tinkerbellClusterSpec *spec) error
- func (v *Validator) ValidateHardwareConfig(ctx context.Context, hardwareConfigFile string, skipPowerActions bool) error
- func (v *Validator) ValidateMinimumRequiredTinkerbellHardwareAvailable(spec v1alpha1.ClusterSpec) error
- func (v *Validator) ValidateTinkerbellConfig(ctx context.Context, datacenterConfig *v1alpha1.TinkerbellDatacenterConfig) error
- func (v *Validator) ValidateTinkerbellTemplate(ctx context.Context, tinkerbellIp string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProvider ¶
func NewProvider( datacenterConfig *v1alpha1.TinkerbellDatacenterConfig, machineConfigs map[string]*v1alpha1.TinkerbellMachineConfig, clusterConfig *v1alpha1.Cluster, writer filewriter.FileWriter, providerKubectlClient ProviderKubectlClient, providerTinkbellClient TinkerbellClients, now types.NowFunc, skipIpCheck bool, hardwareConfigFile string, skipPowerActions bool, ) *tinkerbellProvider
func NewProviderCustomDep ¶ added in v0.8.0
func NewProviderCustomDep( datacenterConfig *v1alpha1.TinkerbellDatacenterConfig, machineConfigs map[string]*v1alpha1.TinkerbellMachineConfig, clusterConfig *v1alpha1.Cluster, writer filewriter.FileWriter, providerKubectlClient ProviderKubectlClient, providerTinkClient ProviderTinkClient, pbnjClient ProviderPbnjClient, netClient networkutils.NetClient, now types.NowFunc, skipIpCheck bool, hardwareConfigFile string, skipPowerActions bool, ) *tinkerbellProvider
func NewTinkerbellTemplateBuilder ¶
func NewTinkerbellTemplateBuilder(datacenterSpec *v1alpha1.TinkerbellDatacenterConfigSpec, controlPlaneMachineSpec, etcdMachineSpec *v1alpha1.TinkerbellMachineConfigSpec, workerNodeGroupMachineSpecs map[string]v1alpha1.TinkerbellMachineConfigSpec, now types.NowFunc) providers.TemplateBuilder
Types ¶
type ProviderKubectlClient ¶
type ProviderKubectlClient interface { ApplyHardware(ctx context.Context, hardwareYaml string, kubeConfFile string) error DeleteEksaDatacenterConfig(ctx context.Context, eksaTinkerbellDatacenterResourceType string, tinkerbellDatacenterConfigName string, kubeconfigFile string, namespace string) error DeleteEksaMachineConfig(ctx context.Context, eksaTinkerbellMachineResourceType string, tinkerbellMachineConfigName string, kubeconfigFile string, namespace string) error GetMachineDeployment(ctx context.Context, machineDeploymentName string, opts ...executables.KubectlOpt) (*clusterv1.MachineDeployment, error) }
TODO: Add necessary kubectl functions here
type ProviderPbnjClient ¶ added in v0.8.0
type ProviderPbnjClient interface {
GetPowerState(ctx context.Context, bmc pbnj.BmcSecretConfig) (pbnj.PowerState, error)
}
type ProviderTinkClient ¶ added in v0.8.0
type ProviderTinkClient interface { GetHardware(ctx context.Context) ([]*tinkhardware.Hardware, error) GetWorkflow(ctx context.Context) ([]*tinkworkflow.Workflow, error) }
type SSHAuthKeyGenerator ¶ added in v0.8.0
type SSHAuthKeyGenerator interface {
GenerateSSHAuthKey(filewriter.FileWriter) (string, error)
}
KeyGenerator generates ssh keys and writes them to a FileWriter.
type TinkerbellClients ¶ added in v0.8.0
type TinkerbellClients struct { ProviderTinkClient ProviderTinkClient ProviderPbnjClient ProviderPbnjClient }
type TinkerbellTemplateBuilder ¶
type TinkerbellTemplateBuilder struct {
// contains filtered or unexported fields
}
func (*TinkerbellTemplateBuilder) CPMachineTemplateName ¶
func (vs *TinkerbellTemplateBuilder) CPMachineTemplateName(clusterName string) string
func (*TinkerbellTemplateBuilder) EtcdMachineTemplateName ¶
func (vs *TinkerbellTemplateBuilder) EtcdMachineTemplateName(clusterName string) string
func (*TinkerbellTemplateBuilder) GenerateCAPISpecControlPlane ¶
func (vs *TinkerbellTemplateBuilder) GenerateCAPISpecControlPlane(clusterSpec *cluster.Spec, buildOptions ...providers.BuildMapOption) (content []byte, err error)
func (*TinkerbellTemplateBuilder) GenerateCAPISpecWorkers ¶
func (*TinkerbellTemplateBuilder) KubeadmConfigTemplateName ¶ added in v0.7.1
func (vs *TinkerbellTemplateBuilder) KubeadmConfigTemplateName(clusterName, workerNodeGroupName string) string
func (*TinkerbellTemplateBuilder) WorkerMachineTemplateName ¶
func (vs *TinkerbellTemplateBuilder) WorkerMachineTemplateName(clusterName, workerNodeGroupName string) string
type Validator ¶ added in v0.8.0
type Validator struct {
// contains filtered or unexported fields
}
func NewValidator ¶ added in v0.8.0
func NewValidator(tink ProviderTinkClient, netClient networkutils.NetClient, hardwareConfig hardware.HardwareConfig, pbnjClient ProviderPbnjClient) *Validator
func (*Validator) ValidateBMCSecretCreds ¶ added in v0.8.0
func (*Validator) ValidateClusterMachineConfigs ¶ added in v0.8.0
func (v *Validator) ValidateClusterMachineConfigs(ctx context.Context, tinkerbellClusterSpec *spec) error
TODO: dry out machine configs validations
func (*Validator) ValidateHardwareConfig ¶ added in v0.8.0
func (*Validator) ValidateMinimumRequiredTinkerbellHardwareAvailable ¶ added in v0.8.0
func (v *Validator) ValidateMinimumRequiredTinkerbellHardwareAvailable(spec v1alpha1.ClusterSpec) error
ValidateMinimumRequiredTinkerbellHardwareAvailable ensures there is sufficient hardware registered relative to the sum of requested control plane, etcd and worker node counts. The system requires hardware >= to requested provisioning. ValidateMinimumRequiredTinkerbellHardwareAvailable requires v.ValidateHardwareConfig() to be called first.
func (*Validator) ValidateTinkerbellConfig ¶ added in v0.8.0
func (*Validator) ValidateTinkerbellTemplate ¶ added in v0.8.0
Click to show internal directories.
Click to hide internal directories.