cloudprovider

package
v0.8.3-beta.7 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitRepoName = "cloud-provider"
	GitRepoURL  = "https://github.com/apecloud/cloud-provider"
)
View Source
const (
	Local        = "local"
	AWS          = "aws"
	AliCloud     = "alicloud"
	Azure        = "azure"
	GCP          = "gcp"
	TencentCloud = "tencentcloud"
)

Variables

View Source
var (
	// CliDockerNetwork is docker network for k3d cluster when `kbcli playground`
	// all cluster will be created in this network, so they can communicate with each other
	CliDockerNetwork = "k3d-kbcli-playground"

	// K3sImage is k3s image repo
	K3sImage = "rancher/k3s:" + version.K3sImageTag

	// K3dProxyImage is k3d proxy image repo
	K3dProxyImage = "docker.io/apecloud/k3d-proxy:" + version.K3dVersion

	// K3dFixEnv
	KBEnvFix fixes.K3DFixEnv = "KB_FIX_MOUNTS"
)
View Source
var (
	TFExecPath string
)

Functions

func CloudProviders

func CloudProviders() []string

func K8sService

func K8sService(provider string) string

Types

type Interface

type Interface interface {
	// Name returns the cloud provider name
	Name() string

	// CreateK8sCluster creates a kubernetes cluster
	CreateK8sCluster(clusterInfo *K8sClusterInfo) error

	// DeleteK8sCluster deletes the created kubernetes cluster
	DeleteK8sCluster(clusterInfo *K8sClusterInfo) error

	// GetClusterInfo gets cluster info
	GetClusterInfo() (*K8sClusterInfo, error)
}

func New

func New(provider, tfRootPath string, stdout, stderr io.Writer) (Interface, error)

type K8sClusterInfo

type K8sClusterInfo struct {
	ClusterName   string `json:"cluster_name"`
	CloudProvider string `json:"cloud_provider"`
	Region        string `json:"region,omitempty"`
	KubeConfig    string `json:"kube_config,omitempty"`
	KbcliVersion  string `json:"kbcli_version,omitempty"`
}

K8sClusterInfo is the kubernetes cluster information for playground that will be serialized to a state file

func (*K8sClusterInfo) IsValid

func (c *K8sClusterInfo) IsValid() bool

IsValid checks if kubernetes cluster info is valid

func (*K8sClusterInfo) String

func (c *K8sClusterInfo) String() string

type TFPlugin

type TFPlugin struct {
	Name     string
	Registry string
	Source   string
	Version  string
}

Jump to

Keyboard shortcuts

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