provision

package module
v0.0.0-...-af7b037 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

README

Provision

Overview

The provision package provided in this module allows you to create and manage clusters.

Usage

The package includes the provision, status, credentials, and deprovision functions. Use them to:

  • Create and provision the cluster on a selected cloud provider.
  • Check the status of the cluster.
  • Fetch the kubeconfig file to communicate with the cluster.
  • Delete the cluster along with the configuration.
Actions

The actions Hydroform subpackage brings even more extensibility to the standard Hydroform functionality. You can run actions before and after each Hydroform operation. You can also combine the actions in a sequence to run them in a specific order.

Examples

Follow the links to view the usage examples.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Credentials

func Credentials(cluster *types.Cluster, provider *types.Provider, ops ...types.Option) ([]byte, error)

Credentials returns the kubeconfig for a specific cluster as a byte array.

func Deprovision

func Deprovision(cluster *types.Cluster, provider *types.Provider, ops ...types.Option) error

Deprovision removes an existing cluster along or returns an error if removing the cluster is not possible.

func Provision

func Provision(cluster *types.Cluster, provider *types.Provider, ops ...types.Option) (*types.Cluster, error)

Provision creates a new cluster for a given provider based on specific cluster and provider parameters. It returns a cluster object enriched with information from the provider, such as the IP address or the connection endpoint. This object is necessary for the other operations, such as retrieving the cluster status or deprovisioning the cluster. If the cluster cannot be created, the function returns an error.

func Status

func Status(cluster *types.Cluster, provider *types.Provider, ops ...types.Option) (*types.ClusterStatus, error)

Status returns the cluster status for a given provider, or an error if providing the status is not possible. The possible status values are defined in the ClusterStatus type.

Types

type Provisioner

type Provisioner interface {
	Provision(cluster *types.Cluster, provider *types.Provider) (*types.Cluster, error)
	Status(cluster *types.Cluster, provider *types.Provider) (*types.ClusterStatus, error)
	Credentials(cluster *types.Cluster, provider *types.Provider) ([]byte, error)
	Deprovision(cluster *types.Cluster, provider *types.Provider) error
}

Provisioner is the Hydroform interface that groups Provision, Status, Credentials, and Deprovision functions used to create and manage a cluster.

Jump to

Keyboard shortcuts

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