Documentation
¶
Index ¶
- Constants
- func IgnitionSecret(ign []byte, infraID, role string) *corev1.Secret
- func InitializeProvider(platform Provider) infrastructure.Provider
- type BootstrapDestroyInput
- type BootstrapDestroyer
- type IgnitionInput
- type IgnitionProvider
- type InfraProvider
- func (i *InfraProvider) DestroyBootstrap(ctx context.Context, dir string) error
- func (i *InfraProvider) ExtractHostAddresses(dir string, config *types.InstallConfig, ha *infrastructure.HostAddresses) error
- func (i *InfraProvider) Provision(ctx context.Context, dir string, parents asset.Parents) (fileList []*asset.File, err error)
- type InfraReadyInput
- type InfraReadyProvider
- type PostProvider
- type PostProvisionInput
- type PreProvider
- type PreProvisionInput
- type Provider
Constants ¶
const (
// CAPIArtifactsDir is the directory where the manifests generated by CAPI are stored.
CAPIArtifactsDir = ".clusterapi_output"
)
Variables ¶
This section is empty.
Functions ¶
func IgnitionSecret ¶
IgnitionSecret provides the basic formatting for creating the ignition secret.
func InitializeProvider ¶
func InitializeProvider(platform Provider) infrastructure.Provider
InitializeProvider returns a ClusterAPI provider implementation for a specific cloud platform.
Types ¶
type BootstrapDestroyInput ¶
type BootstrapDestroyInput struct {
Client client.Client
Metadata types.ClusterMetadata
}
BootstrapDestroyInput collects args passed to the DestroyBootstrap hook.
type BootstrapDestroyer ¶
type BootstrapDestroyer interface {
DestroyBootstrap(ctx context.Context, in BootstrapDestroyInput) error
}
BootstrapDestroyer allows platform-specific behavior when destroying bootstrap resources.
type IgnitionInput ¶
type IgnitionInput struct {
Client client.Client
BootstrapIgnData []byte
InfraID string
InstallConfig *installconfig.InstallConfig
TFVarsAsset *tfvars.TerraformVariables
}
IgnitionInput collects the args passed to the IgnitionProvider call.
type IgnitionProvider ¶
type IgnitionProvider interface {
Ignition(ctx context.Context, in IgnitionInput) ([]byte, error)
}
IgnitionProvider handles preconditions for bootstrap ignition and generates ignition data for the CAPI bootstrap ignition secret.
WARNING! Low-level primitive. Use only if absolutely necessary.
type InfraProvider ¶
type InfraProvider struct {
// contains filtered or unexported fields
}
InfraProvider implements common Cluster API logic and contains the platform CAPI provider, which is called in the lifecycle defined by the Provider interface.
func (*InfraProvider) DestroyBootstrap ¶
func (i *InfraProvider) DestroyBootstrap(ctx context.Context, dir string) error
DestroyBootstrap destroys the temporary bootstrap resources.
func (*InfraProvider) ExtractHostAddresses ¶
func (i *InfraProvider) ExtractHostAddresses(dir string, config *types.InstallConfig, ha *infrastructure.HostAddresses) error
ExtractHostAddresses extracts the IPs of the bootstrap and control plane machines.
type InfraReadyInput ¶
type InfraReadyInput struct {
// Client is the client for kube-apiserver running locally on the installer host.
// It can be used to read the status of the cluster object on the local control plane.
Client client.Client
InstallConfig *installconfig.InstallConfig
InfraID string
}
InfraReadyInput collects the args passed to the InfraReady call.
type InfraReadyProvider ¶
type InfraReadyProvider interface {
// InfraReady is called once cluster.Status.InfrastructureReady
// is true, typically after load balancers have been provisioned. It can be used
// to create DNS records.
InfraReady(ctx context.Context, in InfraReadyInput) error
}
InfraReadyProvider defines the InfraReady hook, which is called after the initial infrastructure manifests have been created and InfrastructureReady == true on the cluster status, and before IgnitionProvider hook and creation of the control-plane machines.
type PostProvider ¶
type PostProvider interface {
PostProvision(ctx context.Context, in PostProvisionInput) error
}
PostProvider defines the PostProvision hook, which is called after machine provisioning has completed.
type PostProvisionInput ¶
type PostProvisionInput struct {
Client client.Client
InstallConfig *installconfig.InstallConfig
InfraID string
}
PostProvisionInput collects the args passed to the PostProvision hook.
type PreProvider ¶
type PreProvider interface {
// PreProvision is called before provisioning using CAPI controllers has begun
// and should be used to create dependencies needed for CAPI provisioning,
// such as IAM roles or policies.
PreProvision(ctx context.Context, in PreProvisionInput) error
}
PreProvider defines the PreProvision hook, which is called prior to CAPI infrastructure provisioning.
type PreProvisionInput ¶
type PreProvisionInput struct {
InfraID string
InstallConfig *installconfig.InstallConfig
RhcosImage *rhcos.Image
ManifestsAsset *manifests.Manifests
MachineManifests []client.Object
WorkersAsset *machines.Worker
}
PreProvisionInput collects the args passed to the PreProvision call.