platform

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AWSCAPIProvider     = "aws-cluster-api-controllers"
	AzureCAPIProvider   = "azure-cluster-api-controllers"
	PowerVSCAPIProvider = "ibmcloud-cluster-api-controllers"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OrphanDeleter

type OrphanDeleter interface {
	// DeleteOrphanedMachines removes the finalizer from provider machines if they have been deleted and it is no
	// longer possible to delete them normally via the provider (ie. the OIDC provider is no longer valid)
	DeleteOrphanedMachines(ctx context.Context, c client.Client, hc *hyperv1.HostedCluster, controlPlaneNamespace string) error
}

OrphanDeleter is an interface implemented by providers for which it is possible to determine if machines have been orphaned by a failure to communicate with the provider.

type Platform

type Platform interface {
	// ReconcileCAPIInfraCR is called during HostedCluster reconciliation prior to reconciling the CAPI Cluster CR.
	// Implementations should use the given input and client to create and update the desired state of the
	// platform infrastructure CAPI CR, which will then be referenced by the CAPI Cluster CR.
	// TODO (alberto): Pass createOrUpdate construct instead of client.
	ReconcileCAPIInfraCR(ctx context.Context, c client.Client, createOrUpdate upsert.CreateOrUpdateFN, hcluster *hyperv1.HostedCluster, controlPlaneNamespace string, apiEndpoint hyperv1.APIEndpoint) (client.Object, error)

	// CAPIProviderDeploymentSpec is called during HostedCluster reconciliation prior to reconciling
	// the CAPI provider Deployment.
	// It should return a CAPI provider DeploymentSpec with the specific needs for a particular platform.
	// E.g particular volumes and secrets for credentials, containers, etc.
	CAPIProviderDeploymentSpec(hcluster *hyperv1.HostedCluster, hcp *hyperv1.HostedControlPlane) (*appsv1.DeploymentSpec, error)

	// ReconcileCredentials is responsible for reconciling resources related to cloud credentials
	// from the HostedCluster namespace into to the HostedControlPlaneNamespace. So they can be used by
	// the Control Plane Operator.
	ReconcileCredentials(ctx context.Context, c client.Client, createOrUpdate upsert.CreateOrUpdateFN, hcluster *hyperv1.HostedCluster, controlPlaneNamespace string) error

	// ReconcileSecretEncryption is responsible for reconciling resources related to secret encryption
	// from the HostedCluster namespace into to the HostedControlPlaneNamespace. So they can be used by
	// the Control Plane Operator if your platform supports KMS.
	ReconcileSecretEncryption(ctx context.Context, c client.Client, createOrUpdate upsert.CreateOrUpdateFN, hcluster *hyperv1.HostedCluster, controlPlaneNamespace string) error

	// CAPIProviderPolicyRules responsible to return list of policy rules are required to be used
	// by the CAPI provider in order to manage the resources by this platform
	// Return nil if no aditional policy rule is required
	CAPIProviderPolicyRules() []rbacv1.PolicyRule

	// DeleteCredentials is responsible for deleting resources related to platform credentials
	// So they won't leak on upon hostedcluster deletion
	DeleteCredentials(ctx context.Context, c client.Client, hcluster *hyperv1.HostedCluster, controlPlaneNamespace string) error
}

func GetPlatform

func GetPlatform(ctx context.Context, hcluster *hyperv1.HostedCluster, releaseProvider releaseinfo.Provider, utilitiesImage string, pullSecretBytes []byte) (Platform, error)

GetPlatform gets and initializes the cloud platform the hosted cluster was created on

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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