Documentation ¶
Overview ¶
Package tanzu is responsible for orchestrating the various packages that satisfy unmanaged operations such as create, configure, list, and delete. This package is meant to be the API entrypoint for those calling unmanaged programmatically.
Package tanzu is responsible for orchestrating the various packages that satisfy unmanaged operations such as create, configure, list, and delete. This package is meant to be the API entrypoint for those calling unmanaged programmatically.
Index ¶
Constants ¶
const ( // 0 - Success! Success int = iota // 1 - Provided configurations could not be validated InvalidConfig // 2 - Could not create local cluster directories ErrCreatingClusterDirs // 3 - Unable to get TKR BOM ErrTkrBom // 4 - Could not render config ErrRenderingConfig // 5 - TKR BOM not parseable ErrTkrBomParsing // 6 - Could not resolve kapp controller bundle ErrKappBundleResolving // 7 - Unable to create new cluster ErrCreateCluster // 8 - Unable to use existing cluster (if provided) ErrExistingCluster // 9 - Could not install kapp controller to cluster ErrKappInstall // 10 - Could not install core package repo to cluster ErrCorePackageRepoInstall // 11 - Could not install additional package repo ErrOtherPackageRepoInstall // 12 - Could not install CNI package ErrCniInstall // 13 - Failed to merge kubeconfig and set context ErrKubeconfigContextSet // 14 - Cound not install package ErrInstallPackage )
Variables ¶
This section is empty.
Functions ¶
func ReadClusterContextFromKubeconfig ¶
GetKubeconfigContext returns the current context for a passed in kubeconfig file This is a utility function that enables users of the `tanzu` packages to utilize an existing cluster with an existing kubeconfig and get it's current context
Types ¶
type Manager ¶
type Manager interface { // Deploy orchestrates all the required steps in order to create an unmanaged Tanzu cluster. This can involve // cluster creation, kapp-controller installation, CNI installation, and more. The steps that are taken // depend on the configuration passed into Deploy. // If something goes wrong during deploy, an error and its corresponding exit code is returned. Deploy(scConfig *config.UnmanagedClusterConfig) (int, error) // List retrieves all known tanzu clusters are returns a list of them. If it's unable to interact with the // underlying cluster provider, it returns an error. List() ([]Cluster, error) // Delete takes a cluster name and removes the cluster from the underlying cluster provider. If it is unable // to communicate with the underlying cluster provider, it returns an error. Delete(name string) error // Stop takes a cluster name and attempts to stop a running cluster. If it is unable // to communicate with the underlying cluster provider, it returns an error. Stop(name string) error // Start takes a cluster name and attempts to start a stopped cluster. If // there are issues starting the cluster or communitcating with the // underlying provider, an error is returned. Start(name string) error }
type UnmanagedCluster ¶
type UnmanagedCluster struct {
// contains filtered or unexported fields
}
UnmanagedCluster contains information about an unmanaged Tanzu cluster.
func (*UnmanagedCluster) Delete ¶
func (t *UnmanagedCluster) Delete(name string) error
Delete deletes an unmanaged cluster.
func (*UnmanagedCluster) Deploy ¶
func (t *UnmanagedCluster) Deploy(scConfig *config.UnmanagedClusterConfig) (int, error)
Deploy deploys a new cluster.
func (*UnmanagedCluster) List ¶
func (t *UnmanagedCluster) List() ([]Cluster, error)
List lists the unmanaged clusters.
func (*UnmanagedCluster) Start ¶
func (t *UnmanagedCluster) Start(name string) error
Start tells an unmanaged cluster to start a cluster that is not currently running.
func (*UnmanagedCluster) Stop ¶
func (t *UnmanagedCluster) Stop(name string) error
Stop tells an unmanaged cluster to no longer continue running.