Documentation ¶
Index ¶
- type BootstrapClusterClientOption
- type BootstrapClusterOption
- type Bootstrapper
- type ClusterClient
- type KindClient
- type KubernetesClient
- type RetrierClient
- func (c RetrierClient) Apply(ctx context.Context, cluster *types.Cluster, data []byte) error
- func (c RetrierClient) CreateNamespace(ctx context.Context, kubeconfig, namespace string) error
- func (c RetrierClient) DeleteKindCluster(ctx context.Context, cluster *types.Cluster) error
- func (c RetrierClient) GetCAPIClusterCRD(ctx context.Context, cluster *types.Cluster) error
- func (c RetrierClient) GetCAPIClusters(ctx context.Context, cluster *types.Cluster) ([]types.CAPICluster, error)
- func (c RetrierClient) GetKindClusterKubeconfig(ctx context.Context, clusterName string) (string, error)
- func (c RetrierClient) KindClusterExists(ctx context.Context, clusterName string) (bool, error)
- type RetrierClientOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BootstrapClusterClientOption ¶
type BootstrapClusterClientOption func() error
type BootstrapClusterOption ¶
type BootstrapClusterOption func(b *Bootstrapper) BootstrapClusterClientOption
func WithEnv ¶
func WithEnv(env map[string]string) BootstrapClusterOption
func WithExtraDockerMounts ¶
func WithExtraDockerMounts() BootstrapClusterOption
func WithExtraPortMappings ¶ added in v0.9.0
func WithExtraPortMappings(ports []int) BootstrapClusterOption
type Bootstrapper ¶
type Bootstrapper struct {
// contains filtered or unexported fields
}
func (*Bootstrapper) CreateBootstrapCluster ¶
func (b *Bootstrapper) CreateBootstrapCluster(ctx context.Context, clusterSpec *cluster.Spec, opts ...BootstrapClusterOption) (*types.Cluster, error)
type ClusterClient ¶
type ClusterClient interface { Apply(ctx context.Context, cluster *types.Cluster, data []byte) error CreateNamespace(ctx context.Context, kubeconfig, namespace string) error GetCAPIClusterCRD(ctx context.Context, cluster *types.Cluster) error GetCAPIClusters(ctx context.Context, cluster *types.Cluster) ([]types.CAPICluster, error) KindClusterExists(ctx context.Context, clusterName string) (bool, error) GetKindClusterKubeconfig(ctx context.Context, clusterName string) (string, error) CreateBootstrapCluster(ctx context.Context, clusterSpec *cluster.Spec, opts ...BootstrapClusterClientOption) (string, error) DeleteKindCluster(ctx context.Context, cluster *types.Cluster) error WithExtraDockerMounts() BootstrapClusterClientOption WithExtraPortMappings([]int) BootstrapClusterClientOption WithEnv(env map[string]string) BootstrapClusterClientOption }
type KindClient ¶ added in v0.15.2
type KindClient interface { CreateBootstrapCluster(ctx context.Context, clusterSpec *cluster.Spec, opts ...BootstrapClusterClientOption) (kubeconfig string, err error) DeleteBootstrapCluster(ctx context.Context, cluster *types.Cluster) error WithExtraDockerMounts() BootstrapClusterClientOption WithExtraPortMappings([]int) BootstrapClusterClientOption WithEnv(env map[string]string) BootstrapClusterClientOption GetKubeconfig(ctx context.Context, clusterName string) (string, error) ClusterExists(ctx context.Context, clusterName string) (bool, error) }
KindClient is a Kind client.
type KubernetesClient ¶ added in v0.15.2
type KubernetesClient interface { ApplyKubeSpecFromBytes(ctx context.Context, cluster *types.Cluster, data []byte) error GetClusters(ctx context.Context, cluster *types.Cluster) ([]types.CAPICluster, error) ValidateClustersCRD(ctx context.Context, cluster *types.Cluster) error CreateNamespaceIfNotPresent(ctx context.Context, kubeconfig string, namespace string) error }
KubernetesClient is a Kubernetes client.
type RetrierClient ¶ added in v0.15.2
type RetrierClient struct { KindClient // contains filtered or unexported fields }
RetrierClient wraps kind and kubernetes APIs around a retrier.
func NewRetrierClient ¶ added in v0.11.2
func NewRetrierClient(kind KindClient, k8s KubernetesClient, opts ...RetrierClientOpt) RetrierClient
NewRetrierClient constructs a new RetrierClient.
func (RetrierClient) CreateNamespace ¶ added in v0.15.2
func (c RetrierClient) CreateNamespace(ctx context.Context, kubeconfig, namespace string) error
CreateNamespace creates a namespace if the namespace does not exist.
func (RetrierClient) DeleteKindCluster ¶ added in v0.15.2
DeleteKindCluster deletes a kind cluster by cluster name.
func (RetrierClient) GetCAPIClusterCRD ¶ added in v0.15.2
GetCAPIClusterCRD gets the capi cluster crd in a K8s cluster.
func (RetrierClient) GetCAPIClusters ¶ added in v0.15.2
func (c RetrierClient) GetCAPIClusters(ctx context.Context, cluster *types.Cluster) ([]types.CAPICluster, error)
GetCAPIClusters gets all the capi clusters in a K8s cluster.
func (RetrierClient) GetKindClusterKubeconfig ¶ added in v0.15.2
func (c RetrierClient) GetKindClusterKubeconfig(ctx context.Context, clusterName string) (string, error)
GetKindClusterKubeconfig gets the kubeconfig for a kind cluster by cluster name.
func (RetrierClient) KindClusterExists ¶ added in v0.15.2
KindClusterExists checks whether a kind cluster exists by a cluster name.
type RetrierClientOpt ¶ added in v0.15.2
type RetrierClientOpt func(*RetrierClient)
RetrierClientOpt allows to customize a RetrierClient on construction.
func WithRetrierClientRetrier ¶ added in v0.15.2
func WithRetrierClientRetrier(retrier retrier.Retrier) RetrierClientOpt
WithRetrierClientRetrier allows to use a custom retrier.