Documentation ¶
Index ¶
- Constants
- func BootstrapCluster(runPlural ActionFunc) error
- func CheckClusterReadiness(name, namespace string) (bool, error)
- func DestroyCluster(destroy func() error, runPlural ActionFunc) error
- func ExecuteSteps(steps []*Step) error
- func GetBootstrapPath() (string, error)
- func GetProviderTags(prov, cluster string) map[string]string
- func GetStepPath(step *Step, defaultPath string) string
- func IsClusterPhase(context, name, namespace string, phase capi.ClusterPhase) (bool, error)
- func MigrateCluster(runPlural ActionFunc) error
- func RunWithTempCredentials(function ActionFunc) error
- type ActionFunc
- type Bootstrap
- type ConditionFunc
- type HookFunc
- type Step
Constants ¶
const (
ClusterNotReadyError = "cluster exists but it is not ready yet"
)
Variables ¶
This section is empty.
Functions ¶
func BootstrapCluster ¶
func BootstrapCluster(runPlural ActionFunc) error
BootstrapCluster bootstraps cluster with Cluster API.
func CheckClusterReadiness ¶
CheckClusterReadiness checks if Cluster API cluster is in ready state.
func DestroyCluster ¶
func DestroyCluster(destroy func() error, runPlural ActionFunc) error
DestroyCluster destroys cluster managed by Cluster API.
func ExecuteSteps ¶
ExecuteSteps of a bootstrap, migration or destroy process.
func GetBootstrapPath ¶
GetBootstrapPath returns bootstrap repository path.
func GetProviderTags ¶
GetProviderTags returns map of tags to set on provider resources during migration.
func GetStepPath ¶
GetStepPath returns path from which step will be executed.
func IsClusterPhase ¶
func IsClusterPhase(context, name, namespace string, phase capi.ClusterPhase) (bool, error)
func MigrateCluster ¶
func MigrateCluster(runPlural ActionFunc) error
MigrateCluster migrates existing clusters to Cluster API.
func RunWithTempCredentials ¶
func RunWithTempCredentials(function ActionFunc) error
RunWithTempCredentials is a function wrapper that provides provider-specific flags with credentials that are used during bootstrap and destroy.
Types ¶
type ActionFunc ¶
ActionFunc is an action function that is executed as a part of single bootstrap, migrate and destroy step.
type Bootstrap ¶
Bootstrap is a representation of existing cluster to be migrated to Cluster API. This data is fetched from provider with migrator tool. See github.com/pluralsh/cluster-api-migration for more details.
type ConditionFunc ¶
type ConditionFunc func() bool
ConditionFunc is a condition function that is checks if step should be executed or skipped.
type Step ¶
type Step struct { Name string Args []string TargetPath string Execute ActionFunc Skip bool SkipFunc ConditionFunc Retries int OnError HookFunc OnAfter HookFunc Confirm string }
Step is a representation of a single step in a process of bootstrap, migrate and destroy.