Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CNIInstaller ¶
type CNIInstaller interface {
// Install configures a CNI for the first time in a kubernetes cluster
Install(ctx context.Context, cluster *types.Cluster) error
}
CNIInstaller install a CNI in a given cluster.
type Cluster ¶
type Cluster interface {
// CreateAsync performs the necessary action that will eventually result in a cluster being
// created. This likely includes applying CAPI manifests to the cluster but its not the only
// thing that may be required.
CreateAsync(_ context.Context, management *types.Cluster) error
// WriteKubeconfig writes the Kuberconfig for this cluster to the io.Writer.
WriteKubeconfig(_ context.Context, _ io.Writer, management *types.Cluster) error
// WaitUntilControlPlaneAvailable blocks until the first control plane is ready node is ready.
// The node is ready when its possible to interact with the Kube API server using
// a Kubeconfig.
WaitUntilControlPlaneAvailable(_ context.Context, management *types.Cluster) error
// WaitUntilReady blocks until all nodes within the cluster are ready. Nodes are ready when
// they have joined the cluster and their Ready condition is true.
WaitUntilReady(_ context.Context, management *types.Cluster) error // GetName retrieves the cluster name.
GetName() string
}
Cluster represents a workload cluster to be created.
type Create ¶
type Create struct {
// Cluster is an abstraction of a cluster that can be created.
Cluster Cluster
// CNI is an installer of a CNI. As per Kubernetes documentation, the CNI must be installed for
// inter cluster communication.
CNI CNIInstaller
// FS is a file system abstraction providing file creation and write capabilities.
FS filewriter.FileWriter
}
Create creates a Kubernetes conformant cluster that is immediately usable for simple workloads. It expects a management cluster configuration to be available in the context.
Click to show internal directories.
Click to hide internal directories.