Documentation ¶
Index ¶
- 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 PostDestroyer
- type PostDestroyerInput
- type PostProvider
- type PostProvisionInput
- type PreProvider
- type PreProvisionInput
- type Provider
- type Timeouts
Constants ¶
This section is empty.
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 MasterIgnData []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) ([]*corev1.Secret, error)
}
IgnitionProvider handles preconditions for bootstrap ignition, such as pushing to cloud storage. Returns bootstrap and master ignition secrets.
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 PostDestroyer ¶
type PostDestroyer interface {
PostDestroy(ctx context.Context, in PostDestroyerInput) error
}
PostDestroyer allows platform-specific behavior after bootstrap has been destroyed and ClusterAPI has stopped running.
type PostDestroyerInput ¶
type PostDestroyerInput struct {
Metadata types.ClusterMetadata
}
PostDestroyerInput collects args passed to the PostDestroyer hook.
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.
type Provider ¶
type Provider interface { // Name provides the name for the cloud platform. Name() string // BootstrapHasPublicIP indicates whether a public IP address // is expected on the bootstrap node in a public cluster. // When BootstrapHasPublicIP returns true, the machine ready checks // wait for an ExternalIP address to be populated in the machine status. BootstrapHasPublicIP() bool }
Provider is the base interface that cloud platforms should implement for the CAPI infrastructure provider.